How to Close Linux From the GUI
The two most common Linux desktop environments are Gnome and KDE. Others include XFCE and Unity. There is a method for closing, or shutting down, the operating system from the graphical interface, regardless of the desktop environment you prefer. In most instances, shutting down from the GUI is preferred. If you are shutting down a server or a computer with multiple users logged in, you should use the command line to shut down so you can allow time for other users to save their work.
-
Gnome
-
The Gnome "Shut Down" button is located under the System menu. When you click on the button, a dialog box appears where you can choose if you want to shut down, hibernate, reboot or suspend the system. If you don't click one of the options, the computer will automatically shut down after a certain amount of time. The shut down time is approximately 60 seconds, but varies from distribution to distribution and can be changed using the system preferences utilities. The automatic shut down option is turned off by default in Ubuntu Linux.
KDE
-
KDE's "Leave" button appears at the bottom of the window when you click on the "K" menu. Clicking the "Leave" button brings up a dialog window that allows you to log out, lock the session, switch users, shutdown or restart. Unlike Gnome, there is no automatic shut down period. If you do not click the "Shutdown" option, the computer will not power off.
-
XFCE
-
XFCE places the "Shut Down" button in the task bar at the bottom of the screen. It is small, so it is not easy to mistakenly click on it. Like the other desktop environments, clicking the button brings up a dialog menu. You can choose to quit the current session, restart the computer or turn off the computer. There is also an option to "save the session for future logins" -- if you choose to save the session, the programs that are currently running will be started automatically.
Unity
-
The Unity desktop environment is the new default desktop for the Ubuntu Linux distribution. The "Shut Down" button has moved from the menu to the upper right corner of the screen. When you click the button, a drop down menu appears which provides the standard options to suspend, hibernate, restart or shut down the computer. There is no automatic shut down period enabled.
Advantages and Disadvantages
-
The advantage of shutting down the desktop from the GUI is that you don't have to be the root user to do it. You also don't have to remember the shut down and reboot commands. You simply click a button and the computer powers off.
A regular user cannot shut down the computer if other users are logged in to the system. There is also no notification before the system powers off like there is if you shut down from the command line.
-