Comments on: Managing Services in Ubuntu, Part II: Managing Runlevels Linux. GNU. Freedom. Thu, 15 Feb 2018 18:04:15 +0000 hourly 1 By: Andrew Jorgensen Fri, 09 May 2008 04:23:58 +0000 From the update-rc.d manpage:

Please note that this program was designed for use in package maintainer scripts and, accordingly, has only the very limited functionality required by such scripts. System administrators are not encouraged to use update-rc.d to manage runlevels. They should edit the links directly or use runlevel editors such as sysv-rc-conf and bum instead.

From me:

This is why you've had to pass -f when running remove. It's a reminder that update-rc.d is not for system administration.

By: Tim Wed, 30 Apr 2008 00:14:54 +0000 CP Scott -
Once you have configured your runlevels by using the method that Aaron outlined in this post, You can still specify the run level on the kernel line of grub as you have done in the past. It's just a matter of getting things set up the way you like first.

By: Tomas Lavicky Wed, 23 Apr 2008 11:38:08 +0000 Great howto, thanks.
But I don't understand update-rc.d behaviour well. I prepare new initscript /etc/init.d/rrhb and try to add it to runlevels:

# update-rc.d rrhb start 21 2 3 4 5 .
# update-rc.d rrhb stop 19 0 1 6 .
System startup links for /etc/init.d/rrhb already exist.

No K19rrhb links haven't been created.

I solve it by
# update-rc.d -f rrhb remove
# update-rc.d rrhb defaults 21 19
but I can't understand how to make some single stop links.

By: CP Scott Tue, 15 Apr 2008 16:58:54 +0000 My need for figuring out the Ubuntu method:

As a laptop user, I sometimes, for battery lifespan, prefer to boot into runlevel 3, and use vi to edit notes while riding home on the bus. I don\'t need a gui, I\'m not going web surfing if I can\'t bring up networking, etc. By disabling GDM, bluetooth, wifi, and other services and drivers in in runlevel 3, I don\'t have to suck battery life just to type some notes.

However, when I\'m at my desk, have my docking station, and dual-head monitor, I really want run level 5, that uses the ATI video driver, dual head X config, and a number of other niceties.

Otherwise, at home, I want runlevel 4, with the standard intel 945 video driver, and single headed x config.

I used to do this by specifying the init level in the grub startup menu. Since the change to Upstart, I haven\'t bothered to figure it out, and I could really use the help.

By: Michael Schultze Thu, 10 Apr 2008 14:33:23 +0000 Although I'm new in Linux, I'm just thinking of entering different runlevels by selecting it from bootmanager or after a specific user logged in. So it provides different startup configurations depending on purpose, isn't it?
Thanks for your article so far.

By: Tom Vollerthun Thu, 28 Feb 2008 14:14:33 +0000 After reading your last post, I was a bit worried, if you could stand up to the great expectations that your audience (me 🙂 was putting on you.
After reading the second part of the tutorial, I'm very relieved that you made it so utterly well! Thanks again and keep up the good work!

By: Miguel P.C. Thu, 28 Feb 2008 03:54:09 +0000 Could you, please, consider putting this information in the ubuntu wiki?.

I think it would be great to have it in an expected place and make it extensible. 🙂

BTW ... really nice information.


By: Aaron Wed, 27 Feb 2008 22:50:04 +0000 @gabriel gunderson- True, however sysv-rc-conf has some issues, plus it is not installed by default.

By: gabriel gunderson Wed, 27 Feb 2008 22:47:44 +0000 You should mention sysv-rc-conf. It almost makes life too easy.

By: Aaron Wed, 27 Feb 2008 21:33:52 +0000 @Marius Scurtescu- Those were typos. Thanks for noticing them. I've updated the post to reflect the changes.

By: Marius Scurtescu Wed, 27 Feb 2008 21:31:24 +0000 The first remove example you give is:
% sudo update-rc.d -f sendmail
based on following examples, shouldn't this rather be:
% sudo update-rc.d -f sendmail remove

Also, in the first stop example you omit the service name:
% sudo update-rc.d stop 20 0 1 2 3 4 5 6 .

If the service name is not specified, what is the default?

By: beerfan Wed, 27 Feb 2008 17:53:48 +0000 This is all good information but it isn't really helpful for the average desktop user. If your target audience is server admins then that's fine. Otherwise, there are only 2 runlevels that a desktop user _should_ ever have to care about. Perhaps that is optimistic though.

Managing services in Ubuntu (Desktop Edition) should not require knowledge of runlevels in my opinion.