How to add a Service to Startup in Ubuntu or CentOS

Very often there is a need to remove or add some service to startup in Linux.

There are different initsystems, but in Ubuntu and CentOS the most common are SysVUpstartand systemd.

Depending on the Linux distribution, the behavior of the service during system startup can be configured using the systemctlor commands chkconfig.

This tutorial shows you how to remove or add a service to startup in the most popular Linux distributions – Ubuntu and CentOS.

Good advice: Do you want to become a DevOps engineer? Then you must know Git! This article will help to really quickly master the basics of Git! Read more →

Ubuntu-16.04

Supported releases: Ubuntu-15.04, 15.10, 16.04, 16.10.

systemd Is a system and services manager in the Linux operating system.

Now it is, by default, used on most Linux distributions and is fully supported in Ubuntu-15.04 and subsequent releases.

It comes with a command-line utility systemctlthat, among other things, allows you to enable and disable services while the system boots.

To find out whether the service is at startup:

Remove service from startup in Ubuntu-16.04:

Add service to startup in Ubuntu-16.04:

Ubuntu-14.04

Supported releases: Ubuntu-9.10, 10.04, 10.10, 11.04, 11.10, 12.04, 12.10, 13.04, 13.10, 14.04, 14.10.

To find out whether the service is at startup:

Remove service from startup in Ubuntu-14.04:

Add service to startup in Ubuntu-14.04:

CentOS-7

systemd Is a system and services manager in the Linux operating system, which becomes the new standard for Linux machines.

In CentOS-7, it replaces Upstartas initthe default system.

systemdIt comes with a command utility systemctlthat is the central control software for systemdwhich, among other things, can turn on and off services during system boot.

Good advice: Learn how to turn off SELinuxtemporarily or on an ongoing basis! Read more →

To find out whether the service is at startup:

Remove the service from startup in CentOS-7:

Add a service to startup in CentOS-7:

CentOS-6

Good advice: Learn how to turn off iptablesin CentOS-6! Read more →

To find out whether the service is at startup:

Remove the service from startup in CentOS-6:
Add a service to startup in CentOS-6:

Authored By Imran Yousaf

I am Imran Yousaf, a computer geek, founder of the site Smashinglab.com. I am a die hard fond of open-source software and Linux operating system. In addition to Linux, I am interested in everything related to information technology and modern science.

Leave a Reply

Your email address will not be published. Required fields are marked *