.bashrc: Difference between revisions

From Thom Group Wiki
Jump to navigation Jump to search
import>Tes36
(Created page with "Upon startup the .bashrc file is executed. It contains command line inputs. Add new inputs to this file if you find yourself wanting to issue the same shell commands over and ...")
 
import>Tes36
No edit summary
Line 8: Line 8:
== Path ==
== Path ==
The path statement is where the shell checks for executable files. These files must be in the path, else they will not be found. Your path always includes the directory you are currently browsing, but you can add other directories to be permanently in the path by writing a line of the form:
The path statement is where the shell checks for executable files. These files must be in the path, else they will not be found. Your path always includes the directory you are currently browsing, but you can add other directories to be permanently in the path by writing a line of the form:

"export PATH=~/qcmagic:$PATH"
<div class="center" style="width: auto; margin-left: auto; margin-right: auto;">"export PATH=~/qcmagic:$PATH"</div>

Revision as of 09:23, 21 August 2015

Upon startup the .bashrc file is executed. It contains command line inputs. Add new inputs to this file if you find yourself wanting to issue the same shell commands over and over, such as modifying the $PATH. You can also create alias, and short functions.

Nature of the beast

The .bashrc file is hidden, and lives in the home (~) directory of the user. To see hidden files in a list, use ls -a. If you have made changes to .bashrc, you can rerun the file while in the home directory rather than restarting the terminal. E.g. ". .bashrc"


Path

The path statement is where the shell checks for executable files. These files must be in the path, else they will not be found. Your path always includes the directory you are currently browsing, but you can add other directories to be permanently in the path by writing a line of the form:

"export PATH=~/qcmagic:$PATH"