Bash

From UMIACS
Revision as of 14:42, 28 September 2011 by Derek (talk | contribs) (→‎Paths)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Bourne-again shell

Confiruation Files

Bash has two main configuration files, ~/.bash_profile and ~/.bashrc in addition to the ones provided by the operating system. Please note that they are used differently depending on if you have started a login shell or a interactive shell.

Login shells (ssh, console) use ~/.bash_profile

Interactive shells (additional terminals in X) use ~/.bashrc

Please the MAN page by typing man bash for a complete explanation of features.

Paths

You can see your current paths (colon separated list) by the typing the following in your terminal.

 echo $PATH

You can add additional paths by using the following command

 export PATH=${PATH}:/the/new/path

By moving around the ${PATH} you can control the order that programs are found in your path (the path is looked up left to right).