Compare commits
12 Commits
1a3d439586
...
54fe5aa16a
Author | SHA1 | Date | |
---|---|---|---|
54fe5aa16a | |||
3245dd68ea | |||
9717e480cb | |||
03e582d4d5 | |||
dd04b75beb | |||
3b0fbab70a | |||
11027e7c82 | |||
310818a028 | |||
f080a3f45d | |||
f3ac69f634 | |||
b15d642890 | |||
4af3621e0a |
@ -1,34 +1,34 @@
|
|||||||
% systemctl
|
% systemctl
|
||||||
|
|
||||||
# Start service
|
# Start service
|
||||||
sudo systemctl start <service_inactive>
|
systemctl start <service_inactive>
|
||||||
|
|
||||||
# Stop service
|
# Stop service
|
||||||
sudo systemctl stop <service_active>
|
systemctl stop <service_active>
|
||||||
|
|
||||||
# Enable service
|
# Enable service
|
||||||
sudo systemctl enable <service_disabled>
|
systemctl enable <service_disabled>
|
||||||
|
|
||||||
# Disable service
|
# Disable service
|
||||||
sudo systemctl disable <service_enabled>
|
systemctl disable <service_enabled>
|
||||||
|
|
||||||
# Restart service
|
# Restart service
|
||||||
sudo systemctl restart <service>
|
systemctl restart <service>
|
||||||
|
|
||||||
# Reload service
|
# Reload service
|
||||||
sudo systemctl reload <service_active>
|
systemctl reload <service_active>
|
||||||
|
|
||||||
# Service status
|
# Service status
|
||||||
sudo systemctl status <service>
|
systemctl status <service>
|
||||||
|
|
||||||
# List running services
|
# List running services
|
||||||
sudo systemctl list-units --type=service --state=running
|
systemctl list-units --type=service --state=running
|
||||||
|
|
||||||
# List enabled services
|
# List enabled services
|
||||||
sudo systemctl list-unit-files --type=service --state=enabled
|
systemctl list-unit-files --type=service --state=enabled
|
||||||
|
|
||||||
# List disabled services
|
# List disabled services
|
||||||
sudo systemctl list-unit-files --type=service --state=disabled
|
systemctl list-unit-files --type=service --state=disabled
|
||||||
|
|
||||||
$ service_inactive: systemctl list-units --type=service --state=inactive | awk '{print $1}' | grep .service | sed 's/.service$//'
|
$ service_inactive: systemctl list-units --type=service --state=inactive | awk '{print $1}' | grep .service | sed 's/.service$//'
|
||||||
$ service_active: systemctl list-units --type=service --state=active | awk '{print $1}' | grep .service | sed 's/.service$//'
|
$ service_active: systemctl list-units --type=service --state=active | awk '{print $1}' | grep .service | sed 's/.service$//'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user