How to list all displays on Linux

A monitor, TV, or any type of virtual screen or other device meant to project video from the computer is considered a ‘display’ on a Linux system. In some contexts, it may also be referred to as a ‘screen,’ but you get the idea. We can check which displays are connected to Linux using a few different methods. This can help us determine information about detected displays, connected screens, and troubleshoot problems with video not displaying (whether it be physical or over a network).

In this tutorial you will learn:

  • How to list all displays on Linux
How to list all displays on Linux
How to list all displays on Linux
Software Requirements and Linux Command Line Conventions
Category Requirements, Conventions or Software Version Used
System Any Linux distro
Software N/A
Other Privileged access to your Linux system as root or via the sudo command.
Conventions # – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
$ – requires given linux commands to be executed as a regular non-privileged user

How to list all displays on Linux




Let’s see a few different methods for listing the displays in Linux.

  1. Probably the most reliable method would be with the xrandr command.
    $ xrandr --query
    
    Listing displays with xrandr
    Listing displays with xrandr

    The output shows us the display name and all of the supported resolutions.

  2. Another method is to use the GUI. There should be a a built in settings menu that shows the current display and others that are physically connected (such as a multi monitor setup).
    Listing displays via GUI settings
    Listing displays via GUI settings
  3. The who and w commands can show us what display a user is connected to.
    $ who
    linuxconfig tty2         2023-06-18 01:57 (tty2)
    

    In this example, it only shows that we are connected to tty2.

  4. Another method is with the xdpyinfo command, which outputs a ton of information about connected displays.


    $ xdpyinfo
    name of display:    :0
    version number:    11.0
    vendor string:    The X.Org Foundation
    ...
    default screen number:    0
    number of screens:    1
    
    screen #0:
      dimensions:    1920x1080 pixels (508x285 millimeters)
      resolution:    96x96 dots per inch
    ...
    


Comments and Discussions
Linux Forum