Compare commits

..

12 Commits

View File

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