Compare commits

..

12 Commits

View File

@ -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$//'