Auto-start Services on Boot in Linux

CentOS6

  1. Show the list of services that start on boot.

    1
    chkconfig --list
  2. Add a service to auto-start on boot.

    1
    2
    chkconfig --add service_name
    chkconfig service_name on
  3. Confirm script is added successfully

    1
    chkconfig --list service_name
  4. Disable an auto-start service.

    1
    2
    chkconfig service_name off
    chkconfig --del service_name

CentOS7

  1. Add a service to auto-start on boot.

    1
    systemctl enable service_name
  2. Disable an auto-start service.

    1
    systemctl disable service_name
  3. Check the status of auto-start service.

    1
    systemctl status service_name