Using bash startup files
Until now, to perform a task or set anything for a given shell, we had to execute the needed commands in a shell. One of the main limitations to this approach is that the same configuration won't be available in a new shell. In a lot of cases, a user may want that whenever he or she launches a new shell, whereas instead a new customized configuration on top of the default configuration is available for use. For customizing bash, three files are available in a user's home directory that get executed by default whenever a user launches a new bash. These files are bashrc
, .bash_profile
, and .bash_logout
.
.bashrc
In a graphical system, mostly a non-login shell is used by a user. To run a non-login shell, we don't need the login ...
Get Linux Shell Scripting Essentials now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.