Install Code command on Terminal

Open up Visual Code.
Type cmd + shift + p

Select “install code command in PATH”

You will be prompted for your password.

Type in your password to give Visual Code privilege to install ‘Code’ in PATH.