How To Use Systemctl to Manage Systemd Services and Units
How To Use Systemctl to Manage Systemd Services and Units
If you're using a Linux system that uses systemd as its init system, you can use the systemctl command to manage services and units. This tutorial will show you the basics of using systemctl to start, stop, enable, disable, and check the status of systemd services and units.
Starting and Stopping Services and Units
To start a service or unit, use the following command:
sudo systemctl start service-name
To stop a service or unit, use the following command:
sudo systemctl stop service-name
Enabling and Disabling Services and Units
To enable a service or unit to start automatically at boot time, use the following command:
sudo systemctl enable service-name
To disable a service or unit from starting automatically at boot time, use the following command:
sudo systemctl disable service-name
Checking the Status of Services and Units
To check the status of a service or unit, use the following command:
sudo systemctl status service-name
This will show you whether the service or unit is currently running or not, and any error messages or other information related to it.
Conclusion
Systemctl is a powerful tool for managing services and units in a systemd-based Linux system. By using the commands in this tutorial, you can start, stop, enable, disable, and check the status of services and units with ease.
Keywords: systemctl, systemd, services, units, Linux, tutorial, start, stop, enable, disable, status.
Комментарии
Отправить комментарий