Today’s article will be an interesting one, for at least a subset of readers, as we learn how to tell if you’re using Wayland or X11. The command isn’t all that difficult and is just a single command that should work with everything, but the topic might confuse some of you.
Frankly, if you ask this question to the majority of users, you’re probably going to find out that they’re still using X11. The move to Wayland has been a process, that started back in 2008. The goal is to replace X and provide a much better set of protocols.
That’s what Wayland is… It’s a set of protocols dealing with how things are displayed on your monitor. X is also a set of protocols for the display server – and it dates back to 1984. Without X (or something else), we’d have been staring at nothing but terminal outputs this entire time, so it is kind of a big deal.
That doesn’t mean the current X implementation is that old on your device, it just means that it has been the default for a long time. The upstart, that is Wayland, is meant to take care of a variety of flaws – including potential security flaws. That’d be a subject way too deep to get into today.
Currently, some distros are confident with Wayland and release distros that default to Wayland. Some offer it as an option, without it being the default. The GNOME and KDE desktop environments are currently the closest to being ‘Wayland-ready’. It’s a slow process!
So, you might not know if you’re using Wayland or X11 and this article tells you how to check just that.
Are You Using Wayland Or X11:
This article requires an open terminal, like many other articles on this site. If you don’t know how to open the terminal, you can do so with your keyboard – just press
With your terminal open, just run the following command: (It should work in any distro, regardless of which display server you’re running.)
1 | echo $XDG_SESSION_TYPE |
The output should look a lot like this:
1 2 | kgiii@kgiii-desktop~$ echo $XDG_SESSION_TYPE x11 |
Unless you’re using Wayland. In that case, it’d look something like this:
1 2 | kgiii@kgiii-desktop~$ echo $XDG_SESSION_TYPE Wayland |
If the output says x11, you’re not using Wayland. If it says Wayland, you’re using Wayland. I probably didn’t need to specify this, but I did. This way, you can be completely sure if you’re using Wayland or x11.
Closure:
See? There’s a fun command you can play around with. If you’re not sure if you’re using Wayland or X11, this command will get you sorted quickly and easily. There are all sorts of great things you can do with an open terminal and a little bit of knowledge.
Thanks for reading! If you want to help, or if the site has helped you, you can donate, register to help, write an article, or buy inexpensive hosting to start your site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.
Last Updated on June 3, 2023 by KGIII