Introduction – The systemd is a service manager for Fedora Linux operating systems. When run as the first process of boot (as PID 1), it acts as init system that brings up and maintains userspace services on Fedora. One can use systemctl command to control the systemd system and service manager on Fedora Linux. This page shows how to display all startup services at boot time in Fedora Linux.
How to list startup services at boot time in Fedora
Open the terminal application. Type the following systemctl command to list running services:
systemctl -t service --state=active
How to list all services on Fedora
systemctl -at service
You can use the following ls command too:
ls /etc/systemd/system/*.service
ls /usr/lib/systemd/system/*.service
How to display all enabled services using systemctl of systemd on Fedora
To list all enabled services in Fedora Linux, type:
systemctl list-unit-files --state=enabled
You can also filter out information using grep command:
systemctl list-unit-files | grep enabled
systemctl | grep running
How do I see if service named sshd enabled at boot time on Fedora?
Try the following syntax:
systemctl is-enabled {service}
systemctl is-enabled sshd.service
Sample outputs:
enabled
How to see if service is running/enabled on Fedora Linux
systemctl status {service}
systemctl status sshd.service
Is sshd service enabled at boot time on my Fedora Linux box?
How do I enable service at boot time?
sudo systemctl enable {service}
sudo systemctl enable sshd.service
How do I disable service at boot time?
sudo systemctl disable {service}
sudo systemctl disable nginx.service
Stop a running service on Fedora Linux
sudo systemctl stop {service}
sudo systemctl stop nginx.service
Start a running service on Fedora Linux
sudo systemctl start {service}
sudo systemctl start nginx.service
Restart a running service on Fedora Linux
sudo systemctl restart {service}
sudo systemctl restart nginx.service
Reload a running service on Fedora Linux
sudo systemctl reload {service}
## edit file ##
sudo vi /etc/nginx/nginx.conf
## reload nginx ##
sudo systemctl reload nginx.service
How to see error messages or logs for given service name on Fedora Linux
journalctl -u {service}
journalctl -u sshd.service
journalctl -u network.service
Sample outputs:
-- Logs begin at Tue 2019-01-08 22:44:44 IST, end at Tue 2019-01-15 01:54:02 IST. -- Jan 09 00:36:41 nixcraft-asus systemd[1]: Starting OpenSSH server daemon... Jan 09 00:36:41 nixcraft-asus sshd[7826]: Server listening on 0.0.0.0 port 22. Jan 09 00:36:41 nixcraft-asus sshd[7826]: Server listening on :: port 22. Jan 09 00:36:41 nixcraft-asus systemd[1]: Started OpenSSH server daemon. Jan 09 00:46:58 nixcraft-asus sshd[8088]: Accepted password for vivek from 192.168.2.18 port 43104 ssh2 Jan 09 00:46:58 nixcraft-asus sshd[8088]: pam_unix(sshd:session): session opened for user vivek by (uid=0) Jan 09 00:48:37 nixcraft-asus sshd[8232]: Connection closed by 192.168.2.18 port 43106 [preauth] Jan 09 00:48:37 nixcraft-asus sshd[8234]: Connection closed by 192.168.2.18 port 43108 [preauth] Jan 09 00:49:12 nixcraft-asus sshd[8241]: Connection closed by authenticating user root 192.168.2.18 port 43110 [preauth] Jan 09 00:49:12 nixcraft-asus sshd[8244]: Connection closed by authenticating user root 192.168.2.18 port 43112 [preauth] Jan 09 00:49:15 nixcraft-asus sshd[8246]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=192.168.2.18 user=root Jan 09 00:49:15 nixcraft-asus sshd[8246]: pam_succeed_if(sshd:auth): requirement "uid >= 1000" not met by user "root" Jan 09 00:49:17 nixcraft-asus sshd[8246]: Failed password for root from 192.168.2.18 port 43114 ssh2 Jan 09 00:49:32 nixcraft-asus sshd[8246]: pam_succeed_if(sshd:auth): requirement "uid >= 1000" not met by user "root" Jan 09 00:49:34 nixcraft-asus sshd[8246]: Failed password for root from 192.168.2.18 port 43114 ssh2 Jan 09 00:51:00 nixcraft-asus sshd[8246]: Connection closed by authenticating user root 192.168.2.18 port 43114 [preauth] Jan 09 00:51:00 nixcraft-asus sshd[8246]: PAM 1 more authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=192.168.2.18 user=root
Conclusion
And there you have it, various systemctl commands to list services at boot time running on Fedora Linux. For more information see this page here.
🐧 1 comment so far... add one ↓
Category | List of Unix and Linux commands |
---|---|
File Management | cat |
Firewall | Alpine Awall • CentOS 8 • OpenSUSE • RHEL 8 • Ubuntu 16.04 • Ubuntu 18.04 • Ubuntu 20.04 |
Network Utilities | dig • host • ip • nmap |
OpenVPN | CentOS 7 • CentOS 8 • Debian 10 • Debian 8/9 • Ubuntu 18.04 • Ubuntu 20.04 |
Package Manager | apk • apt |
Processes Management | bg • chroot • cron • disown • fg • jobs • killall • kill • pidof • pstree • pwdx • time |
Searching | grep • whereis • which |
User Information | groups • id • lastcomm • last • lid/libuser-lid • logname • members • users • whoami • who • w |
WireGuard VPN | Alpine • CentOS 8 • Debian 10 • Firewall • Ubuntu 20.04 |
This page has been updated to include more examples. Please use our forum if you still need help with Fedora or any other Linux-related issues.