OS Manuals

exit(1)

exit - exit the shell

EXIT(1) fish-shell EXIT(1)

exit - exit the shell

exit [CODE]

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.

If exit is called while sourcing a file (using the source <> builtin) the rest of the file will be skipped, but the shell itself will not exit.

The --help or -h option displays help about using this command.

fish-shell developers

October 26, 2026 4.9

fish 4.9.3-r4 · os · ingested 2026-10-27