How to Log Out in Ubuntu

In this tutorial we will show you how to log out in Ubuntu.
For this tutorial, we will show you two methods of logging out. First, from the desktop and the second is from the terminal application.
To understand how you can log off from Ubuntu using any of these two methods, follow the steps given below.


Step 1 – Go to the Log Out option

First of all, move over to the identification area on top of your desktop and click on the gear icon. When the drop down menu list appears, simply click on Log Out option below.

Move over to the Log Out option

Step 2 – Select the Log Out option

With that done, you can see the dialog box appearing on the screen asking you whether you want to log off from Ubuntu or not. You can click on the Log out button below to do just that. To close the window, simply click on the cancel button.

Press the Log Out option

Step 3 – Log out through the terminal application

Now let’s move to the terminal application. For that, hit the shortcut key “Ctrl+Alt+T”. Over here, let’s type in the following command
“gnome-session -quit”
This will close the session and log you out.
When you hit enter, the same log out dialog box will appear on your screen. Notice that over here, since we are currently logged in as root, we will be automatically logged out in 60 seconds, if no action is taken here.
Lastly, you can also use the shortcut key “Alt+Ctrl+Delete” to logout and end the current session.
And that’s it; this way from the steps given above you can learn how to log out of Ubuntu using two different methods.

Enter the log out command in the terminal application