Go to TogaWare.com Home Page. GNU/Linux Desktop Survival Guide
by Graham Williams
Duck Duck Go

Bash Startup and Exit

20190903 The command line is orchestrated through the use of a so-called shell which both supports its own set of commands and allows other commands to be utilised within the shell. The Bourne Again SHell (bash) is a widely used and mature shell. It is often the interactive shell (command) that is run when a new terminal is initiated.

When Bash is invoked as an interactive login shell it first reads and executes commands from the file /etc/profile, if that file exists. After reading that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile, in that order, and reads and executes commands from the first one that exists and is readable. When a login shell exits Bash reads and executes commands from the file ~/.bash_logout, if it exists.


Copyright © 1995-2020 Togaware Pty Ltd
Support further development through the purchase of the PDF version of the book.
Brought to you by Togaware and the author of open source software including Rattle and wajig.
Also the author of Data Mining with Rattle and Essentials of Data Science.