Find the answer to your Linux question:
Results 1 to 8 of 8
While setting up my new debian etch box, I noticed that most (if not all) of the system stuff is running for each run level. question: Would I be able ...
  1. #1
    Just Joined! brokndodge's Avatar
    Join Date
    Feb 2006
    Location
    Arkansas, USA
    Posts
    78

    7 runlevels?

    While setting up my new debian etch box, I noticed that most (if not all) of the system stuff is running for each run level.

    question:
    Would I be able to free up memory by turning off all this stuff on each runlevel except for the one I actually use?

  2. #2
    Just Joined!
    Join Date
    Jan 2006
    Location
    Illinois
    Posts
    48
    Runlevels are just preset configuration iamges where certain services are running and others not. This is a shortcut for having to start and stop multiple services at once.

    For example you could have one runlevel with 10 services and switch to one with 20 services... you'd start the additional 10 by using a single command.

    In other words, you're only in one at any given time... so turning off Apache in runlevels 3-5 won't make your computer any quicker if you use runlevel 2 by default, etc.

    [Also be aware that runlevels 0, 1, and 6 are somewhat special (zero is shutdown, one is single-user mode, and six is system restart)... so you will have little need (or want) to change anything in those.]

  3. #3
    Just Joined!
    Join Date
    Dec 2005
    Posts
    96
    All what you have in runlevel folders is bunch of symlinks to different scripts. So if you mind few bytes, then yes. Free them up. Although I wouldnt do that.
    BTW runlevel 0 and 6 are uset to turn off and reboot your PC. So removing them will cause problems.

    Oh djhobo9, that was fast

  4. #4
    Just Joined! brokndodge's Avatar
    Join Date
    Feb 2006
    Location
    Arkansas, USA
    Posts
    78
    thank you for the info, i'll leave the runlevels alone. the only change i made was to create one that didn't start x for maintanance stuff.

  5. #5
    Just Joined!
    Join Date
    Dec 2005
    Posts
    96
    the only change i made was to create one that didn't start x for maintanance stuff.
    That's strange! Only runlevel 5 starts X!
    AFAIR:
    0 - shutdown
    1 - single user
    2 - multiuser w/0 network
    3 - multiuser w/ network
    4 - not used
    5 - multiuser + network + X
    6 - reboot

    So for maintaince stuff you should use runlevel 1, 2 or 3.

  6. #6
    Just Joined!
    Join Date
    Jan 2006
    Location
    Illinois
    Posts
    48
    Yeah, void_false, that's the way it is supposed to be I think... or at least it was in the past. However all my Debian systems since at least Sarge have had X running on all levels 2-5, with the default level as 2.

    It doesn't make any sense, because essentially there are four identical runlevels on new Debian installations.... unelss I'm missing something?

  7. #7
    Linux User
    Join Date
    Apr 2005
    Location
    Ohio
    Posts
    326
    2-5 are the same by default in Debian..

    http://www.debian.org/doc/FAQ/ch-customizing.en.html

    I typically disable gdm in runlevel 2 so I can boot to a command prompt instead of the GUI, then just use startx to get into the GUI when I want to.. no real need for me to switch between runlevels to do that.


    To change wether a service runs in a particular runlevel there are several methods.
    update-rc.d is the default tool used Debian to adjust runlevel entries.. i.e. update-rc.d gdm stop 2
    sysv-rc-conf will also work, just check or uncheck the box next to the service you want to modify
    mv /etc/rc2.d/S99gdm /etc/rc2.d/K99gdm
    This last example for instance disables gdm at boot time so you boot to a shell instead of a GUI.
    far...out

  8. #8
    Just Joined! brokndodge's Avatar
    Join Date
    Feb 2006
    Location
    Arkansas, USA
    Posts
    78
    i believe the extra x runlevels are for multi head machines. I'm not for sure, but i believe if u set-up a second head (monitor, keyboard, mouse) it will access x on a different runlevel then your main head. might also work with thin clients. I only have one head tho.

    the weird thing is that cntl-alt-f(x) still switches to a console while ctrl-alt-f7 switches to x.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •