37

I'm on Ubuntu 10.10, and I've just joined the Linux world coming from OS X. I'm learning about runlevels and the rc directory in /etc/, and everywhere (manuals, tutorials, etc) I'm reading about inittab. But I can't find it in my Ubuntu installation. Why? Does Ubuntu follow the runlevel model? How are rc and levels loaded without inittab?

5 Answers 5

28

If you do man inittab in your terminal, all shall be revealed:

   The  /etc/inittab  file was the configuration file used by the original
   System V init(8) daemon.

   The Upstart init(8) daemon does not use this file,  and  instead  reads
   its  configuration  from  files  in  /etc/init.   See  init(5) for more
   details.
5
  • Worth to note, in /usr/share/doc/upstart/README.Debian.gz there is some other info.
    – enzotib
    Apr 10, 2011 at 6:17
  • but upstart keep using /etc/rc.* ?
    – nkint
    Apr 10, 2011 at 10:33
  • @nkint: upstart keep using /etc/rc.* for packages not aware of upstart
    – enzotib
    Apr 10, 2011 at 12:23
  • 9
    No manual entry for inittab on 16.04... (he says, years later)
    – galois
    Jun 23, 2017 at 14:41
  • 2
    Aye, apropos inittab will give nothing, in 16.04 the closest bit of info in the OS itself left seems to be in man runlevel.
    – Jeroen
    Aug 2, 2017 at 20:12
21

Back in the days the "System-V" init service was used in Ubuntu, and it used the /etc/inittab file.

Some time ago (around 2006) the "Upstart" init service replaced SysV. During these days you could follow the top answer and use man inittab to get info on this change.

At the time of writing (e.g. for Ubuntu 16.04) the "systemd" boot process is in use and there is no reference left to "inittab" (e.g. if you do apropos inittab you'll probably not find anything). Instead you could do man runlevel to get similar information.

Bottom line: the /etc/inittab file is nowhere, likely because you use a newer version for Ubuntu that has a different init service, e.g. systemd.

13

While searching this in various forum, I got to know that /etc/inittab is not anymore used in debian distro.

It uses /etc/init/rc-sysinit.conf

1
  • 6
    not present in Ubuntu 18.04 anymore
    – Unicorn
    Nov 23, 2018 at 10:49
6

No, it does not follow the runlevel model. Ubuntu has moved away from sysV init to upstart instead. The main reason for this was to parallelize the initialization process to vastly reduce boot time.

2
3

As most of the answers here state, That Debian/Ubuntu have switched from sysV to systemd, and systemd has it's own way of managing the boot targets (which was called runlevels) here are the commands used to set the default or switching to another target provided by systemctl:

  • systemctl isolate used to switch between targets

    • systemctl isolate multi-user switchs to the multi user target
    • systemctl isolate graphical switchs to the graphical interface target
  • systemctl get-default outputs the current default target

  • systemctl set-default changing the default boot target

    • systemctl set-default multi-user will set the default boot target to the multi user target and this will simple get done by creating a symlink /etc/systemd/system/default.target points to /lib/systemd/system/graphical.target
    • systemctl set-default graphical setting back the default boot target to the graphical interface
  • Resources: amazingly explained by Shawn Powers in this YouTube video

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .