2.4.2. Runlevels

Up one level

-

After completing the boot process, init starts all services that are configured to run in the default runlevel. The default runlevel is given by the entry for id in /etc/inittab. Debian ships with id=2.

Debian uses the following runlevels:

  • 1 (single-user mode),

  • 2 through 5 (multiuser modes), and

  • 0 (halt the system),

  • 6 (reboot the system).

Runlevels 7, 8, and 9 can also be used but their rc directories are not populated when packages are installed.

Switch runlevels using the telinit command.

When entering a runlevel all scripts in /etc/rcrunlevel.d/ are executed. The first letter in the name of the script determines the way in which the script is run: scripts whose names begin with K are run with the argument stop. Scripts beginning with S are run with the argument start. The scripts are run in the alphabetical order of their names; thus "stop" scripts are run before "start" scripts and the two-digit numbers following the K or S determine the order in which the scripts are run.

The scripts in /etc/rcrunlevel.d are in fact just symbolic links back to scripts in /etc/init.d/. These scripts also accept "restart" and "force-reload" as argument; the latter methods can be used after a system has been booted in order to restart services or force them to reload their configuration files.

For example:

     # /etc/init.d/exim4 force-reload
Broadband Deals
Compare the best broadband deals available in the UK from all the leading Internet Service Providers including BT, Sky and Virgin Media.
IT Support Manchester
For IT support, Manchester based MailSure will provide technical support for your IT needs or take control of your IT requirements at any stage in your business development.
IT Support Bristol
IT Services and IT Support provider based in Bristol. Computer maintenance with server support as standard.
Mobile Broadband Deals
Compare the cheapest mobile broadband deals on Mobile Broadband Genie, the independent UK price comparison website.
Project Planning Software
Atlantic Global offers full solutions of project management software, including project planning software, timesheets and more
City Leased Lines
Dedicated 100Mbit fibre optic Internet and Cloud outsourcing in the City of London, call now on 020 7096 9004 or email sales@metro-tek.com
IT Support
For The Best IT Support In London Make Our IT Department Your IT Department. Microsoft Gold Certified Partner.
IT Support London
Efficent IT Support & Hosted Services for SME businesses in and around greater London.
Reliable Web Hosting
Affordable Web Hosting with one click installs for Joomla, Moodle, Wordpress and more!
Data Recovery
Professional data recovery services