Set / Change $PATH Variable

Set / Change $PATH Variable

Showing the $PATH Variable

echo “$PATH”
or
printf “%s\n” $PATH

Setting or changing the $PATH Variable

  1. $HOME/.bash_profile file using export syntax.
  2. /etc/paths.d directory.
nano $HOME/.bash_profile

export PATH=$PATH:/new/dir/location1 export PATH=$PATH:/new/dir1:/dir2:/dir/path/no3

Reacties zijn gesloten.