LinuxCommandLibrary

logout

exits a login shell

TLDR

Exit login shell

$ logout
copy

SYNOPSIS

logout [status]

DESCRIPTION

logout exits a login shell. It terminates the current shell session and returns to the login prompt.
The command is a shell builtin. It only works in login shells, not subshells.

PARAMETERS

STATUS

Exit status code (optional).

CAVEATS

Only works in login shells. Use exit for non-login shells. Shell builtin command.

HISTORY

logout is a shell builtin command available in bash and other shells for terminating login sessions.

SEE ALSO

exit(1), login(1), bash(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community