UbuntuThis forum is for the discussion of Ubuntu Linux.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Debian, as well as most of the distributions based on it, like Ubuntu, does not make any distinction between runlevels 2 to 5. See also the Debian FAQ on booting.
* 0 - Halt
* 1 - Single
* 2 - Full multi-user with display manager (GUI)
* 3 - Full multi-user with display manager (GUI)
* 4 - Full multi-user with display manager (GUI)
* 5 - Full multi-user with display manager (GUI)
* 6 - Reboot
One way to see what runlevel you are on is to issue the following command as root:
If when you run the above command it says that you are indeed on runlevel 3, then you know that your entry into inittab is being honored. You can change to a different runlevel by using the following command as root:
# telinit 5
This will change your runlevel to 5 by shutting down unnecesary process's and starting up all runlevel 5 process's.
In my example it says that I'm on runlevel 5. According to http://en.wikipedia.org/wiki/Runlevel 2-5 on ubuntu all use a gui. Each defined run level should have an rcX.d directory where X is the run level number. The contents of the /etc/rc2-5.d directories are all the same, so you could customize lets say rc3.d. The contents of the rcX.d directory determines what happens at that runlevel. Because runlevel 3 is not used by default on ubuntu you could go into /etc/rc3.d and change what is loaded. For example the file /etc/rc3.d/S13gdm is used to start your gui. You could test this by temporarily moving the /etc/rc3.d/s13gdm file to another location and rebooting or if you are not already on runlevel 3 by issuing :
# telinit 3
Might be worth a try. Anyway let me know if you have any more questions.
As suggested, runlevel 2 is what you want. And yes, the inittab will be found and used.
It's a PITA for a few of us I suspect. IMHO the Ubuntu devs need their collective arses kicked for this and a few other decisions.
Unilateral use of UUID for example ... causes me no end of grief.
I think you can set grub to the proper runlevel, but I've read that Ubuntu has runlevel 2-5 set with the exact same startup scripts. So you'd need to modify for instance the scripts in rc3.d to only load what you want on boot (for instance, there should be a S99gdm script in rc3.d that loads gdm on runlevel 3).
rc#.d = directory of startup scripts for runlevel #.
Someone please correct me if there's an easier way.
If you create your own /etc/inittab file, Ubuntu will honour it.
To change your runlevels the Ubuntu way look in /etc/init.d/ which contains startup scripts. Then look in /etc/rc#.d/ which contains symlinks to scripts in /etc/init.d/. The name of the symlinks determines what will be started/stopped and in what order. Look in the README file in any of the /etc/rc#.d/ directories for details.
The # in the /etc/rc#.d/ is the runlevel number.
To stop GDM from loading in runlevel 2 (Ubuntu default runlevel) rename /etc/rc2.d/S30gdm to /etc/rc2.d/K70gdm
The S tells Ubuntu to start the process, and the K tells Ubuntu to kill it. The number is the order in which it should be started/stopped.
Have a look at the man page for update-rc.d which can be used to create/update/remove the init script symlinks for you.
EDIT: You can also install the Boot-Up Manager (BUM) which is a graphical tool to configure runlevels. It's in the repositories.