-
exiting from a manually launched can i stop it from happening? i have lost valuable outputs from last few commands ran in wsl and regretting typing also this is inconsistent behavior. in cmd this does not clear the screen : start cmd sub-shell
> cmd
> dir
> exit neither does: : start powershell sub-shell
> powershell
> dir
> exit but this does: : start wsl sub-shell
> wsl
> dir
> exit sub-sub-shell in wsl does not either: : start wsl sub-shell
> wsl
> dir
: nested shell in wsl
> bash
> dir
: exit from sub-sub-shell
> exit if user really wanted to clear the screen, they can with |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The default "bash logout" script that comes with Ubuntu (and a number of other distributions) clears the screen when the last shell exits to prevent the leakage of sensitive information. You can change this behavior by removing (or editing) Its default contents are as follows (on Ubuntu): # ~/.bash_logout: executed by bash(1) when login shell exits.
# when leaving the console clear the screen to increase privacy
if [ "$SHLVL" = 1 ]; then
[ -x /usr/bin/clear_console ] && /usr/bin/clear_console -q
fi |
Beta Was this translation helpful? Give feedback.
The default "bash logout" script that comes with Ubuntu (and a number of other distributions) clears the screen when the last shell exits to prevent the leakage of sensitive information.
You can change this behavior by removing (or editing)
~/.bash_logout
Its default contents are as follows (on Ubuntu):