How to export to $PATH permanently because .bashrc file doesn't exist in $HOME directory I am trying to figure out macOS and want to install Composer which was not a problem....but I need the Laravel and Symfony installer and in the documentation it says that I need to export the variable in .bashrc file.

Normally that file is in /home/username/ directory on Linux

But where is the .bashrc file on the Mac? How to export to the PATH?
It should be stored in /Users/username/. To append something to your .bashrc file use 

echo foo &gt;&gt; ~/.bashrc


Make sure to use &gt;&gt; and not &gt;, as the latter will overwrite the file. 

As @fd0 said, you probably want this in your .bash_profile to make sure it loads. I would append to your .bash_profile like this:

echo "export PATH="$HOME/path/added:$PATH"" &gt;&gt; ~/.bash_profile