1SYSTEMCTL(1)                       systemctl                      SYSTEMCTL(1)
2
3
4

NAME

6       systemctl - Control the systemd system and session manager
7

SYNOPSIS

9       systemctl [OPTIONS...] {COMMAND} [NAME...]
10

DESCRIPTION

12       systemctl may be used to introspect and control the state of the
13       systemd(1) system and session manager.
14

OPTIONS

16       The following options are understood:
17
18       --help, -h
19           Prints a short help text and exits.
20
21       --type=, -t
22           When listing units, limit display to certain unit types. If not
23           specified units of all types will be shown. The argument should be
24           a unit type name such as service, socket and similar.
25
26       --property=, -p
27           When showing unit/job/manager information, limit display to certain
28           properties as specified as argument. If not specified all set
29           properties are shown. The argument should be a property name, such
30           as MainPID. If specified more than once all properties with the
31           specified names are shown.
32
33       --all, -a
34           When listing units, show all units, regardless of their state,
35           including inactive units. When showing unit/job/manager
36           information, show all properties regardless whether they are set or
37           not.
38
39       --full
40           Do not ellipsize unit names and truncate unit descriptions in the
41           output of list-units and list-jobs.
42
43       --fail
44           If the requested operation conflicts with a pending unfinished job,
45           fail the command. If this is not specified the requested operation
46           will replace the pending job, if necessary.
47
48       --quiet, -q
49           Suppress output to STDOUT in snapshot, check, enable and disable.
50
51       --no-block
52           Do not synchronously wait for the requested operation to finish. If
53           this is not specified the job will be verified, enqueued and
54           systemctl will wait until it is completed. By passing this argument
55           it is only verified and enqueued.
56
57       --system
58           Talk to the systemd system manager. (Default)
59
60       --session
61           Talk to the systemd session manager of the calling user.
62
63       --order, --require
64           When used in conjunction with the dot command (see below), selects
65           which dependencies are shown in the dependency graph. If --order is
66           passed only dependencies of type After= or Before= are shown. If
67           --require is passed only dependencies of type Requires=,
68           RequiresOverridable=, Requisite=, RequisiteOverridable=, Wants= and
69           Conflicts= are shown. If neither is passed, shows dependencies of
70           all these types.
71
72       --no-wall
73           Don´t send wall message before halt, power-off, reboot.
74
75       --global
76           When used with enable and disable, operate on the global session
77           configuŕation directory, thus enabling or disabling a unit file
78           globally for all future sessions of all users.
79
80       --no-reload
81           When used with enable and disable, do not implicitly reload daemon
82           configuration after executing the changes.
83
84       --force
85           When used with enable, override any existing conflicting symlinks.
86
87       --defaults
88           When used with disable, ensures that only the symlinks created by
89           enable are removed, not all symlinks pointing to the unit file that
90           shall be disabled.
91
92       The following commands are understood:
93
94       list-units
95           List known units.
96
97       start [NAME...]
98           Start (activate) one or more units specified on the command line.
99
100       stop [NAME...]
101           Stop (deactivate) one or more units specified on the command line.
102
103       reload [NAME...]
104           Asks all units listed on the command line to reload their
105           configuration. Note that this will reload the service-specific
106           configuration, not the unit configuration file of systemd. If you
107           want systemd to reload the configuration file of a unit use the
108           daemon-reload command. In other words: for the example case of
109           Apache, this will reload Apache´s httpd.conf in the web server, not
110           the apache.service systemd unit file.
111
112           This command should not be confused with the daemon-reload or load
113           commands.
114
115       restart [NAME...]
116           Restart one or more units specified on the command line. If the
117           units are not running yet they will be started.
118
119       try-restart [NAME...]
120           Restart one or more units specified on the command line. If the
121           units are not running yet the operation will fail.
122
123       reload-or-restart [NAME...], reload-or-try-restart [NAME...]
124           Reload one or more units if they support it. If not, restart them
125           instead. Note that for compatibility with SysV and Red Hat init
126           scripts force-reload and condrestart may be used as equivalent
127           commands to reload-or-try-restart.
128
129       isolate [NAME]
130           Start the unit specified on the command line and its dependencies
131           and stop all others.
132
133           This is similar to changing the runlevel in a traditional init
134           system. The isolate command will immediately stop processes that
135           are not enabled in the new unit, possibly including the graphical
136           environment or terminal you are currently using.
137
138           Note that this works only on units where AllowIsolate= is enabled.
139           See systemd.unit(5) for details.
140
141       is-active [NAME...]
142           Check whether any of the specified units is active (i.e. running).
143           Returns an exit code 0 if at least one is active, non-zero
144           otherwise. Unless --quiet is specified this will also print the
145           current unit state to STDOUT.
146
147       status [NAME...|PID...]
148           Show terse runtime status information about one or more units. This
149           function is intended to generate human-readable output. If you are
150           looking for computer-parsable output, use show instead. If a PID is
151           passed information about the unit the process of the PID belongs to
152           is shown.
153
154       show [NAME...|JOB...]
155           Show properties of one or more units, jobs or the manager itself.
156           If no argument is specified properties of the manager will be
157           shown. If a unit name is specified properties of the unit is shown,
158           and if a job id is specified properties of the job is shown. By
159           default, empty properties are suppressed. Use --all to show those
160           too. To select specific properties to show use --property=. This
161           command is intended to be used whenever computer-parsable output is
162           required. Use status if you are looking for formatted
163           human-readable output.
164
165       reset-failed [NAME...]
166           Reset the ´failed´ state of the specified units, or if no unit name
167           is passed of all units. When a unit fails in some way (i.e. process
168           exiting with non-zero error code, terminating abnormally or timing
169           out) it will automatically enter the ´failed´ state and its exit
170           code and status is recorded for introspection by the administrator
171           until the service is restarted or reset with this command.
172
173       enable [NAME...]
174           Enable one or more unit files, as specified on the command line.
175           This will create a number of symlinks as encoded in the [Install]
176           sections of the unit files. After the symlinks have been created
177           the systemd configuration is reloaded (in a way that is equivalent
178           to daemon-reload) to ensure the changes are taken into account
179           immediately. Note that this does not have the effect that any of
180           the units enabled are also started at the same time. If this is
181           desired a separate start command must be invoked for the unit.
182
183           This command will print the actions executed. This output may be
184           suppressed by passing --quiet.
185
186           Note that this operation creates only the suggested symlinks for
187           the units. While this command is the recommended way to manipulate
188           the unit configuration directory, the administrator is free to make
189           additional changes manually, by placing or removing symlinks in the
190           directory. This is particular useful to create configurations that
191           deviate from the suggested default installation. In this case the
192           administrator must make sure to invoke daemon-reload manually as
193           necessary, to ensure his changes are taken into account.
194
195           Enabling units should not be confused with starting (activating)
196           units, as done by the start command. Enabling and starting units is
197           orthogonal: units may be enabled without being started and started
198           without being enabled. Enabling simply hooks the unit into various
199           suggested places (for example, so that the unit is automatically
200           started on boot or when a particular kind of hardware is plugged
201           in). Starting actually spawns the daemon process (in case of
202           service units), or binds the socket (in case of socket units), and
203           so on.
204
205           Depending on whether --system, --session or --global is specified
206           this enables the unit for the system, for sessions of the calling
207           user only or for all future session of all users. Note that in the
208           latter case no systemd daemon configuration is reloaded.
209
210       disable [NAME...]
211           Disables one or more units. This removes all symlinks to the
212           specified unit files from the unit configuration directory, and
213           hence undoes the changes made by enable. Note however that this by
214           default removes all symlinks to the unit files (i.e. including
215           manual additions), not just those actually created by enable. If
216           only the symlinks that are suggested by default shall be removed,
217           pass --defaults. This implicitly reloads the systemd daemon
218           configuration after completing the disabling of the units. Note
219           that this command does not implicitly stop the units that is being
220           disabled. If this is desired an additional stopcommand should be
221           executed afterwards.
222
223           This command will print the actions executed. This output may be
224           suppressed by passing --quiet.
225
226           This command honours --system, --session, --global in a similar way
227           as enable.
228
229       is-enabled [NAME...]
230           Checks whether any of the specified unit files is enabled (as with
231           enable). Returns an exit code of 0 if at least one is enabled,
232           non-zero otherwise.
233
234       load [NAME...]
235           Load one or more units specified on the command line. This will
236           simply load their configuration from disk, but not start them. To
237           start them you need to use the start command which will implicitly
238           load a unit that has not been loaded yet. Note that systemd garbage
239           collects loaded units that are not active or referenced by an
240           active unit. This means that units loaded this way will usually not
241           stay loaded for long. Also note that this command cannot be used to
242           reload unit configuration. Use the daemon-reload command for that.
243           All in all, this command is of little use except for debugging.
244
245           This command should not be confused with the daemon-reload or
246           reload commands.
247
248       list-jobs
249           List jobs that are in progress.
250
251       cancel [JOB...]
252           Cancel one or more jobs specified on the command line by their
253           numeric job IDs. If not job id is specified cancels all jobs that
254           are pending.
255
256       monitor
257           Monitor unit/job changes. This is mostly useful for debugging
258           purposes and prints a line each time systemd loads or unloads a
259           unit configuration file, or a unit property changes.
260
261       dump
262           Dump server status. This will output a (usually very long) human
263           readable manager status dump. Its format is subject to change
264           without notice and should not be parsed by applications.
265
266       dot
267           Generate textual dependency graph description in dot format for
268           further processing with the GraphViz dot(1) tool. Use a command
269           line like systemctl dot | dot -Tsvg > systemd.svg to generate a
270           graphical dependency tree. Unless --order or --require is passed
271           the generated graph will show both ordering and requirement
272           dependencies.
273
274       snapshot [NAME]
275           Create a snapshot. If a snapshot name is specified, the new
276           snapshot will be named after it. If none is specified an automatic
277           snapshot name is generated. In either case, the snapshot name used
278           is printed to STDOUT, unless --quiet is specified.
279
280           A snapshot refers to a saved state of the systemd manager. It is
281           implemented itself as unit that is generated dynamically with this
282           command and has dependencies on all units active at the time. At a
283           later time the user may return to this state by using the isolate
284           command on the snapshot unit.
285
286           Snapshots are only useful for saving and restoring which units are
287           running or are stopped, they do not save/restore any other state.
288           Snapshots are dynamic and lost on reboot.
289
290       delete [NAME...]
291           Remove a snapshot previously created with snapshot.
292
293       daemon-reload
294           Reload systemd manager configuration. This will reload all unit
295           files and recreate the entire dependency tree. While the daemon is
296           reloaded, all sockets systemd listens on on behalf of user
297           configuration will stay accessible.
298
299           This command should not be confused with the load or reload
300           commands.
301
302       daemon-reexec
303           Reexecute the systemd manager. This will serialize the manager
304           state, reexecute the process and deserialize the state again. This
305           command is of little use except for debugging and package upgrades.
306           Sometimes it might be helpful as a heavy-weight daemon-reload.
307           While the daemon is reexecuted all sockets systemd listens on on
308           behalf of user configuration will stay accessible.
309
310       daemon-exit
311           Ask the systemd manager to quit. This is only supported for session
312           managers (i.e. in conjunction with the --session option) and will
313           fail otherwise.
314
315       show-environment
316           Dump the systemd manager environment block. The environment block
317           will be dumped in straight-forward form suitable for sourcing into
318           a shell script. This environment block will be passed to all
319           processes the manager spawns.
320
321       set-environment [NAME=VALUE...]
322           Set one or more systemd manager environment variables, as specified
323           on the command line.
324
325       unset-environment [NAME...]
326           Unset one or more systemd manager environment variables. If only a
327           variable name is specified it will be removed regardless of its
328           value. If a variable and a value are specified the variable is only
329           removed if it has the specified value.
330
331       halt
332           Shut down and halt the system. This is mostly equivalent to start
333           halt.target but also prints a wall message to all users.
334
335       poweroff
336           Shut down and power-off the system. This is mostly equivalent to
337           start poweroff.target but also prints a wall message to all users.
338
339       reboot
340           Shut down and reboot the system. This is mostly equivalent to start
341           reboot.target but also prints a wall message to all users.
342
343       default
344           Enter default mode. This is mostly equivalent to start
345           default.target.
346
347       rescue
348           Enter rescue mode. This is mostly equivalent to isolate
349           rescue.target but also prints a wall message to all users.
350
351       emergency
352           Enter emergency mode. This is mostly equivalent to isolate
353           emergency.target but also prints a wall message to all users.
354

EXIT STATUS

356       On success 0 is returned, a non-zero failure code otherwise.
357

SEE ALSO

359       systemd(1), systemadm(1), systemd.unit(5), systemd.special(7), wall(1)
360

AUTHOR

362       Lennart Poettering <lennart@poettering.net>
363           Developer
364
365
366
367systemd                           09/14/2010                      SYSTEMCTL(1)
Impressum