0
0
Linux CLIscripting~5 mins

Startup and init systems (systemd) in Linux CLI - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is systemd in Linux?
systemd is a system and service manager for Linux. It starts and manages system services during boot and while the system runs.
Click to reveal answer
beginner
What is a unit in systemd?
A unit is a configuration file that describes a service, socket, device, or other resource that systemd manages.
Click to reveal answer
beginner
How do you check the status of a service named nginx using systemd?
Use the command systemctl status nginx to see if the service is running and its recent logs.
Click to reveal answer
beginner
What command enables a service to start automatically at boot with systemd?
Use systemctl enable <service-name> to make a service start automatically when the system boots.
Click to reveal answer
intermediate
What is the difference between systemctl start and systemctl enable?
systemctl start runs the service immediately. systemctl enable sets the service to start automatically at boot time.
Click to reveal answer
Which command shows the current running services managed by systemd?
Aservice --status-all
Bsystemctl list-units --type=service
Cinitctl list
Dchkconfig --list
What file extension do systemd unit files usually have?
A.init
B.conf
C.service
D.sh
How do you reload systemd manager configuration after editing a unit file?
Asystemctl daemon-reload
Bsystemctl restart
Csystemctl reload
Dsystemctl refresh
Which command stops a running service immediately?
Asystemctl pause <service>
Bsystemctl disable <service>
Csystemctl kill <service>
Dsystemctl stop <service>
What does systemctl is-enabled <service> check?
AIf the service is set to start at boot
BIf the service is currently running
CIf the service is installed
DIf the service is masked
Explain how systemd manages services during system startup and how you can control them.
Think about how your computer starts apps automatically and how you can turn them on or off.
You got /5 concepts.
    Describe the steps to create a new systemd service and make it start automatically.
    Imagine setting up a new app to run when your computer boots.
    You got /5 concepts.