Linux Disable X Window System

by on April 6, 2008 · 7 comments· LAST UPDATED November 1, 2008

in , ,

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:
Change it as follows:
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.

Tweet itFacebook itG+ itDownload PDF versionFound an error/typo on this page?

{ 7 comments… read them below or add one }

1 Andres Montalban July 7, 2010 at 8:48 pm


Instead of rebooting you can try this command:

telinit 3

This will change run level to 3.

I hope it helps.

All the best,
Andres Montalban


2 bill August 24, 2010 at 2:19 pm

does help if you are not root!!!


3 Raj Kumar Kundu August 30, 2010 at 5:35 pm

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


4 keving February 10, 2011 at 11:48 pm

is there a way to do this without rebooting?


5 Deepak July 15, 2011 at 5:19 am

telinit 3

without restart

Thanks Andres Montalban


6 bunny April 30, 2013 at 2:46 pm

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..


7 Rohit October 25, 2013 at 6:12 pm

@bunny please use “#xstart” command for centos/redhat/ubuntu


Leave a Comment

Tagged as: , , , , , , , , , ,

Previous Faq:

Next Faq: