Linux exit Command
The Linux exit command is used to exit the current shell.
Executing exit causes the shell to exit with a specified status value. If no status value is provided, the shell exits with a default value. A status value of 0 indicates success, while other values indicate failure. exit can also be used in a script to leave the running script and return to the shell.
Syntax
exit [状态值]
Example
Exit the terminal
# exit
Linux Command Reference