I used to be a windows user for years and years. However, recently due to team consistency, I switched to Mac. Pretty awesome though and I learned a few things since you need to be a good command writer to do even basic things in Mac.

Add a path to my system

vim ~/.bash_profile

add your path to one of the existing path and separate it with colon

export PATH="**/usr/local/packer:**/Users/yourname/anaconda/bin:$PATH"
echo $PATH

If you only want to have access to a stand alone file without any dependency, simply define a aliad instead of adding whole the folder to the path.

alias pak="/usr/local/packer/packer"

then you can simply run packer file.
Just bear in mind that you wont see imidiately the result. So, you need to relaunch Terminal or run this command

source ~/.bash_profile 

Copy a file

sudo mkdir packer
sudo cp ~/Downloads/packer /usr/local
when we use ~/folder it consider your Users/yourname folder as the relative path
to go to the toppest level usr you can run cd /usr

Change host file

vim /private/etc/hosts