You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Can we exit terminal completely when command exit is called? #11179
Issue-FeatureComplex enough to require an in depth planning process and actual budgeted, scheduled work.Resolution-DuplicateThere's another issue on the tracker that's pretty much the same thing.
I usually enter command exit to exit cmd.exe or conemu which exits the process. But with terminal, it displays:
Now, need to grab mouse and click the close button to close it completely. Interestingly, when I have quake mode, there is no x button to close it so I need to take help from trusted friend Process Explorer to kill Terminal.
Note: this happens for the first tab, splits and other tabs seem to exit fine.
By default "Profile termination behavior" in "Advanced" settings is "Close only when process exits successfully". By selecting first option "Close when process exits, fails, or crashes" will close a cmd.exe session without the [process exited with code 1] message.
Thanks for the report! Please make sure to search for duplicates when filing new issues. There's already a decent amount of discussion in the above issues explaining why this happens.
This behavior exists to stop an error message printed out by a program from disappearing instantly when it exits. There is a class of applications for which that is extremely important. We're following this behavior because it is the right brhavior to follow, and because you can turn it off with a config option very easily.
Alas, this is a behavior that's highly conserved across multiple shells and terminal emulators on most mainstream operating systems; more info in #4223 (comment). If you'd rather it just exit every time, set closeOnExit to true. 😄 /dup #4223.
And of course, as mentioned elsewhere in this thread, the closeOnExit setting can change this behavior if you're really used to using exit to close your terminal windows. You can read more about it in the docs here.
Issue-FeatureComplex enough to require an in depth planning process and actual budgeted, scheduled work.Resolution-DuplicateThere's another issue on the tracker that's pretty much the same thing.
Activity
DHowett commentedon Sep 8, 2021
(You can also close it with Ctrl+Shift+W.)
Over to Mike Griese (@zadjii-msft) for his cached response 😄
elsaco commentedon Sep 9, 2021
By default "Profile termination behavior" in "Advanced" settings is "Close only when process exits successfully". By selecting first option "Close when process exits, fails, or crashes" will close a cmd.exe session without the [process exited with code 1] message.
Sample config:

LuanVSO commentedon Sep 9, 2021
type this isntead:
zadjii-msft commentedon Sep 9, 2021
Thanks for the report! Please make sure to search for duplicates when filing new issues. There's already a decent amount of discussion in the above issues explaining why this happens.
#4263 (comment)
#4736 (comment)
And of course, as mentioned elsewhere in this thread, the
closeOnExitsetting can change this behavior if you're really used to usingexitto close your terminal windows. You can read more about it in the docs here.