Managing Services with systemd in Linux


 Introduction

Services (also called daemons) are background processes that start at boot or run when needed. In modern Linux systems, systemd is the standard tool for managing these services.


Step 1: Check Service Status


systemctl status service_name


➡️ Replace service_name (e.g., ssh, apache2) to see if it’s active.


Step 2: Start a Service


sudo systemctl start service_name


Step 3: Stop a Service


sudo systemctl stop service_name


Step 4: Enable Service at Boot


sudo systemctl enable service_name


➡️ This ensures the service starts automatically when the system boots.


Step 5: Disable Service


sudo systemctl disable service_name


Conclusion

With systemd, you can easily manage services, check their status, and control their behavior at boot time.

Comments