2021-11-12 12:34:16 +00:00
.. program :: exit
2019-03-31 09:05:09 +00:00
2018-12-17 01:39:33 +00:00
exit - exit the shell
2019-01-03 04:10:47 +00:00
=====================
2018-12-17 01:39:33 +00:00
2018-12-18 01:58:24 +00:00
Synopsis
--------
2018-12-16 21:08:41 +00:00
2021-11-12 12:20:51 +00:00
**exit** [*code* ]
2018-12-16 21:08:41 +00:00
2018-12-19 02:44:30 +00:00
Description
2019-01-03 04:10:47 +00:00
-----------
2018-12-16 21:08:41 +00:00
2021-11-12 12:51:04 +00:00
`` exit `` is a special builtin that causes the shell to exit. Either 255 or the *code* supplied is used, whichever is lesser.
Otherwise, the exit status will be that of the last command executed.
2018-12-16 21:08:41 +00:00
2021-11-12 12:20:51 +00:00
If exit is called while sourcing a file (using the :program: `source` builtin) the rest of the file will be skipped, but the shell itself will not exit.