How to check if you’re running Wayland on Linux

January 6th, 2023

Wayland is the new display server protocol used by modern Linux installations. It replaces the old X11 protocol. It’s shipping on Ubuntu 22.04 by default.

To check: open a terminal, and echo the `XDG_SESSION_TYPE` variable.

echo $XDG_SESSION_TYPE

It will output `wayland` or `x11`.

You can still try x11 if you like by selecting that option on login.

UPDATE

This doesn’t work over SSH, it will output: tty

So for that, use this:

loginctl show-session $(loginctl | grep $(whoami) | awk '{print $1}') -p Type | grep wayland

In case Wayland is used it should output:

Type=wayland

See more unix.stackexchange

Leave a Reply