Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've been reading about runlevels and startup scripts lately, and I've learnt that runlevels 2 to 5 are the same in Ubuntu, and that Ubuntu's default runlevel is 2.

What I want to do

I want to remove the script that starts Unity from runlevel 3, or actually prefix it with a "K" to kill it when I switch from runlevel 2 to 3.

Why do I want to do it

I want to experiment with runlevels and understand "init" and startup scripts and all that. After I remove Unity from starting in runlevel 3, I want to run the command telinit 3 to see what happens.

What am I facing?

The current scripts/links in /etc/rc3.d/ are as follows:

alaa@aa-UBUNTU:~$ ls -l /etc/rc3.d
total 4
lrwxrwxrwx 1 root root  32 Nov 22 12:14 K08vmware-USBArbitrator -> /etc/init.d/vmware-USBArbitrator
lrwxrwxrwx 1 root root  26 Mar 30 10:51 K25vpnagentd_init -> /etc/init.d/vpnagentd_init
-rw-r--r-- 1 root root 677 Jul 21  2012 README
lrwxrwxrwx 1 root root  16 Nov 22 12:13 S19vmware -> ../init.d/vmware
lrwxrwxrwx 1 root root  20 Oct 30  2012 S20kerneloops -> ../init.d/kerneloops
lrwxrwxrwx 1 root root  27 Oct 30  2012 S20speech-dispatcher -> ../init.d/speech-dispatcher
lrwxrwxrwx 1 root root  31 Nov 19 17:10 S20vboxautostart-service -> ../init.d/vboxautostart-service
lrwxrwxrwx 1 root root  20 Nov  7 11:52 S20virtualbox -> ../init.d/virtualbox
lrwxrwxrwx 1 root root  20 Jan 28 16:30 S31atieventsd -> ../init.d/atieventsd
lrwxrwxrwx 1 root root  15 Oct 30  2012 S50rsync -> ../init.d/rsync
lrwxrwxrwx 1 root root  15 Oct 30  2012 S50saned -> ../init.d/saned
lrwxrwxrwx 1 root root  32 Nov 22 12:14 S50vmware-USBArbitrator -> /etc/init.d/vmware-USBArbitrator
lrwxrwxrwx 1 root root  35 Nov 22 12:14 S55vmware-workstation-server -> ../init.d/vmware-workstation-server
lrwxrwxrwx 1 root root  19 Oct 30  2012 S70dns-clean -> ../init.d/dns-clean
lrwxrwxrwx 1 root root  18 Oct 30  2012 S70pppd-dns -> ../init.d/pppd-dns
lrwxrwxrwx 1 root root  14 Mar  3 10:10 S75sudo -> ../init.d/sudo
lrwxrwxrwx 1 root root  20 Oct 31  2012 S80metasploit -> ../init.d/metasploit
lrwxrwxrwx 1 root root  26 Mar 30 10:51 S85vpnagentd_init -> /etc/init.d/vpnagentd_init
lrwxrwxrwx 1 root root  22 Oct 30  2012 S99acpi-support -> ../init.d/acpi-support
lrwxrwxrwx 1 root root  21 Oct 30  2012 S99grub-common -> ../init.d/grub-common
lrwxrwxrwx 1 root root  18 Oct 30  2012 S99ondemand -> ../init.d/ondemand
lrwxrwxrwx 1 root root  18 Oct 30  2012 S99rc.local -> ../init.d/rc.local

I do not know which one is responsible for running the Unity user interface.

share|improve this question
up vote 2 down vote accepted

Unity is not what is started on boot. What you're looking at on boot is lightdm.

The reason you see neither of those is because Ubuntu uses a combination of Upstart and sysvinit to start services on boot. The rcX.d directories are only for things that have not been migrated to Upstart.

Lightdm is started on a bunch of hardware events by Upstart. This is done so that it can start as soon as possible and own the "console" as it shifts from the boot console (plymouth) to lightdm. This also means it can start interacting with the user while other system services are still starting. You can see how it starts up in /etc/init/lightdm.conf.

Upstart still uses runlevel, so you can look for things like start on runlevel [2345] and stop on runlevel [016] in /etc/init/* to find things to play with to test out other run levels.

share|improve this answer
I edited /etc/init/lightdm.conf to read stop on runlevel [0136] instead of [016], and did sudo telinit 3, but nothing happened; LightDM was still running. I did runlevel to make sure it switched, and the output was 2 3, so I'm assuming it did switch. – Alaa Ali Jun 1 '13 at 7:22
Thats very strange Alaa, could you file a bug at , or run 'ubuntu-bug upstart' on the affected system? Thanks! – SpamapS Jun 8 '13 at 16:08
Okay, I'll do that. Just a question though, my ultimate goal was to make runlevel 3 without a display manager, so that when I switch to it, it'll give me a command line (I guess it'll direct me directly to tty1), not a display manager. So that was the way to accomplish it, right? I'm just making sure I'm on the right track. – Alaa Ali Jun 8 '13 at 16:54

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.