![]() PATH is the shell variable that contains the array of directories that bash looks in to find executable programs, and we print the contents of that variable with $PATH. profile, to add a line like: export PATH=/Applications/Postgres.app/Contents/Versions/10/bin/:$PATH To do that, you’re going to edit a hidden file in your home directory (probably /Users/yourname/) called. To add shp2pgsql so you can access it easily, you want to tell your shell that it needs to look in /Applications/Postgres.app/Contents/Versions/10/bin/ for programs. Alternatively, you can edit your PATH to include the path to the directory that includes that program. If you want to run a program that isn’t in your PATH variable, you have to use the “absolute path” - the full path to the program, starting with / for the root directory. Note that I manually added a few paths there: /usr/local/heroku/bin lets me run a handful of specialized heroku commands, and /opt/venvs/vdirsyncer-latest/bin/ lets me run vidirsyncer, which I’m super happy to talk about but is kind of a rabbit hole in this context. usr/ local/sbin:/usr/ local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/ local/games:/snap/bin:/usr/ local/heroku/bin:/opt/venvs/vdirsyncer-latest/bin/ Yours is probably different from mine, but on my primary laptop (which runs Ubuntu, not OSX), my path looks like this: echo $PATH If you run echo $PATH at the command line, you can see a list of all the directories your shell looks in for executable programs. Roughly, your command line interpreter, bash, uses a variable called PATH to decide where to look for programs to run. This is a good explanation of the command path issues we were navigating last time we worked in the terminal: Instructor: Amanda Hickman Fixing your path
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |