When you are using a system with multiple user accounts, you have to use switch user option so that other users may access your system. But switching user account is not the optimum solution as it does not end a user’s session. All the opened applications of a user keep running in the background and utilize system resources. Logging out from a system when you are not using it is the best way to end the current session to make system resources available to other users. However, you have to re-open all applications when you will log in back.
In this article, we will describe how you can log out of your system using different ways. We will use Debian 10 for describing the procedure mentioned in this article.
Method # 1 Using terminal
If you are working on a headless Debian OS or connected to your system via SSH, then Terminal is the only option that will work for logging out of your system. Using Terminal is the easiest and quickest way to logout of your Debian user session.
Launch the Terminal application in Debian. For this, go to the Activities tab located on the top left corner of the desktop. Then in the search bar, type terminal. When the Terminal icon appears, click on it to launch it.
Then type the following command in it and press Enter:
By executing the above command, you will see the following Dialog box. Click on Log Out button to end the current user’s session. If you do not click on the Log Out button, it will automatically log out the session after 60 seconds unless you click on the Cancel button.
Method # 2 Using Activities window
Go to the Activities tab located on the top left corner of your desktop. Then in the search bar, type the keyword logout. When its icon appears in the search results as shown in the below screenshot, click on it.
As you click the Log Out icon, you will see the same logout dialog box. Click on the Log Out button to terminate the user’s session.
Method # 3 Using system menu
You can also log out from the user’s session by going into the system menu. This is the most common way of logging out from any Linux desktop. To do so, click on the drop-down arrow at the top right corner of your desktop. When the drop-down menu appears, click on your username that you wish to log out. You can see the below screenshot for clear understanding.
Then you will see the Log Out option. Click on it to log out.
Method # 4 Using the keyboard shortcut
Debian OS includes a list of preconfigured keyboard shortcuts that helps you to make your work easier and efficient. This list also includes a shortcut for logging off your system. Along with this, you can also create your own custom keyboard shortcuts.
The preconfigured key for logging off your system is Ctrl+Alt+Del. Just use this key combination and you will be presented with the logout dialog box. However, if you want to change the shortcut and define a new one, you can also do this. For that, click on the Activities tab located on the top left corner of the desktop. Then in the search bar, type the keyword keyboard. When the search result appears, click on the keyboard option as shown in the below screenshot.
Here you can see the default shortcut for log out function.
To create a custom shortcut for logging off, click on the + button at the bottom of the window.
A dialog box will appear. In the first field, enter the name of the logout function, and then in the second field, enter the following line:
gnome-session-save - -logout-dialog
Then click on the Set Shortcut button and press the keys to enter a new shortcut. Once done with setting the shortcut, click on Add to add this new shortcut.
That was a brief overview of how you can sign out your Debian OS. We have seen different ways of signing out of a system. You can choose anyone that you find more convenient and easy to use.