Bash: Difference between revisions

From UMIACS
Jump to navigation Jump to search
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
'''Bourne-again shell'''
'''Bourne-again shell'''


=Confiruation Files=
=Configuration 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.
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.


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


Please the [[MAN]] page by typing <code>man bash</code> for a complete explanation of features.
Please see the man page by typing <code>man bash</code> for a complete explanation of features or see the [http://www.gnu.org/s/bash/manual/bash.html Bash Reference Manual].
 
To change your shell, see [[shell]]


=Paths=
=Paths=
Line 19: Line 21:
   export PATH=${PATH}:/the/new/path
   export PATH=${PATH}:/the/new/path


By moving around the ${PATH} you can put the path at the front of the list or the back.
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).

Latest revision as of 18:01, 21 April 2016

Bourne-again shell

Configuration 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 see the man page by typing man bash for a complete explanation of features or see the Bash Reference Manual.

To change your shell, see shell

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).