Welcome to Linux Knowledge Base and Tutorial
"The place where you learn linux"

 Create an AccountHome | Submit News | Your Account  

Tutorial Menu
Linux Tutorial Home
Table of Contents

· Introduction to Operating Systems
· Linux Basics
· Working with the System
· Shells and Utilities
· Editing Files
· Basic Administration
· The Operating System
· The X Windowing System
· The Computer Itself
· Networking
· System Monitoring
· Solving Problems
· Security
· Installing and Upgrading
· Linux and Windows

Man Pages
Linux Topics
Test Your Knowledge

Site Menu
Site Map
Copyright Info
Terms of Use
Privacy Info
Masthead / Impressum
Your Account

Private Messages

News Archive
Submit News
User Articles
Web Links


The Web

Who's Online
There are currently, 73 guest(s) and 0 member(s) that are online.

You are an Anonymous user. You can register for free by clicking here




       The inittab file describes which processes are started  at
       bootup and during normal operation (e.g. /etc/init.d/boot,
       /etc/init.d/rc, gettys...).  Init(8) distinguishes  multi­
       ple  runlevels, each of which can have its own set of pro­
       cesses that are started.  Valid runlevels are 0-6 plus  A,
       B,  and  C  for ondemand entries.  An entry in the inittab
       file has the following format:


       Lines beginning with `#' are ignored.

       id     is a unique sequence of 1-4 characters which  iden­
              tifies   an  entry  in  inittab  (for  versions  of
              sysvinit compiled with libraries < 5.2.18 or  a.out
              libraries the limit is 2 characters).

              Note:  For  gettys or other login processes, the id
              field should be the tty suffix of the corresponding
              tty,   e.g.  1  for  tty1.   Otherwise,  the  login
              accounting might not work correctly.

              lists the runlevels for which the specified  action
              should be taken.

       action describes which action should be taken.

              specifies  the process to be executed.  If the pro­
              cess field starts with a `+' character,  init  will
              not  do  utmp and wtmp accounting for that process.
              This is needed for  gettys  that  insist  on  doing
              their  own  utmp/wtmp housekeeping.  This is also a
              historic bug.

       The runlevels field may contain  multiple  characters  for
       different  runlevels.  For example, 123 specifies that the
       process should be started in runlevels 1, 2, and  3.   The
       runlevels  for ondemand entries may contain an A, B, or C.
       The runlevels field of sysinit, boot, and bootwait entries
       are ignored.

       When the system runlevel is changed, any running processes
       that are not specified for the new  runlevel  are  killed,
       first with SIGTERM, then with SIGKILL.

       Valid actions for the action field are:

              The process will be executed  during  system  boot,
              while   init   waits   for  its  termination  (e.g.
              /etc/rc).  The runlevels field is ignored.

       off    This does nothing.

              A process marked with an ondemand runlevel will  be
              executed  whenever  the specified ondemand runlevel
              is called.  However, no runlevel change will  occur
              (ondemand runlevels are `a', `b', and `c').

              An  initdefault  entry specifies the runlevel which
              should be  entered  after  system  boot.   If  none
              exists,  init  will  ask for a runlevel on the con­
              sole. The process field is ignored.

              The process will be executed during system boot. It
              will  be  executed  before  any  boot  or  bootwait
              entries.  The runlevels field is ignored.

              The process will be executed when  the  power  goes
              down. Init is usually informed about this by a pro­
              cess talking to a UPS connected  to  the  computer.
              Init  will  wait  for  the process to finish before

              As for powerwait, except that init  does  not  wait
              for the process's completion.

              This  process  will  be executed as soon as init is
              informormed that the power has been restored.

              This process will be executed  when  init  is  told
              that  the  battery  of  the  external UPS is almost
              empty and the power is failing (provided  that  the
              external UPS and the monitoring process are able to
              detect this condition).

       resume This process will be executed when init is told  by
              the  kernel  that  Software Suspend has resumed the
              machine. This way you may specify userland programs
              what  can restore hardware states the kernel cannot
              (for example svgatextmode and hdparm).

              x.xx packages (most recent was kbd-0.94 at the time
              of this writing). Basically you want  to  map  some
              keyboard   combination   to   the  "KeyboardSignal"
              action. For example, to map  Alt-Uparrow  for  this
              purpose use the following in your keymaps file:

              alt keycode 103 = KeyboardSignal


       This  is  an  example of a inittab which resembles the old
       Linux inittab:

              # inittab for linux
              1:1:respawn:/etc/getty 9600 tty1
              2:1:respawn:/etc/getty 9600 tty2
              3:1:respawn:/etc/getty 9600 tty3
              4:1:respawn:/etc/getty 9600 tty4

       This inittab file executes /etc/rc during boot and  starts
       mingettys on tty1-tty4.

       A more elaborate inittab with different runlevels (see the
       comments inside):

              # runlevel 0  is  System halt   (Never use this as initdefault!)
              # runlevel 1  is  Single user mode
              # runlevel 2  is  Local multiuser without remote network (e.g. NFS)
              # runlevel 3  is  Full multiuser with network
              # runlevel 4  is  Not used
              # runlevel 5  is  Full multiuser with network and xdm
              # runlevel 6  is  System reboot (Never use this as initdefault!)
              l0:0:wait:/etc/init.d/rc 0
              l1:1:wait:/etc/init.d/rc 1
              l2:2:wait:/etc/init.d/rc 2
              l3:3:wait:/etc/init.d/rc 3
              #l4:4:wait:/etc/init.d/rc 4
              l5:5:wait:/etc/init.d/rc 5
              l6:6:wait:/etc/init.d/rc 6

              # What to do at the "3 finger salute".
              ca::ctrlaltdel:/sbin/shutdown -t5 -rf now

              # Runlevel 2 upto 5: mingetty on console.
              # level 2, 3, and 5 also getty on serial port S0.
              1:2345:respawn:/sbin/mingetty --noclear tty1
              2:2345:respawn:/sbin/mingetty tty2
              3:2345:respawn:/sbin/mingetty tty3
              4:2345:respawn:/sbin/mingetty tty4
              5:2345:respawn:/sbin/mingetty tty5
              6:2345:respawn:/sbin/mingetty tty6
              S0:235:respawn:/sbin/agetty -L 9600 ttyS0 vt102

              # modem getty(s),
              # /dev/modem is a link to the modem device.
              #mo:235:respawn:/usr/sbin/mgetty -s 38400 modem
              mo:235:respawn:/sbin/uugetty modem M19200




       Init   was   written    by    Miquel    van    Smoorenburg
       (miquels@cistron.nl).   This  manual  page  was written by
       Sebastian    Lederer     (lederer@francium.informatik.uni-
       bonn.de)     and     modified     by     Michael    Haardt


       init(8), telinit(8), init.d(7), agetty(8), mgetty(8)


Looking for a "printer friendly" version?



Security Code
Security Code
Type Security Code

Don't have an account yet? You can create one. As a registered user you have some advantages like theme manager, comments configuration and post comments with your name.

Help if you can!

Amazon Wish List

Did You Know?
The Linux Tutorial welcomes your suggestions and ideas.


Tell a Friend About Us

Bookmark and Share

Web site powered by PHP-Nuke

Is this information useful? At the very least you can help by spreading the word to your favorite newsgroups, mailing lists and forums.
All logos and trademarks in this site are property of their respective owner. The comments are property of their posters. Articles are the property of their respective owners. Unless otherwise stated in the body of the article, article content (C) 1994-2013 by James Mohr. All rights reserved. The stylized page/paper, as well as the terms "The Linux Tutorial", "The Linux Server Tutorial", "The Linux Knowledge Base and Tutorial" and "The place where you learn Linux" are service marks of James Mohr. All rights reserved.
The Linux Knowledge Base and Tutorial may contain links to sites on the Internet, which are owned and operated by third parties. The Linux Tutorial is not responsible for the content of any such third-party site. By viewing/utilizing this web site, you have agreed to our disclaimer, terms of use and privacy policy. Use of automated download software ("harvesters") such as wget, httrack, etc. causes the site to quickly exceed its bandwidth limitation and are therefore expressly prohibited. For more details on this, take a look here

PHP-Nuke Copyright © 2004 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.09 Seconds