Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm new to linux. How to close GUI and go into pure shell mode in RedHat enterprise Linux 6? I don't want the GUI. I just want to learn some shell scripts.


share|improve this question
up vote 11 down vote accepted

you boot your server in run level 3 or you use CTRL+ALT+F2 go to terminal mode :)

Runlevels Descriptions

  • 0 – halt
  • 1 – Single user mode
  • 2 – Multiuser, without NFS (The same as 3, if you do not have networking)
  • 3 – Full multiuser mode (terminal mode)
  • 4 – unused
  • 5 – X11 (X mode)
  • 6 – reboot

To change the default runlevel in RedHat/CentOS/Fedora, edit /etc/inittab and find the line that looks like this:


change to 3, then reboot the server

share|improve this answer
+1 For listing all the options. – Niels Basjes Dec 16 '10 at 7:33
wow, it works, thanks! – Yousui Dec 16 '10 at 7:33
Alternately, you can just run, as root: "telinit 3" to temporarily change the run-level to 3 to try it out. Then if it is not working out for you, you can do "telinit 5" or just reboot the system to get back to the GUI. – Sean Reifschneider Dec 16 '10 at 10:12
Good post. I'll add: CTRL+ALT+Backspace as a way of forcefully killing the GUI session (though it may restart afterwards). Also, you can usually cycle between a number of terminals with CTRL+ALT+F1-7. F7 typically returns you to the GUI, though this might vary with different distros. Try them out :) – SmallClanger Dec 16 '10 at 10:47

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.