The Wayback Machine - https://web.archive.org/web/20240913182619/https://www.geeksforgeeks.org/what-is-init-d-in-linux-service-management/
Open In App

What is init.d in Linux Service Management?

Last Updated : 16 Jun, 2022
Summarize
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

In Linux there are several services that can be started and stopped manually in the system, some of their services are ssh, HTTP, tor, apache, etc. To start and run these services we used to simply type 

service "service name" start/stop/status/restart

Example:  

service ssh start

And to check if this service is running we type the command  

service ssh status

In this simple manner, we are using service management in Linux but what actually happens, and how does it actually work in the background. 

What is init.d?

All these service works on several scripts and these scripts are stored in /etc/init.d location, this init.d is a daemon which is the first process of the Linux system. Then other processes, services, daemons, and threads are started by init. So init.d is a configuration database for the init process. Now let’s check some daemon scripts by printing some processes, a daemon script holds functions like start, stop, status, and restart. Let’s check ssh as an example. 

cat /etc/init.d/ssh

Output: 

daemon script of ssh command

Now to you know about the daemon script let’s also check what is inside of init.d directory, to do this we will simply list out all the fines inside the location 

ls /etc/init.d/

Output: 

inside of directory of location

 

How to Use init.d in Service Management?

We used to type simple command service ssh start. But now, in this case, we will do it the other way which is also simple.  

/etc/init.d/ssh start

and the same way you can stop  

/etc/init.d/ssh stop

stopping ssh process management



Similar Reads

init command in Linux with examples
init is parent of all Linux processes with PID or process ID of 1. It is the first process to start when a computer boots up and runs until the system shuts down. init stands for initialization. In simple words the role of init is to create processes from script stored in the file /etc/inittab which is a configuration file which is to be used by in
2 min read
Systemd vs Init Cheatsheet for Linux
Systemd is the new init framework, beginning with Fedora and presently embraced in numerous circulations like RedHat, Suse, and Centos. All things considered, the vast majority of us have been utilizing conventional SysV init scripts typically living in/and so on/rc.d/init.d/. These contents conjure a daemon parallel which will then, at that point,
3 min read
Service Boot Persistence in Linux
In many cases you need to work with service boot persistence in Linux, which means all those services like ssh, HTTP is started automatically when you boot the system. The best example of the need for this service is when you are installing a remote Linux server which will be accessed using ssh. When you boot the system these services are automatic
1 min read
How to Restart a Service in Linux?
Everything which is executed or is running on a Linux machine is linked to a service. In many cases, we come across situations when we have to restart those services. Those situations could be like service is using too much RAM memory or consuming a lot of CPU or the service is malfunctioning or could be any other situation for testing purposes. So
2 min read
Linux - Network Information Service
The Network Information Service, or NIS (initially called YP or yellow pages), is a mainframe-client index service convention for circulating server configuration information, for example, client and host names between PCs on a PC network. Sun Microsystems built up the NIS; the innovation is authorized to essentially all other Unix merchants. Since
8 min read
Impulse - Denial service toolkit in Kali Linux
Impulse is a modern Denial service toolkit available on GitHub. You must ensure that always install the latest version of Impulse from GitHub in order to not to stuck with the working of the tool. This tool is used to perform call and SMS bombing on the target phone numbers. This is the best tool for performing pranks on someone. This tool is writt
2 min read
File Management in Linux
In Linux, most of the operations are performed on files. And to handle these files Linux has directories also known as folders which are maintained in a tree-like structure. Though, these directories are also a type of file themselves. Linux has 3 types of files: Regular Files: It is the common file type in Linux. it includes files like - text file
4 min read
Group Management in Linux
There are 2 categories of groups in the Linux operating system i.e. Primary and Secondary groups. The Primary Group is a group that is automatically generated while creating a user with a unique user ID simultaneously a group with an ID the same as the user ID is created and the user gets added to the group and becomes the first and only member of
4 min read
Process Management in Linux
A process means program in execution. It generally takes an input, processes it and gives us the appropriate output. Check Introduction to Process Management for more details about a process. There are basically 2 types of processes. Foreground processes: Such kind of processes are also known as interactive processes. These are the processes which
3 min read
Kali Linux - File Management
In Kali Linux, most of the operations are performed on files. And to handle these files Kali Linux has directories also known as folders which are maintained in a tree-like structure. Though, these directories are also a type of file themselves. Kali Linux has 3 basic types of files: Regular Files: It is the common file type in Linux. it includes f
4 min read
YUM Commands for Linux Package Management
If you are a Linux user or system administrator, chances are you've come across YUM (Yellowdog Updater, Modified) at some point in your journey. YUM is a powerful package management tool that simplifies the process of installing, updating, and managing software on Red Hat-based Linux distributions like CentOS and Fedora. In this article, we will de
4 min read
Linux Process Management Command Cheat Sheet
On Linux computers there are special commands to control the programs that are running. These commands are called process management commands. With the help of process management commands you can look at the list of the programs that are currently running on your computer. You can also start new programs and run them and stop programs that are alre
6 min read
Debian Software Package Management(dpkg) in Linux
In Linux, there are a lot of different distributions and each of these distributions has a different package type.  For example .rpm or Red hat Package Manager is used as the package in the Linux distribution. A package is the compressed version of the software. In this article, we will go through the Debian package which is used by Ubuntu. D packa
4 min read
Privileged access management (PAM) for linux and unix
In this article, we will learn about the Privileged Access Management (PAM) which is pivotal in safeguarding critical systems and data from unauthorized access. PAM involves the management and governance of privileged accounts and access. Let's dive deep into this article. What is Privileged Access Management (PAM)?Privileged Access Management (PAM
6 min read
How I use Cockpit for my Home's Linux Server Management
Cockpit is a free, open-source, and easy-to-use yet powerful remote manager for Linux servers that allows system administrators to quickly monitor or manage system resources, logs, storage, network, background services, and much more from one central dashboard. You can also access the Linux shell of different Linux servers from the Cockpit web inte
6 min read
Command-Line Tools and Utilities For Network Management in Linux
If you are thinking of becoming a system administrator, or you are already a system admin, then this article is for you. As a system admin, your daily routine will include configuring, maintaining, troubleshooting, monitoring, securing networks, and managing servers within data centers. Network configuration and troubleshooting are some important t
8 min read
User Management in Linux
A user is an entity, in a Linux operating system, that can manipulate files and perform several other operations. Each user is assigned an ID that is unique for each user in the operating system. In this post, we will learn about users and commands which are used to get information about the users. After installation of the operating system, the ID
5 min read
Difference Between Arch Linux and Kali Linux
Arch Linux is an open-source Linux-based Operating System that is freely available for use. It belongs to the Pacman-based Linux family. It is a light weighted OS for daily use and could even be used by professionals. It was first released in March 2002. It is a beginner-friendly Linux Operating System. Features of Arch Linux: Minimalist approach:
4 min read
Neofetch In Linux – Snap cool screenshots of your Linux
Neofetch is a fancy, highly customizable, and aesthetic command-line system information screenshot utility tool. Written in the Bash scripting language, it works inside a terminal window, on triggering up the command it by default displays the operating system, software, and hardware of your system on the right side of the column alongside an ASCII
4 min read
Exodus - Copy Linux Binaries From One Linux System
Exodus is an easy-to-implement program, that is used for bundling dependencies, and also helps to effectively copy Linux ELF binaries from one to another machine securely, and this is very handy when you don't have root access, also if there are issues in the availability of the packages in the Linux distribution, Commonly Server oriented distribut
3 min read
Basic CentOS Linux Commands in linux
CentOS is a free and open-source operating system that aims to provide a stable reliable, and community-supported platform for servers and other enterprise applications. In this article, we will be covering CentOS Linux basics commands and functions of CentOS and also we will look into the advanced commands. These CentOS commands allow you to manag
3 min read
Linux on Azure – Linux Distributions
Azure, the cloud computing platform from Microsoft, offers a playground for deploying and managing your Linux-based operating systems. Think of it as a canvas of boundless resources, security, and scalability, painted onto which you can unleash the boundless creativity and flexibility of Linux. This powerful synergy unlocks a world of opportunity,
10 min read
Restart Network Service on RHEL 9
RHEL 9 (Red Hat Enterprise Linux 9) is a powerful and widely used operating system in enterprise environments, renowned for its stability, security, and performance. In the realm of networking, RHEL 9 offers robust tools and utilities for managing network configurations and services. However, there are occasions where it becomes necessary to restar
4 min read
Implementing Directory Management using Shell Script
Directory management constitutes the functions dealing with organization and maintenance of various directories. Directories usually contain files of any type, but this may vary between file systems. The content of a directory does not affect the directory object itself. Some of the directory functions are: Navigation Absolute/ Relative Pathnames L
3 min read
CMSeeK - Open Source Content Management System Detection and Exploitation Tool
CMSeeK is a free and open-source tool available on GitHub. CMSeeK can detect content management systems such as WordPress, Drupal, Joomla, and Magento CMS, WordPress sensitive files, and WordPress version-related vulnerabilities. CMSeeK uses different modules for doing all the scannings. CMSeeK is a vulnerability scanner tool for content management
2 min read
Linux Virtualization : Resource throttling using cgroups
In Linux Virtualization – Chroot Jail article, we discussed about kernel namespaces and process jailing. To understand this article, you may not need to read the earlier one, but I strongly suggest that you go through it once before diving into resource throttling. It should help tremendously in understanding what's going on. What are cgroups? cgro
9 min read
Kali Linux - Password Cracking Tool
Password cracking is a mechanism that is used in most of the parts of hacking. Exploitation uses it to exploit the applications by cracking their administrator or other account passwords, Information Gathering uses it when we have to get the social media or other accounts of the C.E.O. or other employees of the target organization, Wifi Hacking use
5 min read
select command in Linux with examples
select command in Linux is used to create a numbered menu from which a user can select an option. If the user enters a valid option then it executes the set of command written in select block and then ask again to enter a number, if a wrong option is entered it does nothing. If user enters nothing and simply press 'enter' the option menu gets print
1 min read
XSS-Freak - XSS Scanner Fully Written in Kali Linux
XSS or Cross-Site Scripting is the most emerging security flaw in Web Applications. When the arbitrary or malicious JavaScript is executed by the web application then it is said to be an XSS Vulnerable Website. There are various XSS Scanners through which we can detect the XSS on the target domain. XSS-Freak is an XSS Scanner developed in the Pytho
3 min read
Tracing memory usage in Linux
Memory is a critical resource in computing because its usage affects the performance and stability of a system. It's necessary to trace the memory usage of the system in order to determine the program that consumes all CPU resources or the program that is responsible for slowing down the activities of the CPU. Tracing memory usage also becomes nece
3 min read
Article Tags :