Create A xorg.conf File

xorgconfig is an interactive command for generating an xorg.conf file for use with Xorg X servers.

This program will create a basic xorg.conf file, based on menu selections you make. It will ask for a pathname when it is ready to write the file.

The xorg.conf file usually resides in /etc/X11 or /usr/X11R6/etc/X11. If no xorg.conf file is present there, Xorg will probe the system to autoconfigure itself. You can run Xorg -configure to generate a xorg.conf

Before using this program, make sure you know what video card you have, and preferably also the chipset it uses and the amount of video memory on your video card, as well as the specifications of your monitor. Run lspci command to obtained information about your card.

# xorgconfig

: Newer Linux / UNIX distro with Xorg should use the following command instead of xorgconfig:
# Xorg -configure
$ sudo Xorg -configure

The -configure option force the Xorg server to load all video driver modules, probes for available hardware, and writes out an initial xorg.conf file based on what was detected. The above will build an initial configuration file and you must run it as the super user (root user).

🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 7 comments so far... add one

CategoryList of Unix and Linux commands
Disk space analyzersdf ncdu pydf
File Managementcat cp mkdir tree
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
7 comments… add one
  • Imran Apr 22, 2007 @ 5:47

    Thanks man. I was searching for this and got it from your post.

  • Prakash Jose Kokkattu May 3, 2007 @ 10:23

    FOr all who ended up searching this page.the new method for configuring /etc/X11/xorg.conf is by running as root in any console login screen with out X running:
    ~# Xorg -configure

  • shivam Jul 10, 2008 @ 8:13

    Thanks to all of you. I was looking for a method whereby I could configure the display from console if the resolution went out of synch due to a wrong resolution.

  • Aleksa Jan 28, 2009 @ 20:48

    Where can I download this file ?

  • Alex Jan 8, 2010 @ 17:59

    I don’t know if there is a file but the command that automatically creates a /etc/X11/xorg.conf file based on the current system information is : Xorg -configure

  • 🐧 nixCraft Jan 8, 2010 @ 18:31

    I’ve updated the post.


  • lizzi Oct 25, 2015 @ 18:05

    this no longer works

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum