logout command is used to log out of the currently logged in shell. When the command is executed, the user is logged out of the current shell session and returned to the login prompt.
To use the
logout command, simply type
logout in the terminal and press enter. The shell will then close and the user will be logged out of the current session.
- When a user wants to log out of the current shell session.
- When a user wants to switch to a different user account.
logout command has no options.
- If the
logoutcommand is not working, it may be because the user is not logged in to a shell session. Ensure that the user is logged in to a shell session before executing the
- If the
logoutcommand is not working and the user is logged in to a shell session, try using the
logoutcommand is a simple and quick way to log out of a shell session.
logoutcommand can be used in any shell, including Bash, Zsh, and Fish.