Skip to content
Discussion options

You must be logged in to vote

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):

# ~/.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

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by DHowett
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants