We relaunched the TWiki.org project with an expanded TWiki charter, and we invite you to participate! The TWiki.org Code of Conduct agreement took effect on 27 Oct 2008. We ask existing twiki.org users to opt-in. You need to opt-in to participate in the Blog, Codev, Plugins and TWiki webs. -- PeterThoeny - 27 Oct 2008
Tags:
create new tag
, view all tags
See BLT.

/etc/inittab: Among other things (?), the /etc/inittab file establishes the runlevels.

Reading the /etc/inittab from your distribution (after installation, presumably) is fairly easy and interesting. For example, in Mandrake 8.1 it lists the available run levels (and allows you to choose the default for start up).

An example /etc/inittab (from http://rowa.giso.de/english/runlevel.html):

/# less /etc/inittab
id:4:initdefault:
r:S:sysinit:/etc/rc.4
l:1:once:/etc/rc.1
f:4:wait:/etc/rc.4
x:5:wait:/etc/rc.5
ca::ctrlaltdel:/etc/rc.6
l0:0:wait:/etc/rc.0
l6:6:wait:/etc/rc.6
c1:45:respawn:/bin/agetty 38400 tty1
c2:45:respawn:/bin/agetty 38400 tty2
c3:45:respawn:/bin/agetty 38400 tty3
c4:45:respawn:/bin/agetty 38400 tty4
c5:45:respawn:/bin/agetty 38400 tty5
c6:45:respawn:/bin/agetty 38400 tty6

Here is some explanation of the format of a line in /etc/inittab:

ID:Runlevel:Action:Process

ID: is an identifier for the process. (I think that these identifiers might determine the order in which specific processes are started, but I might be confusing this with something else.)

Runlevel: specifes the runlevel(s) in which this process starts.

Action: is the command passed to the script which starts the process. Here are some possible values:

  • initdefault: The default startup runlevel??
  • sysinit: Start this process as part of the system startup, before any user processes start.
  • wait: Don't start this process until the previous processes are fully started??
  • ctrlaltdel: Defines a process to be run on the "three finger salute activate (<Ctrl> <Alt> <del>).
  • respawn: Indicates a process which is to be restarted if it is shut down. (Like the virtual terminals, getty 1 thru 6.)

Note that rc.0, rc.1, etc, are scripts to be executed at the transition from one runlevel to another. They stop (and start?) processes as appropriate.

Contributors

  • RandyKramer - 22 Jan 2002
  • <If you edit this page, add your name here, move this to the next line>
Topic revision: r4 - 05 Feb 2002 - 21:07:07 - RandyKramer
Wikilearn.SlashEtcSlashInittab moved from Wikilearn.FileEtcInittab on 05 Feb 2002 - 21:07 by RandyKramer - put it back
 
TWIKI.NET
Copyright © 1999-2008 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback
See TWiki's New Look