bashlogout
Bashlogout is a term commonly used to describe the Bash logout mechanism, specifically the script and routines that run when a login shell exits. In practice, a user creates per-user logout tasks by placing commands in the file named ~/.bash_logout. Some systems also provide a system-wide logout script, such as /etc/bash.bash_logout or /etc/bash_logout, which runs when any user’s login shell ends, before or after the per-user script depending on the configuration.
How it works: when a login shell terminates, Bash checks for the presence of ~/.bash_logout and, if
Common uses include logging logout events to a file, clearing temporary files or caches, resetting terminal
Notes and limitations: the logout script only runs for login shells, and not for non-login interactive shells