-
Notifications
You must be signed in to change notification settings - Fork 14
/
start-systemd-services.xml
66 lines (66 loc) · 2.82 KB
/
start-systemd-services.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic
[
<!ENTITY % entities SYSTEM "../common/generic-entities.ent">
%entities;
]>
<!-- refers to legacy doc: <add github link to legacy doc piece, if applicable> -->
<!-- point back to this document with a similar comment added to your legacy doc piece -->
<!-- refer to README.md for file and id naming conventions -->
<!-- metadata is dealt with on the assembly level -->
<topic xml:id="starting-systemd-services"
role="task" xml:lang="en"
xmlns="http://docbook.org/ns/docbook" version="5.2"
xmlns:its="http://www.w3.org/2005/11/its"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:trans="http://docbook.org/ns/transclusion">
<info>
<title>Starting and stopping &systemd; services </title>
<meta name="maintainer" content="amrita.sakthivelsuse.com" its:translate="no"/>
<abstract>
<para>
You can start and stop &systemd; services by using units which are resources.
The target units are service units, which have a <literal>.service</literal> suffix. For service management tasks, you do
not have to add the <literal>.service </literal>because &systemd; knows that you want to execute a service.
</para>
</abstract>
</info>
<para>
To start and stop &systemd; services, use the following commands:
</para>
<itemizedlist>
<listitem>
<para>
To start a &systemd; service:
</para>
<screen>&prompt.sudo; systemctl start <replaceable>SERVICE</replaceable></screen>
</listitem>
<listitem>
<para>
To check the status of a &systemd; service:
</para>
<screen>&prompt.sudo; systemctl status <replaceable>SERVICE</replaceable></screen>
</listitem>
<listitem>
<para>
To stop a currently running &systemd; service: </para>
<screen>&prompt.sudo; systemctl stop <replaceable>SERVICE</replaceable></screen> </listitem>
</itemizedlist>
<para>You can also use the following <command>systemctl</command> commands:</para>
<itemizedlist>
<listitem>
<para>Stops the service and then starts it. If the service is not running, it is started.</para>
<screen>&prompt.sudo; systemctl restart <replaceable>SERVICE</replaceable></screen>
</listitem>
<listitem>
<para>Reloads the &systemd; service's configuration file without interrupting operations.</para>
<screen>&prompt.user; systemctl reload <replaceable>SERVICE</replaceable></screen>
</listitem>
<listitem>
<para>Reloads the service if it supports reloading, otherwise it restarts the service. If the service is not
running, it is started.</para>
<screen>&prompt.sudo; systemctl reload-or-restart <replaceable>SERVICE</replaceable></screen>
</listitem>
</itemizedlist>
</topic>