I don't have
.bashrc files and I am definitely using the bash shell. I am using Mac OS X 10.11.1 El Capitan.
How do I permanently modify my
$PATH to cut down the default values Apple ships?
Ask Different is a question and answer site for power users of Apple hardware and software. It only takes a minute to sign up.Sign up to join this community
.bashrc do not have to exist for
$PATH to work, they're for bash configuration. According to the bash docs,
When Bash is invoked as an interactive login shell, or as a non-interactive shell with the --login option, it first reads and executes commands from the file
/etc/profile, if that file exists. After reading that file, it looks for
~/.profile, in that order, and reads and executes commands from the first one that exists and is readable.
To add a path to your
$PATH variable for a single terminal session, do so as follows:
export PATH=$PATH:pathToYourDirectory, for multiple directories
export PATH=$PATH:pathToYourFirstDirectory:pathToYourSecondDirectory ...
To see what's in your
echo $PATH or
/etc/paths is the file that holds your system path variables
man path_helper for more information.