Update PATH var in linux (Macosx)

I order to add to $PATHS systemwide var you can easily edit /etc/paths.d. You can add a file that has paths you would like to append to the $PATHS var. Make sure you have proper permissions to create a file in /etc/paths.d

sudo su && vim /etc/paths.d/werm

close your shell then jump into a new one

echo $PATH

this is your result no matter what user or type of shell

/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:/usr/local/bin/werm:~/.dotnet/tools

Leave a Reply

Your email address will not be published.