How do I set the $PATH environment variab…
Imported from the Apple Support Forums via the Wayback Machine 🔗
I am very frustrated. All I want to do is to be able to run shell scripts, that are located on my desktop, in terminal. That's it. Of course, the $PATH environment variable has to be changed in order to do that. I've tried everything. I've tried editing etc/paths via the root account. I've tried creating a .bash_profile in my home folder. Neither works. I think at one point I got it to say "Permission Denied", and then I tried the same command with sudo behind it, I got a "command not found" error. Furthermore, when I type env in terminal to see what the current path is, the last path(there are multiple paths in the PATH variable) is nowhere to be found in the etc/paths file. The rest of the PATH variable is in etc/paths, but the last one isn't. When I last edited etc/paths by just pasting the appropriate path on a new last line in the file, when I typed env in terminal, it add stuff that I didn't type. Like I pasted Users/Me/Desktop in etc/paths, and when I typed env, that part part of PATH said Users/Me/Desktop/sbin:sbin. Oh, and if it's of any help, if I just type $PATH in terminal, I get a 'no such directory' error.
I think I'm missing something. This shouldn't be this hard. I'm very frustrated over something that should be simple. Any assistance is appreciated.
6 replies
Sign in or join Beachball Help to reply.
- 0
- 0
- 0
- 0
- 0
- 0