How to Log Out from Ubuntu Session [Beginner's Tip]

How do you log out of Ubuntu?

The answer depends on whether you are using Ubuntu server or desktop. I’ll show you steps for both.

Logout Ubuntu from terminal (for server)

If you are using Ubuntu server and you are confined to the terminal screen, you can use the exit command:


Yes. That’s the way to logout from terminal because there is no logout command in Ubuntu or any Linux distribution. You have commands for shutdown Ubuntu but there is no separate log out command.

Why there is no logout command in Linux?

You may wonder if there is command for shutdown, command for restart then why there is no Linux command for logout?

The answer lies in the way Linux works. You probably know that Linux is only kernel and you need a shell to interact with the kernel. When you use a terminal or if you log in to an Ubuntu system via SSH, you open a shell session.

If you want to logout from your session, you simply exit the shell. This is why the exit command is equivalent to log out command in Linux.

Log out from Ubuntu desktop (GUI method)

If you are using Ubuntu desktop, you have a graphical interface (called desktop environment). You can use your mouse here.

I am showing the screenshot for the default GNOME desktop but if you are using some other Ubuntu desktop variants like Kubuntu, Lubuntu etc, there should also be a logout button or logout option in the power menu.

To log out from Ubuntu desktop session, go to the top right corner and click to bring the system tray. You should see Power Off / Log Out option. Click on it and it will show the Log Out option.

Log Out Ubuntu

When you click on the Log Out button, it will open a dialogue box and ask for your conformation. If it receives no input from you, you’ll be logged out in 60 seconds.

Log Out Confirmation Ubuntu

That’s it. Now that you know how to log off from Ubuntu session let me tell you a secret tip.

You can use Ctrl+Alt+Del keyboard shortcut in Ubuntu to bring the logout menu. Cool, isn’t it?

About the author
Abhishek Prakash

Abhishek Prakash

Created It's FOSS 11 years ago to share my Linux adventures. Have a Master's degree in Engineering and years of IT industry experience. Huge fan of Agatha Christie detective mysteries πŸ•΅οΈβ€β™‚οΈ

Become a Better Linux User

With the FOSS Weekly Newsletter, you learn useful Linux tips, discover applications, explore new distros and stay updated with the latest from Linux world


Great! You’ve successfully signed up.

Welcome back! You've successfully signed in.

You've successfully subscribed to It's FOSS.

Success! Check your email for magic link to sign-in.

Success! Your billing info has been updated.

Your billing was not updated.