HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

systemctl restart — Stop and then start one or more systemd units. Can be used in place of `systemctl start` on a stoppe

Submitted by: @import:tldr-pages··
0
Viewed 0 times
commandstartandclithensystemctl restartstopone
linux

Problem

How to use the systemctl restart command: Stop and then start one or more systemd units. Can be used in place of systemctl start on a stopped unit, but start is safer so that a running unit isn't accidentally restarted. More information: <https://www.freedesktop.org/software/systemd/man/latest/systemctl.html#restart%20PATTERN%E2%80%A6>.

Solution

systemctl restart — Stop and then start one or more systemd units. Can be used in place of systemctl start on a stopped unit, but start is safer so that a running unit isn't accidentally restarted. More information: <https://www.freedesktop.org/software/systemd/man/latest/systemctl.html#restart%20PATTERN%E2%80%A6>.

Restart a unit:
systemctl restart {{unit}}


Restart more than one unit:
systemctl restart {{unit1 unit2 ...}}


Restart a user unit:
systemctl restart {{unit}} --user

Code Snippets

Restart a unit

systemctl restart {{unit}}

Restart more than one unit

systemctl restart {{unit1 unit2 ...}}

Restart a user unit

systemctl restart {{unit}} --user

Context

tldr-pages: linux/systemctl restart

Revisions (0)

No revisions yet.