How To List Services That Started on Booot in Fedora Linux

This post will guide you how to list all services that start on startup in your Fedora Linux. How do I list startup services at boot time using systemctl command from the command line in Fedora Linux.

list services that started on boot1

Systemctl Command


systemctl may be used to introspect and control the state of the “systemd” system and service manager. systemd is a system and service manager for Linux operating systems. When run as first process on boot (as PID 1),it acts as init system that brings up and maintains userspace services.

The syntax of the Systemctl command is as follows:

systemctl [OPTIONS...] COMMAND [UNIT...]

List All Services


If you want to list all services on your Fedora system, and you can pass the “-at” option to the systemctl command, type:

$ systemctl -at service

Outputs:

[root@localhost /]# systemctl -at service
UNIT LOAD ACTIVE SUB DESCRIPTION
abrt-ccpp.service loaded inactive dead Install ABRT coredump hook
abrt-journal-core.service loaded active running Creates ABRT problems from coredumpctl m
abrt-oops.service loaded active running ABRT kernel log watcher
abrt-vmcore.service loaded inactive dead Harvest vmcores for ABRT
abrt-xorg.service loaded active running ABRT Xorg log watcher
abrtd.service loaded active running ABRT Automated Bug Reporting Tool
accounts-daemon.service loaded active running Accounts Service
alsa-restore.service loaded inactive dead Save/Restore Sound Card State
alsa-state.service loaded active running Manage Sound Card State (restore and sto
● apparmor.service not-found inactive dead apparmor.service
atd.service loaded active running Deferred execution scheduler
auditd.service loaded active running Security Auditing Service
auth-rpcgss-module.service loaded inactive dead Kernel Module supporting RPCSEC_GSS
● autofs.service not-found inactive dead autofs.service
avahi-daemon.service loaded active running Avahi mDNS/DNS-SD Stack
bolt.service loaded active running Thunderbolt system service
chronyd.service loaded active running NTP client/server
colord.service loaded active running Manage, Install and Generate Color Profi
crond.service loaded active running Command Scheduler
cups.service loaded active running CUPS Scheduler
dbus-:1.9-org.freedesktop.problems@0.service loaded active running dbus-:1.9-org.freedesktop.problems@0.ser
dbus-broker.service loaded active running D-Bus System Message Bus
dkms.service loaded active exited Builds and install new kernel modules th
dm-event.service loaded inactive dead Device-mapper event daemon
dnf-makecache.service loaded inactive dead dnf makecache
dracut-cmdline.service loaded inactive dead dracut cmdline hook
dracut-initqueue.service loaded inactive dead dracut initqueue hook
......

List All Running Services


If you want to list all running services in your current Fedora system, and you can pass both “-t” and “–state” to the systemctl command, type:

$ systemctl -t service --state=active

Outputs:

[root@localhost /]# systemctl -t service --state=active
UNIT LOAD ACTIVE SUB DESCRIPTION
abrt-journal-core.service loaded active running Creates ABRT problems from coredumpctl messages
abrt-oops.service loaded active running ABRT kernel log watcher
abrt-xorg.service loaded active running ABRT Xorg log watcher
abrtd.service loaded active running ABRT Automated Bug Reporting Tool
accounts-daemon.service loaded active running Accounts Service
alsa-state.service loaded active running Manage Sound Card State (restore and store)
atd.service loaded active running Deferred execution scheduler
auditd.service loaded active running Security Auditing Service
avahi-daemon.service loaded active running Avahi mDNS/DNS-SD Stack
bolt.service loaded active running Thunderbolt system service
chronyd.service loaded active running NTP client/server
colord.service loaded active running Manage, Install and Generate Color Profiles
crond.service loaded active running Command Scheduler
cups.service loaded active running CUPS Scheduler
......

List All Enabled Services Started at Boot Time


If you want to list all enabled services started at boot time in your Fedora system, and you can type the following systemctl command, type:

$ systemctl list-unit-files --state=enabled

Outputs:

[root@localhost /]# systemctl list-unit-files --state=enabled
UNIT FILE STATE
cups.path enabled
abrt-journal-core.service enabled
abrt-oops.service enabled
abrt-vmcore.service enabled
abrt-xorg.service enabled
abrtd.service enabled
accounts-daemon.service enabled
atd.service enabled
auditd.service enabled
autovt@.service enabled
avahi-daemon.service enabled
......

Checking If a Specified Service Enabled or Not


If you want to check a given service name if it is enabled or not in your system, and you can also use systemctl command with its subcommand “is-enabled“, type:

$ systemctl is-enabled serviceName
$ systemctl is-enabled firewalld.service

Outputs:

[root@localhost /]# systemctl is-enabled firewalld.service
enabled

Checking Service Status


if you want to check the status of a given service, and you can use systemctl status command with service name, type:

$ systemctl status serviceName
$ systemctl status firewalld.service

Outputs:

[root@localhost /]# systemctl status firewalld.service
 firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2019-09-27 13:53:26 CST; 29min ago
Docs: man:firewalld(1)
Main PID: 714 (firewalld)
Tasks: 2 (limit: 1793)
Memory: 14.8M
CGroup: /system.slice/firewalld.service
└─714 /usr/bin/python3 /usr/sbin/firewalld --nofork --nopid

Sep 27 13:53:19 localhost.localdomain systemd[1]: Starting firewalld - dynamic firewall daemon...
Sep 27 13:53:26 localhost.localdomain systemd[1]: Started firewalld - dynamic firewall daemon.

Enabling a Service


If you want to enable a service started at system boot in your fedora system, and you can type the following command:

$ systemctl enable serviceName
$ systemctl enable firewalld.service

Outputs:

[root@localhost /]# systemctl enable firewalld.service
Created symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service → /usr/lib/systemd/system/firewalld.service.
Created symlink /etc/systemd/system/multi-user.target.wants/firewalld.service → /usr/lib/systemd/system/firewalld.service.

Disabling a Service


If you want to disable a enabled service from the command line in your system, and you can type the following command:

$ sudo systemctl disable serviceName
$ sudo systemctl disable firewalld.service

outputs:

[root@localhost /]# systemctl disable firewalld.service
Removed /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
Removed /etc/systemd/system/multi-user.target.wants/firewalld.service.

Starting a Service


To start a service at the shell prompt in your system, and you can use the following systemctl command, type:

$ sudo systemctl start serviceName

Stopping a Service


If you want to stop a running serivce called firewalld.serice,and you can type the following systemctl command: type:

$ sudo systemctl stop firewalld.service

Outputs:

[root@localhost /]# systemctl stop firewalld.service
[root@localhost /]# systemctl status firewalld.service
 firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
Active: inactive (dead) since Fri 2019-09-27 14:28:19 CST; 9s ago
Docs: man:firewalld(1)
Process: 714 ExecStart=/usr/sbin/firewalld --nofork --nopid $FIREWALLD_ARGS (code=exited, status=0/SUCCESS)
Main PID: 714 (code=exited, status=0/SUCCESS)

Sep 27 13:53:19 localhost.localdomain systemd[1]: Starting firewalld - dynamic firewall daemon...
Sep 27 13:53:26 localhost.localdomain systemd[1]: Started firewalld - dynamic firewall daemon.
Sep 27 14:28:19 localhost systemd[1]: Stopping firewalld - dynamic firewall daemon...
Sep 27 14:28:19 localhost systemd[1]: firewalld.service: Succeeded.
Sep 27 14:28:19 localhost systemd[1]: Stopped firewalld - dynamic firewall daemon.

If you want to get more info about systemctl command, and you can check its manual page by the following command:

$ man systemctl

Or

$ systemctl --help

Outputs:

[root@localhost /]# systemctl --help
systemctl [OPTIONS...] {COMMAND} ...

Query or send control commands to the systemd manager.

-h --help Show this help
--version Show package version
--system Connect to system manager
--user Connect to user service manager
-H --host=[USER@]HOST
Operate on remote host
-M --machine=CONTAINER
Operate on local container
-t --type=TYPE List units of a particular type
--state=STATE List units with particular LOAD or SUB or ACTIVE state
-p --property=NAME Show only properties by this name
-a --all Show all properties/all units currently in memory,
including dead/empty ones. To list all units installed on
the system, use the 'list-unit-files' command instead.
--failed Same as --state=failed
-l --full Don't ellipsize unit names on output
-r --recursive Show unit list of host and local containers
--reverse Show reverse dependencies with 'list-dependencies'
--job-mode=MODE Specify how to deal with already queued jobs, when
queueing a new job
--show-types When showing sockets, explicitly show their type
--value When showing properties, only print the value
-i --ignore-inhibitors
When shutting down or sleeping, ignore inhibitors
--kill-who=WHO Who to send signal to
-s --signal=SIGNAL Which signal to send
--now Start or stop unit in addition to enabling or disabling it
--dry-run Only print what would be done
-q --quiet Suppress output
--wait For (re)start, wait until service stopped again
For is-system-running, wait until startup is completed
--no-block Do not wait until operation finished
--no-wall Don't send wall message before halt/power-off/reboot
--no-reload Don't reload daemon after en-/dis-abling unit files
--no-legend Do not print a legend (column headers and hints)

Conclusion


You should know that how to list all running services or list all enabled serivces with systemctl command in Fedora Linux system.

You might also like:

Sidebar



back to top