User Tools

Site Tools


Editing your .bash_profile and .bashrc

Thus far you've learned how to navigate, execute some commands, and create aliases. But how do you make your changes stick between logins? Now that you've learned the basics of scripting, the standard configuration files should make more sense to you.

The answer is with a configuration file, called .bash_profile or .bashrc. These are dot files, as they being with a dot '.' My linux convention, they are hidden when you do a ls in a directory without special flags.

To show them, you must add the -a (for all).

$ ls -a

Whereas, without the flag, these files and directories are hidden:

$ ls 

Dot files

Dot files are meant for configuration and data, and various programs create them in order to avoid clutter with the other documents in a directory. Lots of programs use them. Other examples include, but are not limited to:


Today, we will be using .bashrc, which sets up an environment for every session. The file .bash_profile is executed for your initial login, but on summit, certain definitions must be restated after job submission. That is done with .bashrc.

wiki/2018bash_profile.txt · Last modified: 2018/07/16 12:13 by david