Build a Better Process

Linux exit Command Summary with Examples

Linux exit allows you to logout and close the terminal.
  1. Purpose - Learn what exit is for and how to find help.
  2. Options - Review a few common options and arguments.
  3. Examples - Walk through code examples with exit.
  4. A tip - Finish off with one more insight.
face pic by Paul Alan Davis, CFA
Updated: February 23, 2021
In this tutorial on the Linux exit command, 1 of 100, below find a 3-4 minute introductory video, a text-based tutorial and all of the code examples from the video.

Outline Back Tip Next

/ factorpad.com / tech / linux-essentials / exit-command.html

An ad-free and cookie-free website.

Examples of the Linux exit Command


Learn to close the terminal at the Linux command line.

Video Tutorial

Videos can also be accessed from the Linux Essentials Playlist on YouTube.

Linux exit Command Summary with Examples (2:48)

Video Script

The Command and Why You Need It

Our first word, or command to memorize is exit from the category Navigation.

exit allows you to logout, close the Terminal and go back to your visually appealing GUI.

Common Linux exit Options
-options description
There are no options

If it helps, think of commands as mini programs and most have this structure. First, type the command, second the option(s) and third the argument(s).

The exit command interestingly has no options and no arguments. It is lowercase exit followed by Enter.

Normally we will cover two to three of the most important options, marked with a dash and a letter. Like -a for example. Options can be combined to perform multiple options at once.

Arguments usually refer to files or directories you're performing the operation on, but in this case we have none.

So why is exit an important command? Well, you need to know how to get in to the terminal, and how to get out. And now you know how to do that.


Okay, the best way to embed this in your memory is by typing in your own terminal window.

Find this on your Mac using a program called Terminal. On Linux use Terminal or Konsole, and currently Microsoft is adding this functionality to Windows 10.

Here we go, type exit and no options and no arguments, hit enter and you're done.

$ exit

A Final Tip

Okay now you know how to use exit. And you know the syntax for commands, options and arguments.

One last tip about the exit command. The keystroke combination Ctrl-d accomplishes the same thing with fewer keystrokes.

Okay, thanks for visiting today. I hope this was a fun exploration of the exit command.

Learn More About The Series

For and overview of the 100 videos, the 8 quizzes, a cheat sheet, the categories and a Q&A section, visit:

What's Next?

First off, subscribe at YouTube and follow on Twitter so you don't miss out.

Outline Back Tip Next

/ factorpad.com / tech / linux-essentials / exit-command.html

linux exit command
bash exit
linux exit
linux exit examples
exit linux
linux close
close linux
exit command linux
linux quit command
linux exit screen
linux shell exit
exit terminal linux
close screen linux
linux close screen
terminal exit command

A newly-updated free resource. Connect and refer a friend today.