Faster Learning Tutorials

Linux exit command summary with examples

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.
Paul Alan Davis, CFA, October 3, 2016
Updated: August 15, 2019
In this tutorial, 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 Next

~/ home  / technology  / linux essentials  / exit command

The Linux exit command


Learn to close the terminal at the Linux command line.

Video Tutorial

Linux exit command summary with examples (2:48)

Videos can also be accessed from the YouTube Playlist.

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.

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 so you don't miss out.

  • For the Outline to all 100 tutorials, click Outline.
  • To see other Linux content, hit Back.
  • To learn how to use command #2 whatis, click Next.

Outline Back Next

~/ home  / tech  / linux essentials  / exit command

linux exit command
bash exit
exit linux
linux Ctrl-d
linux shell exit
close terminal in linux
terminate terminal in linux
logout linux
linux close screen
exit terminal linux
linux leave
linux quit command
bash exit
terminate bash
terminal exit command