Service Management Flashcards
Where are the start up scripts/unit files found?
/lib/systemd/system
/etc/system/system is a soft link
What is the command used for service management?
systemctl
Could you elaborate on the different states that services can be in?
Enabled
Disabled
Active
Inactive
Masked
Static
How can all services on a Linux system be listed?
systemctl list-unit-files –type=service –all
What's the method for listing all enabled services in a Linux system?
systemctl list-unit-files –
type=service –state=enabled
How can the count of services in the Linux system be determined?
systemctl list-unit-files –type-service –all | tail -2
How do you obtain the status of a service?
systemctl status <service>
How can we determine whether a service is currently active or not?
systemctl status <service>
or systemctl is-active <service>
What steps are involved in starting a service?
systemctl start <service>
How do you initiate the process of restarting a service?
systemctl restart <service>
What's the procedure for reloading a service?
systemctl reload <service>
How is a service stopped gracefully?
systemctl stop <service>
How can a service be configured to start persistently during system boot?
systemctl enable
<service>
How can you verify whether a service is enabled or disabled?
systemctl status <service> or
systemctl is-enabled <service>
Could you explain the distinctions between restarting and reloading a service?
restart is a combination of stop and start, it gets a new pid, whereas reload is just reading the configuration of the service so the pid stays the same.