0
0
Linux CLIscripting~5 mins

systemctl for service management in Linux CLI - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is 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.

Click to reveal answer
beginner
How do you start a service named nginx using systemctl?

Use the command systemctl start nginx. This starts the nginx service immediately.

Click to reveal answer
beginner
What does the command systemctl enable apache2 do?

It sets the apache2 service to start automatically when the system boots up.

Click to reveal answer
beginner
How can you check the status of a service called ssh?

Run systemctl status ssh to see if the service is active, inactive, or failed, along with recent logs.

Click to reveal answer
intermediate
What is the difference between systemctl stop and systemctl disable?

systemctl stop stops a service immediately. systemctl disable prevents the service from starting automatically at boot.

Click to reveal answer
Which command starts a service immediately?
Asystemctl start service_name
Bsystemctl enable service_name
Csystemctl status service_name
Dsystemctl disable service_name
What does systemctl status show?
AEnable a service at boot
BStop a running service
CCurrent state and logs of a service
DRestart a service
How do you prevent a service from starting automatically on boot?
Asystemctl enable service_name
Bsystemctl stop service_name
Csystemctl start service_name
Dsystemctl disable service_name
Which command restarts a service?
Asystemctl restart service_name
Bsystemctl status service_name
Csystemctl stop service_name
Dsystemctl enable service_name
If you want to see if a service is active or failed, which command do you use?
Asystemctl enable service_name
Bsystemctl status service_name
Csystemctl disable service_name
Dsystemctl start service_name
Explain how to start, stop, enable, and check the status of a service using systemctl.
Think about the commands you use to control a service's running state and boot behavior.
You got /4 concepts.
    Describe the difference between stopping a service and disabling a service with systemctl.
    Consider what happens now versus what happens on the next reboot.
    You got /4 concepts.