Guests are welcome to view our materials. To subscribe, edit, view raw markup, etc., you'll need to register for an account. Accounts are free (and will always be free) - your involvement helps us directly and indirectly (by demonstrating that our work matters to our funders...)
StartingPoints has more info.
init
init (PID 1)
init is...
- the first user level process started after the kernel has started (i.e. kernel running, device drivers & data structures initialized)
- usually located at
/sbin/init
when
init starts up, it...
- checks filesystems
- cleans up /tmp
- looks for
/etc/inittab file, sets the runlevel as stipulated by the inittab file ( WebHome ), and starts services
- starts
getty ( WebHome ) for each terminal
during normal system operation,
init ...
- adopts all orphan processes (orphans become child of
init)
- restarts
getty for each terminal when a user logs out
you can see this visually by examining the output of the command
pstree which produces a tree of processes, providing parent/child relationships at a glance:
$pstree -p
init(1)─┬─acpid(1984)
├─auditd(20764)─┬─audispd(20766)───{audispd}(20767)
│ └─{auditd}(20765)
├─crond(2176)
├─dbus-daemon(1949)
├─denyhosts.py(11836)
├─httpd(624)─┬─httpd(2973)
│ ├─httpd(7785)
│ ├─httpd(9278)
│ ├─httpd(14645)
│ ├─httpd(14787)
│ ├─httpd(26891)
│ ├─httpd(28084)
│ ├─httpd(28684)
│ ├─httpd(29070)
│ └─httpd(29071)
├─irqbalance(1807)
├─master(974)─┬─pickup(28545)
│ └─qmgr(977)
├─mingetty(2267)
├─mingetty(2268)
├─mingetty(2269)
├─mingetty(2270)
├─mingetty(2271)
├─mingetty(2272)
├─ntpd(10416)
├─python(892)─┬─python(895)
│ ├─python(896)
│ ├─python(897)
│ ├─python(898)
│ ├─python(899)
│ ├─python(900)
│ ├─python(901)
│ └─python(902)
├─rklogd(11154)
├─rsyslogd(11150)───{rsyslogd}(11874)
├─sshd(8412)───sshd(25778)───sshd(25780)───bash(25781)───pstree(32007)
└─udevd(616)
init command
change current runlevel to 5:
init 5
--
RobertSajan - 03 Oct 2008