Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I see my $PATH on Mac

Tags:

terminal

macos

I've been struggling with "PATH" issues while setting up Rails and other things on Mac for a long time now, and I can't get a straight answer about how I can just see my $PATH and change it. I'm just running the Terminal right now, but if I need to run another program to run Bash commands or something I can probably figure out how to do that.

like image 363
Tommy Nicholas Avatar asked Aug 31 '25 16:08

Tommy Nicholas


1 Answers

Execute the following command in Terminal to view the current value of PATH:

echo $PATH

To modify this PATH variable, create a .bash_profile file in your home directory (/Users/username/.bash_profile) and add a line similar to this:

export PATH=$PATH:/new/directory/location
like image 122
Gergo Erdosi Avatar answered Sep 02 '25 07:09

Gergo Erdosi