systemctl Flashcards
systemctl
Help pages 1-2
systemd is a Linux initialization system and service manager that includes features like parallel initialization, on-demand starting of daemons, mount and automount point maintenance, snapshot support, and processes tracking using Linux control groups. systemd provides a logging daemon and other tools and utilities to help with common system administration tasks.
systemctl
Help page 3
systemd is commonly used like:
systemctl start application.service
systemctl stop application.service
systemctl stop application.service
systemctl start application.service
systemctl reload application.service
systemctl status application.service
systemctl restart application.service
systemctl enable application.service
systemctl disable application.service
stop, Stops an application
start, Starts an application
reload, Asks an application to reload its configuration
status, Show terse runtime status information about application
restart, Stops and starts an application
enable, Enables an application by adding symlinks to the units Install directory thus allowing it to start at boot
disable, Disables the application from starting at boot via removing the symlinks
systemctl is-active application.service
systemctl is-enabled application.service
systemctl is-failed application.service
is-active, Returns the current unit state active or inactive, an exit code of 0 will be used for active
is-enabled, Outputs whether a service is enabled or disabled and an exit code of 0 will be used for enabled
is-failed, Checks whether the specified unit is in a failed state, returns an exit code of 0 if it is failed.
systemctl list-units
Lists all active units the systemd knows about.
The output has the following columns:
UNIT: The systemd unit name
LOAD: Whether the unit’s configuration has been parsed by systemd. The configuration of loaded units is kept in memory.
ACTIVE: A summary state about whether the unit is active. This is usually a fairly basic way to tell if the unit has started successfully or not.
SUB: This is a lower-level state that indicates more detailed information about the unit. This often varies by unit type, state, and the actual method in which the unit runs.
DESCRIPTION: A short textual description of what the unit is/does.
systemctl list-units –all
This shows any and all units that have been loaded or attempted to load regardless of their state.