Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Typically we interact with the Linux operating system through what is referred to as a shell interpreter. A common interpreter is the Bourne Again Shell, which people call by the catchy name of Bash. Think of the relationship of the shell Shell and Linux like that between your steering wheel and your car. The steering wheel is not the car, just as Bash is not Linux. Rather the steering wheel lets you interact with your car in ways that make the car useful, just like typing commands into the shell Shell lets us make Linux do our bidding.

When one opens up a new shell Shell window (the Terminal utility on the Mac, for instance) a program is run in the background unbeknownst to us. This program is the Bash profile and is called “.bash_profile”. This is a script that includes Bash commands and is located in one’s home directory. Bash commands are simply those commands that one can type into the Bash shell Shell (all the stuff we normally use is fair game, like ls or cd, but there are ways to make the program more useful than printing the contents of one’s home directory to STDOUT, see below).

...

Note that if you edit your profile in Nano to save and exit the program see the instructions at the bottom of the editing window. Also, to use the your spiffy new Bash profile you just made you either need to open up a new Shell or source the program. To do the latter, simply type “source .bash_profile” (a path to the profile can be provided, one doesn’t have to be in one’s home directory to source the program. Source just means to run a program)