Understanding Bash (Part 1)

When you logged on there are 4 files that are associated with BASH

  • .bash_history (list of previously entered commands)
  • .bash_logout (run a script when Bash exit)
  • .bashrc (basic settings for prompt actions)
  • .bash_profile (additional configuration. If .bash_profile is not present, the user account will use /etc/profile)

Adding a Directory to a Path
To add a directory to a path, edit the .bash_profile
$ vim .bash_profile

------------------------------
PATH=$PATH:/usr/local/bin
export PATH
------------------------------

Putting Aliases
One of the appropriate place to put aliases is in .bashrc