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.


1 Answer 1


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

  • +1 For listing all the options. Dec 16, 2010 at 7:33
  • 3
    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. Dec 16, 2010 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 :) Dec 16, 2010 at 10:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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