PATH (all upper case) is the name of an environment variable on Unix-like operating systems, DOS, OS/2, and Microsoft Windows, specifying a set of directories where executable programs are searched for.

learn more… | top users | synonyms

0
votes
0answers
33 views

ssh system calls and path variables [on hold]

I am confused about the behavior of ssh system calls in my C program. I understand according to man pages that a remote command will not be given access to global path variables. I am trying to use ...
11
votes
6answers
3k views

Refer to a file under the same directory of a script found in $PATH

I have a bash script file, which is put under some directory added to $PATH so that I can call the script from any directory. There is another text file under the same directory as the script. I ...
55
votes
5answers
136k views

How do I set a user environment variable? (permanently, not session)

This is irritating me. I seen several suggestions (all using different files and syntax) and none of them worked. How do I set an environment variable for a specific user? I am on debian squeeze. ...
0
votes
2answers
59 views

export PATH permanently [duplicate]

I have exported the PATH but once I switch to a different terminal or reboot Debian, $PATH is reset. Here are the steps I take: ~$ vim scripts.sh #!/bin/bash echo "Hello" I save it as mybash.sh ...
0
votes
2answers
1k views

trying to install curl with homebrew, getting “incompatible library version” for libcurl.4.dylib

I am on OSX 10.9.5. I would like to use a later version of CURL than what is bundled with OSX, but I do not want to remove the OSX binary just in case, so I wanted to opt to install it via homebrew. ...
0
votes
1answer
679 views

qmake error when installing PyQt5

I'm trying to install PyQt5 for python3 from source files. I install SIP correctly. Then when I want to prepare the make file for installing PyQt, I get this error: #python3 configure.py Error: ...
2
votes
2answers
61 views

Weird behaviour when setting environment variables with .bash_profile: only last export works properly

I am trying to export some environment variables in Unix using the .bash_profile It reads now like this: export PATH=${PATH}:/usr/local/cuda-6.0/bin/ export ...
-2
votes
0answers
48 views

creating new filesystem?

Is it possible to create directory/filesystem that would be beyond unix-like filesystem ( I mean "/" ) so when I will use command pwd , its output would be "example_folder" not "/example_folder" . I ...
3
votes
3answers
52 views

When to use XPG* version of a command?

I occasionally do work on an older Solaris machine whose default version of grep is non-POSIX-compliant. This causes problems in my rc files because the default grep on the machine doesn't support ...
2
votes
1answer
243 views

Why is rsync not found?

rsync -avP /home/user/.profile hpux3:/home/user/.profile bash: rsync: command not found If I did ssh to hpux3 machine rsync version 3.1.1 protocol version 31 Copyright (C) 1996-2014 by Andrew ...
2
votes
1answer
58 views

Script not run with cron [closed]

i have a python script when i launch my script all it's ok but when i lauchn my scrypt under crontab i have this errors: .. 2015-04-24 14:36:02,163 ERROR Problème dans le module ...
2
votes
2answers
68 views

Use alternatives or adding to PATH?

I'm a bit confused about the proper way to make a script globally available from the terminal, like a command. There are two ways, using the alternatives utility, basically making a symlink to ...
2
votes
0answers
54 views

Fixing my PATH variable

I am perplexed by the following problem and hoping someone can help me fix it: when I type echo $PATH, I get the output: /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games However, I ...
2
votes
5answers
7k views

Removing a directory from PATH

I'm trying to compile wxWidgets using MingW, and I have cygwin in my path, which seems to conflict. So I would like to remove /d/Programme/cygwin/bin from the PATH variable and I wonder if there is ...
0
votes
1answer
26 views

does not execute a file on os x with $PATH

I have dowloaded blat from here. I have also added in to executable path: PATH=$PATH:/Users/katja/Desktop/MyDocuments/Programms/blat But I can run the program only from the folder where it is ...
2
votes
1answer
96 views

About executing shell script

Suppose I have a shell script file foo.sh. I can do chmod + x foo.sh and change it into an executable file. In Kernighan-Pike: Unix Programming Environment (UP) they show that after this typing ...
4
votes
1answer
270 views

Why isn't this directory being added to my PATH when I use sudo?

Ive just compiled and installed apache webserver from sources, and now I want to add the apachectl script to PATH I know I need to add the directory to the root user's PATH (as the script needs to be ...
2
votes
4answers
145 views

How can I find the program I'm hiding in bash

Say I have PATH="home/bob/bin:/usr/bin". I am writing a bash script /home/bob/bin/foo that will do some munging and then call /usr/bin/foo. Of course I want to be able to use this script on ...
1
vote
1answer
135 views

How to use libraries installed by nix at run-time?

I'm using nix in "single-user mode" in a system where I'm not the root (see below for a description of my nix setup). I wanted to quickly run one of my binaries which is dynamically linked with a ...
2
votes
1answer
76 views

Change my profile's PATH environment variable on Cygwin

Sadly, I am not at all experienced in coding. I am attempting to use a program to work with GRIB files, here: http://www.nws.noaa.gov/mdl/degrib/compile.php?os=windows. I am compiling as there are ...
2
votes
1answer
44 views

Change Environment Path Variable Order

I am working on a CentOS box and trying to install a newer version of python. CentOS requires python 2.6.6 in order to run properly. To solve this I installed a second python (v 2.7.6) in ...
11
votes
3answers
6k views

How can I set all subdirectories of a directory into $PATH?

It looks like when adding a directory into $PATH, its subdirectories are not added recursively. So can I do that? Or is there a reason why this is not supported?
0
votes
1answer
26 views

Why doesn't commons-daemon ./configure recognize $JAVA_HOME? [closed]

I'm trying to install a tomcat 7 server. I'm following these instructions from the tomcat 7 docs. I also set my JAVA_HOME variable in ~/bashrc as well as ~/.bash_profile and /etc/profile. I can do ...
0
votes
1answer
84 views

Adding commands in a shell script to add a python module path

I want to modify a linux shell script used to install a python module (setup.sh) to add the folder the an environment variable. This is needed so I can run the python module from a terminal. e.g. ...
1
vote
2answers
47 views

I changed my PATH and now for every command it returns “command not found” [closed]

I am on MacOSX, using the iTerm and I'm very new at all of this. I am trying to prepare for installing bioinformatics programs, so I made new directories for "Scripts" and "Programs" and wanted to add ...
1
vote
2answers
25 views

How do I add a program with a directory of dependencies to $PATH?

I want to add a program to my $PATH, but its code is split into various files that it imports at run-time from a lib/ in its root directory. projectRootDirectory ├ programBinary └ lib ├ someLibrary ...
1
vote
1answer
59 views

Bash cannot see PATH update

I am running Debian on a VM. I login to the GUI and go to Applications > Accessories > Terminal. # echo shell: /bin/bash I modified ENV_SUPATH, ENV_PATH inside of /etc/login.defs. I restarted ...
0
votes
2answers
50 views

Cut a string up to a certain character [closed]

I've searched the site and I've seen similar questions but I couldn't get them to work. I tried to follow: Splitting a string up to a specific location but it didn't work. I working with Korn. I ...
1
vote
3answers
43 views

adding PATHs for a bunch of programs

I have a big list of programs (samtools,annovar,bra,bedtools etc) in a "Programs" folder. I have read lots of posts about exporting the path, so that I do not need to identify the whole path to the ...
1
vote
3answers
3k views

moc command not found?

On my Gentoo systems I've never had a problem with this and I run moc as I run any other command in the terminal. I recently switch to Fedora 15/16 and notice that running moc doesn't work. I get ...
1
vote
3answers
1k views

I get a “command not found” error, though the script file is shown by “ls”

I want to run yii console commands in shell. I run protected/yiic in the console, yet it fails, yielding -bash: yiic: command not found What's the problem? See the shell commands and responses I ...
0
votes
2answers
231 views

How do I correct the path for pip?

I'm trying to get pip to point to a different install rather than the default. It is currently pointing to /usr/bin/pip, but I want it to point to /usr/local/bin/pip. I believe I have the path set ...
1
vote
1answer
60 views

How can I get $PATH to always include $(pwd)/sub_directory/.bin

If the path ~/dev/project1/node_modules/.bin/ionic exists, and my working directory is ~/dev/project1, I would like to be able to just type ionic and hit enter. I could include all those ...
4
votes
5answers
2k views

A system-wide way to set or get $JAVA_HOME in Ubuntu?

I wonder whether Ubuntu itself provides a system-wide way to find the current JAVA_HOME or whether there is right place for setting JAVA_HOME. Mac OS X does well in this, for /usr/libexec/java_home ...
6
votes
5answers
193 views

execute a command in $PATH matching a wildcard

I'd like to find and execute a command in the current $PATH matching this wildcard libreoffice?.? (eg. libreoffice4.0, libreoffice4.3, etc.) EDIT: if multiple matches are found, you can pick one ...
8
votes
3answers
1k views

Is there a way to add a directory to my PATH in zsh only if it's not already present?

Is there an easy way in zsh to add a directory to my PATH only if it's not already present? (or, more generally, any environment variable). I've tried: PATH+=/my/directory ... but if that's ...
-1
votes
2answers
31 views

Split of path in an order [closed]

Help me in splitting an path in this way /sandy/user1/user2/abc.txt /sandy/user1/user2 /sandy/user1 /sandy /
0
votes
1answer
45 views

Where to “install” node application and best way to launch

I'm pretty new to the Linux world, I have a Node application that I would like to distribute through an apt repository, this is what I do for now: Put the node binary inside the Node application ...
24
votes
12answers
5k views

Remove duplicate $PATH entries with awk command

I am trying to write a bash shell function that will allow me to remove duplicate copies of directories from my path environment. I was told that it is possible to achieve this with a one line ...
0
votes
2answers
617 views

Amazon Linux - update path to java

I downloaded a fuller version of java, and I wanted to update the default path to java. I tried updating the bashrc file as they did here ...
2
votes
1answer
45 views

I Modified my PATH when installing git. What is the default path on Mac?

When I was troubleshooting a git install, I did a few things. I think that I modified my default path. Echo $path returns ...
0
votes
2answers
47 views

Different PATH formats for .bash_profile [duplicate]

There are few different formats I have seen so far: With quotes and brackets: PATH="/usr/local/bin:${PATH}" With quotes only: PATH="/usr/local/bin:$PATH" None: PATH=/usr/local/bin:$PATH ...
200
votes
6answers
337k views

How to correctly add a path to PATH?

I'm wondering where a new path has to be added to PATH environment variable. I know this is accomplished editing .bash_rc (for example), but it's not clear how to do this. This way: export ...
2
votes
2answers
65 views

How do I allow privileged commands to fail but respond?

I am reading up on several commands, some of which are privileged and some that may or may not be installed. My system (gentoo) will respond with command not found sometimes when the program in the ...
0
votes
0answers
14 views

Changing log paths for specific Packages - Raspbian

I am currently running bind9 with logging enabled via cmd rndc querylog This begins storing logs for bind9 in /var/log/syslog How can I tell bind9 to store the logs in a different file, ...
3
votes
1answer
39 views

Puzzle over sudo and paths

I have a couple of programmes which are in /usr/local/bin which require root privileges to run. If I run sudo my_prog I get sudo: my_prog: command not found I have to write sudo ...
0
votes
2answers
3k views

how to set crontab PATH variable

I had a problem running a script from crontab. After some research I understood the problem was because PATH parameter doesn't include /sbin. I looked what it does include in /etc/crontab: ...
14
votes
6answers
1k views

How can I cleanly add to $PATH?

I'd like a way to add things to $PATH, system-wide or for an individual user, without potentially adding the same path multiple times. One reason to want to do this is so that additions can be made ...
0
votes
2answers
44 views

Locate specific file from script

I've written a script file in which, one function searches for another script and if found, executes that script. Script extract #!/bin/bash ... service_status() { local my_script=`which ...
2
votes
1answer
54 views

how to change git path?

So I just installed the latest git, with the official mac installer. I'm on Mavericks. Sadly, git --version is still git version 1.9.3 (Apple Git-50) and which git gives me: /usr/bin/git ...