Skip to content

Instantly share code, notes, and snippets.

@sibysathyanesan
Last active March 21, 2020 06:43
Show Gist options
  • Save sibysathyanesan/d01b2880e526d6b4741bb52624dbc0b3 to your computer and use it in GitHub Desktop.
Save sibysathyanesan/d01b2880e526d6b4741bb52624dbc0b3 to your computer and use it in GitHub Desktop.
To find the linux release
lsb_release -a
list installed packages
apt list --installed
Check service current status
sudo service <serviceName> status
Chech a service status (on startup)
systemctl is-enabled <serviceName>
ex: systemctl is-enabled apache2
list all the services (enabled and disabled)
systemctl list-unit-files --type=service
List all enabled/disabled services
systemctl list-unit-files | grep enabled
systemctl list-unit-files | grep disabled
Enable/Disable service
sudo systemctl enable <serviceName>
sudo systemctl disable <serviceName>
In case of issues with above command you can try also longer form
sudo systemctl enable <serviceName>.service
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment