Set behavior on command exit

You can set the terminal to exit, restart or remain open when the shell or a custom command exits:

  1. Press the menu button in the top-right corner of the window and select Preferences.

  2. In the sidebar, select your current profile in the Profiles section.

  3. Select Command.

  4. From the When command exits drop down list, select one of the following options:

    • Exit the terminal

    • Restart the command

    • Hold the terminal open

    The setting will be saved automatically when you select it.

If you have set a custom command that is non-interactive, have set the exit behavior to Exit the terminal, and have set the profile to be the default profile, Terminal may exit before you can see the output of the command.