Ubuntu – How to change default runlevel of Ubuntu (lucid)

runlevelUbuntu

I have Ubuntu lucid on my home computer. Today I was experimenting with runlevels and I couldn't figure out how to change the default run level of Ubuntu. I can do that using /etc/inittab on Debian 504 but that file is not there in Ubuntu. I have searched on the web but couldn't figure out the answer.

Thanks in advance.

Best Answer

As per man inittab:

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.

If you look into /etc/init/rc-sysinit.conf you should find a line similar to this:

# Default runlevel, this may be overriden on the kernel command-line
# or by faking an old /etc/inittab entry
env DEFAULT_RUNLEVEL=2

Either change this or use manually generated /etc/inittab.