Last updated on October 2, 2020 by Dan Nanni
There are so-called startup services in Linux which are set to launch automatically when a Linux system boots up. Such startup services include basic system configurations (e.g., networking, security modules, hardware peripherals), as well as various add-on services (e.g., NFS, MySQL, VPN, rsync), which all are needed for a particular Linux system to operate as expected.
In this tutorial, I will describe how to check what startup services are enabled on boot in Linux.
rcconf
A command-line utility called rcconf
is a runlevel configuration tool for Debian-based systems. Using rcconf
, you can check a list of available startup scripts/services, and enable/disable a particular service as you wish.
To install and start rcconf
on Ubuntu or Debian:
$ sudo apt-get install rcconf $ sudo rcconf
On Ubuntu, run the following command in addition, if you see an error saying "rcconf needs dialog or whiptail."
$ sudo ln -s /bin/whiptail /usr/bin/whiptail
Screenshot of rcconf
:
sysv-rc-conf
sysv-rc-conf
is another runlevel configuration tool for Debian-based systems.
To install and launch sysv-rc-conf
on Ubuntu or Debian:
$ sudo apt-get install sysv-rc-conf $ sudo sysv-rc-conf
Screenshot of sysv-rc-conf
:
bum
If you are using Debian/Ubuntu desktop system, you can use bum
(Boot-Up Manager), a GUI-based runlevel configuration tool.
To install and launch bum
:
$ sudo apt-get install bum $ sudo bum
Screenshot of bum
:
ntsysv
In RedHat-based systems, you can use ntsysv
, an ncurses
-based utility, to find and configure startup services.
To install and launch ntsysv
on CentOS, Fedora or RHEL:
$ sudo yum install ntsysv $ sudo ntsysv
Optionally, you can specify one or more runlevels with --level
option in order to check particular runlevel(s). For example, to check runlevels 3, 4, and 5:
$ sudo ntsysv --level 345
Screenshot of ntsysv
:
If you are using RedHat-based desktop system, you can use a GUI program called system-config-services
.
To install and launch system-config-services
on RedHat-based systems:
$ sudo yum install system-config-services $ system-config-services
Screenshot of system-config-services
:
A built-in system command called chkconfig
can also show you startup services that are available on RedHat-based systems. To find a list of currently active startup services, run the following:
$ chkconfig --list | grep $(runlevel | awk '{ print $2 }'):on
NetworkManager 0:off 1:off 2:on 3:on 4:on 5:on 6:off atd 0:off 1:off 2:off 3:on 4:on 5:on 6:off auditd 0:off 1:off 2:on 3:on 4:on 5:on 6:off crond 0:off 1:off 2:on 3:on 4:on 5:on 6:off cups 0:off 1:off 2:on 3:on 4:on 5:on 6:off iptables 0:off 1:off 2:on 3:on 4:on 5:on 6:off lvm2-monitor 0:off 1:on 2:on 3:on 4:on 5:on 6:off mdmonitor 0:off 1:off 2:on 3:on 4:on 5:on 6:off messagebus 0:off 1:off 2:on 3:on 4:on 5:on 6:off netfs 0:off 1:off 2:off 3:on 4:on 5:on 6:off network 0:off 1:off 2:on 3:on 4:on 5:on 6:off portreserve 0:off 1:off 2:on 3:on 4:on 5:on 6:off postfix 0:off 1:off 2:on 3:on 4:on 5:on 6:off rsyslog 0:off 1:off 2:on 3:on 4:on 5:on 6:off sshd 0:off 1:off 2:on 3:on 4:on 5:on 6:off udev-post 0:off 1:on 2:on 3:on 4:on 5:on 6:off
Note that on Fedora, chkconfig
output does not include native systemd services (e.g., Network Manager), since configuration of systemd services is done separately.
This website is made possible by minimal ads and your gracious donation via PayPal or credit card
Please note that this article is published by Xmodulo.com under a Creative Commons Attribution-ShareAlike 3.0 Unported License. If you would like to use the whole or any part of this article, you need to cite this web page at Xmodulo.com as the original source.
Xmodulo © 2021 ‒ About ‒ Write for Us ‒ Feed ‒ Powered by DigitalOcean