Ady Wicaksono Daily Activities

init – the parent of any linux process

leave a comment »

The first application executed by linux after booting is “init”, normally it’s located at /sbin/init, but if not available then kernel linux will try to find /etc/init or /bin/sh if /etc/init not found/corrupted.

you can try execute “pstree” on your linux console:

$ pstree -G
init─┬─bdflush
     ├─crond
     ├─httpd───12*[httpd]
     ├─keventd
     ├─khubd
     ├─6*[kjournald]
     ├─klogd
     ├─kscand/DMA
     ├─kscand/HighMem
     ├─kscand/Normal
     ├─ksoftirqd_CPU0
     ├─ksoftirqd_CPU1
     ├─kswapd
     ├─kupdated
     ├─login───bash
     ├─mdrecoveryd
     ├─5*[mingetty]
     ├─mysqld_safe───mysqld-max
     ├─named
     ├─scsi_eh_0
     ├─scsi_eh_1
     ├─squid───squid─┬─5*[ncsa_auth]
     │               └─unlinkd
     ├─sshd─┬─sshd───sshd───bash───su───bash───su───bash───ps+
     │      └─sshd───sshd
     ├─syslogd
     └─vsftpd

pstree will print tree structure of any running process on your Linux. You see that init is obviously the parent of everything. So, what “init” does?

init will read /etc/inittab and follow any instruction inside this file. For details please read manual init and inittab

Written by adywicaksono

November 3, 2007 at 5:41 pm

Posted in Linux

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: