systemctl used for in Linux?systemctl is a command-line tool to control and manage system services and the system state on Linux systems using systemd.
nginx using systemctl?Use the command systemctl start nginx. This starts the nginx service immediately.
systemctl enable apache2 do?It sets the apache2 service to start automatically when the system boots up.
ssh?Run systemctl status ssh to see if the service is active, inactive, or failed, along with recent logs.
systemctl stop and systemctl disable?systemctl stop stops a service immediately. systemctl disable prevents the service from starting automatically at boot.
systemctl start starts the service right away. enable only sets it to start on boot.
systemctl status show?systemctl status shows if the service is running and recent log messages.
disable removes the service from automatic startup.
restart stops and then starts the service again immediately.
status shows the current state of the service.