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.

Thanks.

link|improve this question

50% accept rate
feedback

1 Answer

up vote 8 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:

id:5:initdefault:

change to 3 reboot the server

link|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
1  
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
feedback

Your Answer

 
or
required, but never shown

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