Exiting the shell

When you're finished with your UNIX session, you need to exit the UNIX shell. If you've been playing with the su and shell commands, you might actually have shells within shells and need to exit from all of them. All you have to do is type exit once for each shell, as shown in Figure 3.3.

Figure 3.3. After we entered "exit" from the last shell, the system added "logout" and closed the connection.

To exit from the shell:

  • exit
    At the shell prompt, type exit, as shown in Figure 3.3. TaDaaaa!

Tip

If you're located at the login shell prompt, you could also type logout, rather than exit. At all other shells, though, you need to ...

Get Unix: Visual QuickStart Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.