MacOS’ terminal default behaviour prevents the program from closing the window after typing the
logout command. For a Windows guy like me this is a strange behaviour and I much prefer the other way around.
Thankfully, making it behave this way is fairly easy.
Open the terminal preferences
The first step is to open the terminal preferences. You can do this, as explained in a previous article, by clicking on Terminal > Preferences on the top bar or by pressing the keyboard shortcut ⌘ + ,.
Click the Profiles tab
Once again, the Profiles tab is our friend. Last time we worked mainly with the Text tab within it. This time, we’ll need to click on Shell.
The second option is marked as When the shell exits. Change its value to Close if the shell exited cleanly, then close the options window.
Note: this setting only applies to the currently selected profile. If you change it, remember to edit that option accordingly.
Here’s what will happen when you type the