system enabled verified medium v1.0.0

systemctl

Control the systemd system and service manager

📋 Live Preview
systemctl -h {help} --version {version} --system {system} --user {user} -C {capsule}
๐Ÿ“Ž help ๐Ÿ“Ž version ๐Ÿ“Ž system ๐Ÿ“Ž user ๐Ÿ“Ž capsule
systemctl -h {help} --version {version} --system {system} --user {user} -C {capsule}

Sandbox: execFile · Timeout: 30s

Capabilities

system.service.systemctl

Parameters

Name Type Required Default Description Aliases
help string No - Show this help -h, --help
version string No - Show package version --version
system string No - Connect to system manager --system
user string No - Connect to user service manager --user
capsule string No - Connect to service manager of specified capsule -C, --capsule
host string No - Set the host parameter -H, --host
machine string No - Set the machine parameter -M, --machine
type string No - List units of a particular type -t, --type
state string No - List units with particular LOAD or SUB or ACTIVE state --state
failed string No - Shortcut for --state=failed --failed
property string No - Show only properties by this name -p, --property
flag-P string No - Equivalent to --value --property=NAME -P
all string No - Show all properties/all units currently in memory -a, --all
full string No - Don't ellipsize unit names on output -l, --full
recursive array No - Show unit list of host and local containers -r, --recursive
reverse string No - Show reverse dependencies with 'list-dependencies' --reverse
before string No - Show units ordered before with 'list-dependencies' --before
after string No - Show units ordered after with 'list-dependencies' --after
with-dependencies S string No - 'list-units', and 'list-unit-files'. --job-mode=MODE Specify how to deal with already queued jobs, when queueing a new job --with-dependencies S
show-transaction string No - --show-types When showing sockets, explicitly show their type --value When showing properties, only print the value --check-inhibitors=MODE Whether to check inhibitors before shutting down, sleepin... -T, --show-transaction
flag-i string No - Shortcut for --check-inhibitors=no -i
signal string No - Which signal to send -s, --signal
kill-whom string No - Whom to send signal to --kill-whom
kill-value integer No - Signal value to enqueue --kill-value
kill-subgroup file No - Send signal to sub-control group only --what=RESOURCES Which types of resources to remove --now Start or stop unit after enabling or disabling it --dry-run Only print what would be done Currently s... --kill-subgroup
quiet string No - Suppress output -q, --quiet
verbose string No - Show unit logs while executing operation -v, --verbose
no-warn string No - Suppress several warnings shown by default --no-warn
wait string No - For (re)start, wait until service stopped again --wait
no-block string No - Do not wait until operation finished --no-block
boot-loader-menu number No - Boot into boot loader menu on next boot --boot-loader-entry=NAME Boot into a specific boot loader entry on next boot --reboot-argument=ARG Specify argument string to pass to reboot() --plain Print unit dependencies as a list instead of a tree --timestamp=FORMAT Change format of printed timestamps (pretty, unix, us, utc, us+utc) --read-only Create read-only bind mount --mkdir Create directory before mounting, if missing --marked Restart/reload previously marked units --drop-in=NAME Edit unit files using the specified drop-in file name --when=TIME Schedule halt/power-off/reboot/kexec action after a certain timestamp --stdin Read new contents of edited file from stdin --boot-loader-menu
boot_loader_entry boolean No - --boot-loader-entry
check_inhibitors boolean No - --check-inhibitors
drop_in boolean No - Edit unit files using the specified drop-in file name --drop-in
dry_run boolean No - Only print what would be done --dry-run
firmware-setup string No - Tell the firmware to show the setup menu on next boot --firmware-setup
force string No - When enabling unit files, override existing symlinks -f, --force
global string No - Edit/enable/disable/mask default user unit files --global
image file No - Edit/enable/disable/mask unit files in the specified --image
image-policy string No - Specify disk image dissection policy --image-policy
job_mode boolean No - Specify how to deal with already queued jobs, when --job-mode
legend string No - Enable/disable the legend (column headers and hints) --legend
lines integer No - Number of journal entries to show -n, --lines
marked boolean No - Restart/reload previously marked units --marked
message string No - Specify human-readable reason for system shutdown --message
mkdir boolean No - Create directory before mounting, if missing --mkdir
no-ask-password string No - Do not ask for system passwords --no-ask-password
no-pager string No - Do not pipe output into a pager --no-pager
no-reload string No - Don't reload daemon after en-/dis-abling unit files --no-reload
no-wall string No - Don't send wall message before halt/power-off/reboot --no-wall
now boolean No - Start or stop unit after enabling or disabling it --now
output string No - Change journal output mode (short, short-precise -o, --output
plain boolean No - Print unit dependencies as a list instead of a tree --plain
preset-mode string No - Apply only enable, only disable, or all presets --preset-mode
read_only boolean No - Create read-only bind mount --read-only
reboot_argument boolean No - --reboot-argument
root file No - Edit/enable/disable/mask unit files in the specified --root
runtime string No - Edit/enable/disable/mask unit files temporarily until --runtime
show_types boolean No - When showing sockets, explicitly show their type --show-types
stdin boolean No - Read new contents of edited file from stdin --stdin
value boolean No - When showing properties, only print the value --value
what boolean No - Which types of resources to remove --what
when boolean No - /reboot/kexec action after --when, -off

Examples

Basic usage with help

systemctl ${help}

Display help message

systemctl --help

Show only a given value from one of the `show` keys. In this example, the value for the `ActiveState` key for the UFW service will be shown, and only it; ideal for scripting. Using the `--value` flag causes only the value to be displayed.

systemctl show -p ActiveState --value ufw

Start, stop, or restart a given service(s).

systemctl [start|stop|restart] [SERVICE]

Check if a given service(s) is active. If it is, 'active' will display. An exit status of 0 will be given if it's active, and non-zero otherwise. Use the `-q` or `--quiet` flag to rely only on the exit status.

systemctl is-active ufw

Check if a given service(s) has failed. If it is, 'failed' will display. An exit status of 0 will be given if it has failed, and non-zero otherwise. Use the `-q` or `--quiet` flag to rely only on the exit status.

systemctl is-active ufw

Check if a given service(s) is enabled. If it is, 'enabled' will display. An exit status of 0 will be given if it's enabled, and non-zero otherwise. Use the `-q` or `--quiet` flag to rely only on the exit status.

systemctl is-enabled ufw

List all failed services.

systemctl --failed

Shut the system down. Use `suspend` to suspend, `halt` to halt, and `reboot` to instead of reboot the machine.

systemctl poweroff

Enable or disable a given service(s).

systemctl [enable|disable] [SERVICE]

Show the current status of a given service(s).

systemctl status [SERVICE]

Documentation

systemctl โ€” Control the systemd system and service manager

Overview

systemctl is a command-line utility for control the systemd system and service manager.

Usage

systemctl -h {help} --version {version} --system {system} --user {user} -C {capsule}

Related Tools

system-service-journalctl