Compare commits
12 Commits
54fe5aa16a
...
1a3d439586
Author | SHA1 | Date | |
---|---|---|---|
1a3d439586 | |||
e0875add3c | |||
c9a470b116 | |||
c4057d5f67 | |||
cd430addd0 | |||
c870497f0b | |||
1fd0a07b13 | |||
f9b82413d6 | |||
53005db9e8 | |||
cc0af0c824 | |||
ab6b0917bd | |||
e116f88a1c |
@ -1,34 +1,34 @@
|
|||||||
% systemctl
|
% systemctl
|
||||||
|
|
||||||
# Start service
|
# Start service
|
||||||
systemctl start <service_inactive>
|
sudo systemctl start <service_inactive>
|
||||||
|
|
||||||
# Stop service
|
# Stop service
|
||||||
systemctl stop <service_active>
|
sudo systemctl stop <service_active>
|
||||||
|
|
||||||
# Enable service
|
# Enable service
|
||||||
systemctl enable <service_disabled>
|
sudo systemctl enable <service_disabled>
|
||||||
|
|
||||||
# Disable service
|
# Disable service
|
||||||
systemctl disable <service_enabled>
|
sudo systemctl disable <service_enabled>
|
||||||
|
|
||||||
# Restart service
|
# Restart service
|
||||||
systemctl restart <service>
|
sudo systemctl restart <service>
|
||||||
|
|
||||||
# Reload service
|
# Reload service
|
||||||
systemctl reload <service_active>
|
sudo systemctl reload <service_active>
|
||||||
|
|
||||||
# Service status
|
# Service status
|
||||||
systemctl status <service>
|
sudo systemctl status <service>
|
||||||
|
|
||||||
# List running services
|
# List running services
|
||||||
systemctl list-units --type=service --state=running
|
sudo systemctl list-units --type=service --state=running
|
||||||
|
|
||||||
# List enabled services
|
# List enabled services
|
||||||
systemctl list-unit-files --type=service --state=enabled
|
sudo systemctl list-unit-files --type=service --state=enabled
|
||||||
|
|
||||||
# List disabled services
|
# List disabled services
|
||||||
systemctl list-unit-files --type=service --state=disabled
|
sudo 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