On Systemd Linux systems such as RHEL 8 it is possible to enable and disable services to start on boot with a single systemctl command.

In this tutorial you will learn:
  • How to enable service to start on boot.
  • How to list all services on systemd Linux system.
Using systemclt command to Enable or Disable service to start on Boot with Red Hat Enterprise Linux 8.
Using systemclt command to Enable or Disable service to start on Boot with Red Hat Enterprise Linux 8.

Software Requirements and Conventions Used

Software Requirements and Linux Command Line Conventions
Category Requirements, Conventions or Software Version Used
System Red Hat Enterprise Linux 8
Software N/A
Other Privileged access to your Linux system as root or via the sudo command.
Conventions # - requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
$ - requires given linux commands to be executed as a regular non-privileged user

How to start service on boot with RHEL 8 Linux step by step instructions


SUBSCRIBE TO NEWSLETTER
Subscribe to Linux Career NEWSLETTER and receive latest Linux news, jobs, career advice and tutorials.


  1. 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 command:
    # systemctl list-unit-files --state=disabled
    
    The 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 httpd.service
  2. Use the systemctl command to enable the service in order to start after system boot. Note the suffix .service can be omitted:
    # systemctl enable httpd
    
    In the above example we heave enable the httpd service to start during the system boot.
  3. If you later on decide to disable any service to start on boot use the systemctl command once again as follows:
    # systemctl disable httpd
    
ARE YOU LOOKING FOR A LINUX JOB?
Submit your RESUME, create a JOB ALERT or subscribe to RSS feed on LinuxCareers.com.
LINUX CAREER NEWSLETTER
Subscribe to NEWSLETTER and receive latest news, jobs, career advice and tutorials.
DO YOU NEED ADDITIONAL HELP?
Get extra help by visiting our LINUX FORUM or simply use comments below.

You may also be interested in:



Comments and Discussions