Ubuntu systemctl Guide: Manage Services
Systemctl is a system service management tool that can be used to manage and control services on the system. In Ubuntu, you can use the systemctl command to start, stop, restart, disable, and enable system services. Here are some common examples of systemctl commands:
- Start a service.
sudo systemctl start servicename
- Stop a service.
sudo systemctl stop servicename
- Restart a service.
sudo systemctl restart servicename
- Disable a service (not automatically start during system boot):
sudo systemctl disable servicename
- Enable a service (to start automatically at system startup):
sudo systemctl enable servicename
- Check service status:
systemctl status servicename
- View all services that have been started.
systemctl list-units --type=service
- View all enabled services.
systemctl list-unit-files --type=service
These commands make it convenient to manage various services in the system, ensuring its smooth operation and security.