I often need UI to configure my server, even to run Eclipse and work there, but in "production" i want to have only mandatory things running - just command-line and no UI.

If I'm running UI on Linux how can I easily unload all UI and just use command-line. Do I have to reboot to do something like that? Can I switch back?

I'm using RHEL 7 and I access it via iLO (so far not installed any remote access).

  • i've found that executing telinit 3 for terminal and telinit 5 for gui session works just fine. – javapowered Nov 8 '14 at 8:58

You should log out, and then log in to a terminal-only environment. But if you don't care about preserving the current state of the GUI environment you can instantly kill X windows with Ctrl-Alt-Backspace. I'm not very familiar with the modern Red Hat environment, but I assume that when X is killed it's restarted and you are then presented with the graphical login dialog. If that dialog doesn't give you an option for a terminal-only login, try Ctrl-Alt-F1 (or some other low function key if F1 doesn't work), which should get you straight to a terminal login.

When you are in GUI mode you can use those same Ctrl-Alt-Fn sequences to quickly switch between sessions. The usual X windows convention puts the GUI session at Ctrl-Alt-F7, the other sessions are normally terminal-only.

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.