Linux Disable X Window System

Posted on in Categories , , , , last updated November 1, 2008

Q. How do I disable X Window system on boot? I just need text based interface and there is no need to waste resources on X window system. How do I disable X Window under CentOS / RHEL / Red Hat / Fedora Linux?

A. The X Window System (also known as X11 or X) is a windowing system that implements the X display protocol and provides windowing on bitmap displays. It provides the standard toolkit and protocol with which to build graphical user interfaces (GUIs) on most Unix-like operating systems.

Disable X Windows System Under Red Hat / CentOS / Fedora Linux

Open /etc/inittab file, enter:
# vi /etc/inittab
Find the line that read as follows:
id:5:initdefault:
Change it as follows:
id:3:initdefault:
Save and close the file. Reboot system to test new changes:
# reboot
Run level 5 is used to boot into X Windows (Gnome or KDE GUI managers). Run level 3 is for text (console) based login.

Posted by: Vivek Gite

The author is the creator of nixCraft and a seasoned sysadmin and a trainer for the Linux operating system/Unix shell scripting. He has worked with global clients and in various industries, including IT, education, defense and space research, and the nonprofit sector. Follow him on Twitter, Facebook, Google+.

7 comment

  1. i want to disable the xwindow and want to run only one java application at that time..
    only that application window will open after rebooting the system..other all remains locked..what i have to do for that???
    its for Knoppix

  2. Could someone tell me, once disable the X window system, how to enable it without restarting the Machine all over again?…There are some applications which needs switching back and forth..

Leave a Comment