Here's a little more in-depth overview:
Unix-like systems are traditionally build with console only, and historically they were so from the beginning until developers came up with graphical interface. Particularly , there must be a graphical server (think of it as a program/software ). So in the old days you'd go to console, log in, and run startx
command to start that graphical server (in fact it's called the X server or X11, hence startx
naming for the command ). Nowadays, there are other servers than X, particularly there's Wayland graphical server and X server derivatives. The first graphical environment would be motif , or mwm
, which I use occasionally. Now, if you run startx
you'd get simply the default environment that you have set for your user. If you'd want something else, you'd run startx /usr/bin/gnome-shell
for instance.
As you can see this approach is somewhat cumbersome, so over the years developers came up with graphical login screens. In the Linux world they are commonly known as display managers or greeters. For instance, the default login screen for Ubuntu would be lightdm
. This sofware decides which environment to give for a particular user. On that same login screen, you'd chose an alternative environment which are installed on your system.
Can a user install multiple environments ? Yes. On my machine I have gnome
,openbox
,blackbox
,icewm
,mwm
, and unity
. Can two different environments be ran at the same time ? Yes. I occasionally run gnome-shell
as logged in from the graphical login screen, and openbox
on tty1 console with that same startx
command mentioned above. An instance of x server works the same way as if you'd run multiple instances of any other software, and each instance shares control over screen and keyboard at a time - when one is active, the other just waits in the background for the user to give control over keyboard and screen to it.
There's tons of benefit for running multiple GUI environments, actually. If something breaks after an update, for instance Unity doesn't start , you can always hop into Gnome and continue working.