Tuesday, March 27, 2012

RHEL stop x-server

Very simple. According to the generic runlevel specification, you just have to change to runlevel 3. (Typical systems start in runlevel 5 because of the GUI)

Typical Linux runlevels
IDNameDescription
0HaltShuts down the system.
1Single-User ModeMode for administrative tasks.[2][3]
2Multi-User ModeDoes not configure network interfaces and does not export networks services.[4]
3Multi-User Mode with NetworkingStarts the system normally.[5]
4Not used/User-definableFor special purposes.
5Start the system normally with appropriate display manager. ( with GUI )As runlevel 3 + display manager.
6RebootReboots the system.

How to do it?

# init 3  (as root. And that's it!)

Curiosity

Lately, many systems have migrated to Upstart which is "an event-based replacement for the traditional init daemon — the method by which several Unix-like computer operating systems perform tasks when the computer is started. It was written by Scott James Remnant, a former employee ofCanonical Ltd." (source: Wikipedia)

It was firstly introduced in Ubuntu 6, and was recently adopted by RedHat to its Enterprise Linux (RHEL) as well, being therefore available in dependent distributions like Scientific Linux and Centos.

No comments:

Post a Comment