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
|Category||Requirements, Conventions or Software Version Used|
|System||Any Linux distro|
|Other||Privileged access to your Linux system as root or via the
# – requires given linux commands to be executed with root privileges either directly as a root user or by use of
$ – 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.
- Probably the most reliable method would be with the
$ xrandr --query
The output shows us the display name and all of the supported resolutions.
- 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).
wcommands 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.
- Another method is with the
xdpyinfocommand, 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 ...