LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-01-2019, 05:47 PM   #1
krishnar
Member
 
Registered: May 2016
Posts: 32

Rep: Reputation: Disabled
Init process


Hi,

Can anyone please guide me how the init process work? I inderstand that first it will read /etc/inittab to find the system run level. What will happen next?

Code:
[krishnar@ip-172-26-5-82]/etc% ll | grep  'init\|rc'
-rw-r--r--  1 root root    2681 Sep 10  2014 bashrc
-rw-r--r--  1 root root    1602 Sep 10  2014 csh.cshrc
drwxr-xr-x  2 root root    4096 Jan 20 02:58 init
lrwxrwxrwx  1 root root      11 Aug 11  2018 init.d -> rc.d/init.d
-rw-r--r--  1 root root     884 Aug 17  2017 inittab
-rw-r--r--  1 root root     942 Jan 12  2010 inputrc
-rw-r--r--  1 root root    8510 Apr  1  2016 nanorc
lrwxrwxrwx  1 root root       7 Aug 11  2018 rc -> rc.d/rc
lrwxrwxrwx  1 root root      10 Aug 11  2018 rc0.d -> rc.d/rc0.d
lrwxrwxrwx  1 root root      10 Aug 11  2018 rc1.d -> rc.d/rc1.d
lrwxrwxrwx  1 root root      10 Aug 11  2018 rc2.d -> rc.d/rc2.d
lrwxrwxrwx  1 root root      10 Aug 11  2018 rc3.d -> rc.d/rc3.d
lrwxrwxrwx  1 root root      10 Aug 11  2018 rc4.d -> rc.d/rc4.d
lrwxrwxrwx  1 root root      10 Aug 11  2018 rc5.d -> rc.d/rc5.d
lrwxrwxrwx  1 root root      10 Aug 11  2018 rc6.d -> rc.d/rc6.d
drwxr-xr-x 10 root root    4096 Aug 11  2018 rc.d
lrwxrwxrwx  1 root root      13 Aug 11  2018 rc.local -> rc.d/rc.local
lrwxrwxrwx  1 root root      15 Aug 11  2018 rc.sysinit -> rc.d/rc.sysinit
Code:
[krishnar@ip-172-26-5-82]/etc% cat inittab | grep -v #
id:3:initdefault:
[krishnar@ip-172-26-5-82]/etc%
Any help would be appreciated!
 
Old 04-01-2019, 05:55 PM   #2
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,732

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
This seems to have lots of good information.
 
Old 04-01-2019, 06:57 PM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,736

Rep: Reputation: 5921Reputation: 5921Reputation: 5921Reputation: 5921Reputation: 5921Reputation: 5921Reputation: 5921Reputation: 5921Reputation: 5921Reputation: 5921Reputation: 5921
Just as a frame of reference what distribution/version are you running. From the output of the inittab i.e. a single line, the init system is upstart and 3 would indicate no GUI so probably RHEL/CentOS 6 or a really old version of Fedora. Except for CentOS 6 and as far as I know no other current distribution still uses upstart.

As posted by searching the internet you can find lots of information on SySV init which explains how the /etc/init.d,/etc/rcX.d directories and K/S start/stop scripts work.

http://www.linux-magazine.com/Online...hat-is-Upstart
https://www.digitalocean.com/communi...-how-to-use-it

http://www.yolinux.com/TUTORIALS/Lin...itProcess.html
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
i wanted to monitor and restart a process if its stopped , by init process , is it possible amal900 Linux - Newbie 3 03-12-2019 08:45 AM
API for current running process details like process name, process id, amount of memory used anki123 Linux - General 1 01-20-2019 02:06 AM
difference between init.rc process and normal process manohar Programming 1 03-31-2011 11:17 PM
What is the exact diff between init 1,init S and init s challavijay Linux - Newbie 1 08-05-2010 06:51 AM
Finding the Process ID of a Process While Initiating the Process senthilmuthiah Linux - Newbie 7 04-02-2009 10:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:19 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration