The exit command
Exit the shell. 2 examples from the lessons of the IVski Linux Playground — try them in the terminal next to them.
Examples
exit 1
if [ -z "$1" ]; then echo "no name"; exit 1; fi-z: empty; exit 1 stops with an error