In this tutorial you will learn:
- How to enable service to start on boot.
- How to list all services on systemd Linux system.
Software Requirements and Conventions Used
|Category||Requirements, Conventions or Software Version Used|
|System||Red Hat Enterprise Linux 8|
|Other||Privileged access to your Linux system as root or via the |
|Conventions|| # - requires given linux commands to be executed with root privileges either directly as a root user or by use of |
How to start service on boot with RHEL 8 Linux step by step instructions
- Obtain the service name you wish to enable to start on boot.
There are many ways on how to accomplish this task. Perhaps the simplest solution is to list all currently disabled services using the
# systemctl list-unit-files --state=disabledThe above command will create a long list of disabled services. Scroll through the list to find the service you wish to enable and take a note of the service name. For example
- Use the
systemctlcommand to enable the service in order to start after system boot. Note the suffix
.servicecan be omitted:
# systemctl enable httpdIn the above example we heave enable the
httpdservice to start during the system boot.
- If you later on decide to disable any service to start on boot use the
systemctlcommand once again as follows:
# systemctl disable httpd