~ubuntu-branches/ubuntu/trusty/systemd/trusty

« back to all changes in this revision

Viewing changes to man/timedatectl.html

  • Committer: Package Import Robot
  • Author(s): Michael Biebl, Michael Biebl, Michael Stapelberg, Daniel Schaal, Ondrej Balaz
  • Date: 2013-09-12 00:13:11 UTC
  • mfrom: (1.1.11) (9.1.2 experimental)
  • mto: This revision was merged to the branch mainline in revision 53.
  • Revision ID: package-import@ubuntu.com-20130912001311-dz35it34wr2lbday
Tags: 204-3
[ Michael Biebl ]
* Upload to unstable.
* Use /bin/bash in debug-shell.service as Debian doesn't have /sbin/sushell.
* Only import net.ifaces cmdline property for network devices.
* Generate strict dependencies between the binary packages using a
  shlibs.local file and add an explicit versioned dependency on
  libsystemd-login0 to systemd to ensure packages are upgraded in sync.
  Closes: #719444
* Drop obsolete Replaces: libudev0 from udev package.
* Use correct paths for various binaries, like /sbin/quotaon, which are
  installed in / and not /usr in Debian.  Closes: #721347
* Don't install kernel-install(8) man page since we don't install the
  corresponding binary either.  Closes: #722180
* Cherry-pick upstream fixes to make switching runlevels and starting
  reboot via ctrl-alt-del more robust.
* Cherry-pick upstream fix to properly apply ACLs to Journal files.

[ Michael Stapelberg ]
* Make systemctl enable|disable call update-rc.d for SysV init scripts.
  Closes: #709780
* Don't mount /tmp as tmpfs by default and make it possible to enable this
  feature via "systemctl enable tmp.mount".

[ Daniel Schaal ]
* Add bug-script to systemd and udev.  Closes: #711245

[ Ondrej Balaz ]
* Recognize discard option in /etc/crypttab.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>timedatectl</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><style>
 
2
    a.headerlink {
 
3
      color: #c60f0f;
 
4
      font-size: 0.8em;
 
5
      padding: 0 4px 0 4px;
 
6
      text-decoration: none;
 
7
      visibility: hidden;
 
8
    }
 
9
 
 
10
    a.headerlink:hover {
 
11
      background-color: #c60f0f;
 
12
      color: white;
 
13
    }
 
14
 
 
15
    h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink {
 
16
      visibility: visible;
 
17
    }
 
18
  </style><a href="index.html">Index </a>·
 
19
  <a href="systemd.directives.html">Directives </a>·
 
20
  <a href="../python-systemd/index.html">Python </a>·
 
21
  <a href="../libudev/index.html">libudev </a>·
 
22
  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 204</span><hr><div class="refentry"><a name="timedatectl"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>timedatectl — Control the system time and date</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">timedatectl [OPTIONS...]  {COMMAND}</code> </p></div></div><div class="refsect1"><a name="idm259798163584"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>timedatectl</strong></span> may be used to
 
23
                query and change the system clock and its
 
24
                settings.</p></div><div class="refsect1"><a name="idm259798234656"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p>Prints a short help
 
25
                                text and exits.</p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p>Prints a short version
 
26
                                string and exits.</p></dd><dt id="--no-pager"><span class="term"><code class="option">--no-pager</code></span><a class="headerlink" title="Permalink to this term" href="#--no-pager">¶</a></dt><dd><p>Do not pipe output into a
 
27
                                pager.</p></dd><dt id="--no-ask-password"><span class="term"><code class="option">--no-ask-password</code></span><a class="headerlink" title="Permalink to this term" href="#--no-ask-password">¶</a></dt><dd><p>Don't query the user
 
28
                                for authentication for privileged
 
29
                                operations.</p></dd><dt id="-H"><span class="term"><code class="option">-H</code>, </span><span class="term"><code class="option">--host</code></span><a class="headerlink" title="Permalink to this term" href="#-H">¶</a></dt><dd><p>Execute the operation
 
30
                                remotely. Specify a hostname, or
 
31
                                username and hostname separated by @,
 
32
                                to connect to. This will use SSH to
 
33
                                talk to a remote
 
34
                                system.</p></dd><dt id="--adjust-system-clock"><span class="term"><code class="option">--adjust-system-clock</code></span><a class="headerlink" title="Permalink to this term" href="#--adjust-system-clock">¶</a></dt><dd><p>If
 
35
                                <span class="command"><strong>set-local-rtc</strong></span> is
 
36
                                invoked and this option is passed the
 
37
                                system clock is synchronized from the
 
38
                                RTC again, taking the new setting into
 
39
                                account. Otherwise the RTC is
 
40
                                synchronized from the system
 
41
                                clock.</p></dd></dl></div><p>The following commands are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="status"><span class="term"><span class="command"><strong>status</strong></span></span><a class="headerlink" title="Permalink to this term" href="#status">¶</a></dt><dd><p>Show current settings
 
42
                                of the system clock and
 
43
                                RTC.</p></dd><dt id="set-time [TIME]"><span class="term"><span class="command"><strong>set-time [TIME]</strong></span></span><a class="headerlink" title="Permalink to this term" href="#set-time%20%5BTIME%5D">¶</a></dt><dd><p>Set the system clock
 
44
                                to the specified time. This will also
 
45
                                update the RTC time accordingly. The time
 
46
                                may be specified in the format
 
47
                                "2012-10-30
 
48
                                18:17:16".</p></dd><dt id="set-timezone [TIMEZONE]"><span class="term"><span class="command"><strong>set-timezone [TIMEZONE]</strong></span></span><a class="headerlink" title="Permalink to this term" href="#set-timezone%20%5BTIMEZONE%5D">¶</a></dt><dd><p>Set the system time
 
49
                                zone to the specified value. Available
 
50
                                time zones can be listed with
 
51
                                <span class="command"><strong>list-timezones</strong></span>. If
 
52
                                the RTC is configured to be in the
 
53
                                local time this will also update the
 
54
                                RTC time. This call will alter the
 
55
                                <code class="filename">/etc/localtime</code>
 
56
                                symlink. See
 
57
                                <a href="localtime.html"><span class="citerefentry"><span class="refentrytitle">localtime</span>(5)</span></a>
 
58
                                for more
 
59
                                information.</p></dd><dt id="list-timezones"><span class="term"><span class="command"><strong>list-timezones</strong></span></span><a class="headerlink" title="Permalink to this term" href="#list-timezones">¶</a></dt><dd><p>List available time
 
60
                                zones, one per line. Entries from the
 
61
                                list can be set as the system
 
62
                                time zone with
 
63
                                <span class="command"><strong>set-timezone</strong></span>.</p></dd><dt id="set-local-rtc [BOOL]"><span class="term"><span class="command"><strong>set-local-rtc [BOOL]</strong></span></span><a class="headerlink" title="Permalink to this term" href="#set-local-rtc%20%5BBOOL%5D">¶</a></dt><dd><p>Takes a boolean
 
64
                                argument. If <code class="literal">0</code> the
 
65
                                system is configured to maintain the
 
66
                                RTC in universal time, if
 
67
                                <code class="literal">1</code> it will maintain
 
68
                                the RTC in local time instead. Note
 
69
                                that maintaining the RTC in the local
 
70
                                time zone is not fully supported and
 
71
                                will create various problems with time
 
72
                                zone changes and daylight saving
 
73
                                adjustments. If at all possible use
 
74
                                RTC in UTC. Note that invoking this
 
75
                                will also synchronize the RTC from the
 
76
                                system clock, unless
 
77
                                <code class="option">--adjust-system-clock</code> is
 
78
                                passed (see above). This command will
 
79
                                change the 3rd line of
 
80
                                <code class="filename">/etc/adjtime</code>, as
 
81
                                documented in
 
82
                                <a href="hwclock.html"><span class="citerefentry"><span class="refentrytitle">hwclock</span>(8)</span></a>.</p></dd><dt id="set-ntp [BOOL]"><span class="term"><span class="command"><strong>set-ntp [BOOL]</strong></span></span><a class="headerlink" title="Permalink to this term" href="#set-ntp%20%5BBOOL%5D">¶</a></dt><dd><p>Takes a boolean
 
83
                                argument. Controls whether NTP based
 
84
                                network time synchronization is
 
85
                                enabled (if
 
86
                                available).</p></dd></dl></div></div><div class="refsect1"><a name="idm259798321808"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success 0 is returned, a non-zero failure
 
87
                code otherwise.</p></div><div class="refsect1"><a name="idm259798320624"></a><h2 id="Environment">Environment<a class="headerlink" title="Permalink to this headline" href="#Environment">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="$SYSTEMD_PAGER"><span class="term"><code class="varname">$SYSTEMD_PAGER</code></span><a class="headerlink" title="Permalink to this term" href="#%24SYSTEMD_PAGER">¶</a></dt><dd><p>Pager to use when
 
88
                                <code class="option">--no-pager</code> is not given;
 
89
                                overrides <code class="varname">$PAGER</code>.  Setting
 
90
                                this to an empty string or the value
 
91
                                <code class="literal">cat</code> is equivalent to passing
 
92
                                <code class="option">--no-pager</code>.</p></dd></dl></div></div><div class="refsect1"><a name="idm259798308656"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>Show current settings:
 
93
                </p><pre class="programlisting">
 
94
$ timedatectl
 
95
      Local time: Fri, 2012-11-02 09:26:46 CET
 
96
  Universal time: Fri, 2012-11-02 08:26:46 UTC
 
97
        RTC time: Fri, 2012-11-02 08:26:45
 
98
        Timezone: Europe/Warsaw
 
99
      UTC offset: +0100
 
100
     NTP enabled: no
 
101
NTP synchronized: no
 
102
 RTC in local TZ: no
 
103
      DST active: no
 
104
 Last DST change: CEST → CET, DST became inactive
 
105
                  Sun, 2012-10-28 02:59:59 CEST
 
106
                  Sun, 2012-10-28 02:00:00 CET
 
107
 Next DST change: CET → CEST, DST will become active
 
108
                  the clock will jump one hour forward
 
109
                  Sun, 2013-03-31 01:59:59 CET
 
110
                  Sun, 2013-03-31 03:00:00 CEST
 
111
                </pre><p>
 
112
                </p><p>Enable an NTP daemon (chronyd):
 
113
                </p><pre class="programlisting">
 
114
$ timedatectl set-ntp true
 
115
==== AUTHENTICATING FOR org.freedesktop.timedate1.set-ntp ===
 
116
Authentication is required to control whether network time synchronization shall be enabled.
 
117
Authenticating as: user
 
118
Password: ********
 
119
==== AUTHENTICATION COMPLETE ===
 
120
                </pre><p>
 
121
 
 
122
                </p><pre class="programlisting">
 
123
$ systemctl status chronyd.service
 
124
chronyd.service - NTP client/server
 
125
          Loaded: loaded (/usr/lib/systemd/system/chronyd.service; enabled)
 
126
          Active: active (running) since Fri, 2012-11-02 09:36:25 CET; 5s ago
 
127
...
 
128
                </pre><p>
 
129
                </p></div><div class="refsect1"><a name="idm259798303280"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
 
130
                        <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
 
131
                        <a href="hwclock.html"><span class="citerefentry"><span class="refentrytitle">hwclock</span>(8)</span></a>,
 
132
                        <a href="date.html"><span class="citerefentry"><span class="refentrytitle">date</span>(1)</span></a>,
 
133
                        <a href="localtime.html"><span class="citerefentry"><span class="refentrytitle">localtime</span>(5)</span></a>,
 
134
                        <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>,
 
135
                        <a href="systemd-timedated.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-timedated.service</span>(8)</span></a>
 
136
                </p></div></div></body></html>