Last active
March 27, 2020 13:20
-
-
Save vicente-gonzalez-ruiz/ae89c13f652193c857f3206f715ffcbf to your computer and use it in GitHub Desktop.
How to get the status, enable and disable a service in Linux
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# See: https://wiki.archlinux.org/index.php/systemd | |
# List running services: | |
systemctl list-units | |
systemctl list-units | grep service | |
# List all available services (running or not): | |
systemctl list-unit-files | |
# Start a service (sshd, for example): | |
sudo systemctl start sshd.service | |
# Stop a service (sshd, for example): | |
sudo systemctl stop sshd.service | |
# Disable a service (lightdm, for example): | |
sudo systemctl disable lightdm.service | |
# Enable a service (lightdm, for example): | |
sudo systemctl disable lightdm.service |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment