log in log out logical expression .login file login name login shell .logout file You can put in the .logout file commands that you want run each time you log out..