What Is init.d and How To Use For Service Management In Linux

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/what-is-init-d-and-how-to-use-for-service-management-in-linux/
PINTEREST
PINTEREST
INSTAGRAM

Linux operating systems generally uses boot loader like grub and lilo and than uses init process to start operating system and other services.init is the most important process which forks or creates other process in a Linux system. init.d is init  configuration directory which holds information about the services or daemons.

init.d Location

init.d is located under /etc which is configuration directory for most of the Linux distributions. We can chech the existence of the init.d with the file command like below. It is a directory of course.

init.d Location

init.d Location

Init Daemon

init daemon is the first process of Linux system. Then other processes, services, daemons and threats are started by init . So init.d is a configuration database for init process.

Daemon Script

Now we will print an example daemon process. A daemon script will hold functions like start , stop , restart ,status etc. We will use cron daemon script in this example.

Daemon Script

Daemon Script

List Init.d Contents

There are a lot of different daemon and service scripts in init.d directory. We can list these scripts with the ls command like below.

List Init.d Contents

List Init.d Contents

Init.d Script Usage

We can use these daemon scripts just by calling the like a regular bash script. Lets print some help information by calling script but not providing any option.

and then list the status of the cron daemon which is used for scheduled jobs.

LEARN MORE  How To Use Psexec Tools To Run Commands and Get Shell Remote Windows Systems

Init.d Script Usage

Init.d Script Usage

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/what-is-init-d-and-how-to-use-for-service-management-in-linux/
PINTEREST
PINTEREST
INSTAGRAM

You may also like...

Leave a Reply

Your email address will not be published.

Enjoy this blog? Please spread the word :)