Bash: $PATH explained!


/ Published in: Bash
Save to your folder(s)

For starters, BASH is an acronym meaning Born Again Shell. $PATH are the places where it will look for commands and in the order in which they are placed.


Copy this code and paste it in your HTML
  1. #Show all the available paths
  2. chrisaiv$ echo $PATH
  3.  
  4. #Just for the BASH shell
  5. chrisaiv$ ~/.bash_profile
  6.  
  7. #.profile is for all shells
  8. chrisaiv$ .profile
  9.  
  10. #List all files and make it look pretty
  11. alias ll="ls -lahG"
  12.  
  13. #1 #2 #3 #4 (Existing Paths)
  14. export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH"

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.