samedi 4 juin 2011

Q: What is a runlevel?

A runlevel is a number which indicates what "mode" you want to computer to boot into. For example, runlevel 5 is graphical mode, where runlevel 3 is text-only mode. Runlevel 1 is "single-user" mode, used for troubleshooting problems.
There are three ways to change your runlevel:
  • While the Computer is Running:
    1. Open a Terminal.
    2. Become root:
      su -
    3. Type:
      init number
      where number is the runlevel that you want to change to.
    You will then be switched into the new runlevel.

  • Permanently Set a Default Runlevel:
    1. Open a Terminal.
    2. Become root:
      su -
    3. Open the file /etc/inittab in your favorite text editor:
      gedit /etc/inittab
    4. Find the line:
      id:number:initdefault:
      where number is your current default runlevel (probably 5).
    5. Change the number in the middle of the line to the new runlevel that you want your computer to start in by default. For example, if you want to start in text-only mode by default, change it to:
      id:3:initdefault:
    You will then boot into that runlevel every time you start the computer.
Single user mode is a mode in which a multiuser computer operating system boots into a single superuser. It is mainly used for maintenance of multi-user environments such as network servers. Some tasks may require exclusive access to shared resources, for example running fsck on a network share.




 runlevel --h
runlevel [OPTIONS...]

Prints the previous and current runlevel of the init system.

 

    Aucun commentaire:

    Enregistrer un commentaire

    Nombre total de pages vues