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

3
votes
2answers
82 views

echo $PATH shows path to python scripts, but they cannot be executed

I am new to using the shell, and wanted to create a directory in $HOME where I can put all my python scripts, set a path to that directory, so that I can go into any folder on my Mac and execute those ...
0
votes
1answer
14 views

I have the latest version of hping3 installed, but Bash says “command not found”

I'm trying to use the hping3 tool on Debian GNU/Linux (Jessie), and it doesn't want to play nice. When I run apt-get install hping3, it tells me that it's at the latest version already. When I run ...
8
votes
7answers
2k views

List all binaries from $PATH

Is there one-liner that will list all executables from $PATH in bash.
5
votes
4answers
17k views

Adding directory to PATH through Makefile

I'm having some trouble in exporting the PATH I've modified inside the Makefile into the current Terminal. I'm trying to add to the PATH, the bin folder inside wherever the Makefile directory is. ...
0
votes
3answers
29 views

Add PATH to .bashrc

I am trying to install Anaconda on my Linux machine. Right or wrong, at the end of the instructions they say to add this line to the file .bashrc in your home directory: export ...
0
votes
1answer
25 views

$PATH variable for CRON in OpenSuse

I have a script written which works perfect on terminal however gives error when called through crontab. It took me a while that the problem is with the cron environment not my script. so I tried ...
0
votes
0answers
21 views

add android studio to PATH environmental variable?

I looked around some sites and yielded no success. I tried to modify .bashrc: # User specific aliases and functions export PATH="~/android-studio/bin/:$PATH" and after I typed studio.sh on the ...
2
votes
1answer
54 views

How to add my MATLAB to PATH?

I have read this thread on how to correctly add the paths: How to correctly add a path to PATH? I have already exported path ...
0
votes
0answers
15 views

How to edit $PATH? [duplicate]

After searching, I can't still figure out how to edit $PATH. Now its value is: ...
0
votes
1answer
16 views

bash: /home/hadoopuser/hadoop/sbin: Is a directory

I am in Ubuntu 14.04 LTS. Based on how to set a Hadoop cluster I am executing this: # Add Hadoop bin and sbin directory to PATH export PATH=$PATH:$HADOOP_HOME/bin;$HADOOP_HOME/sbin where I know ...
27
votes
3answers
18k views

How to make `sudo` preserve $PATH?

I need to run a program installed on /opt/godi/sbin (a custom directory). If I add that directory to my PATH, by adding the following line to my .bashrc file export ...
2
votes
0answers
11 views

How can I add my program to system program list (Ubuntu 14.04)? [duplicate]

I made a my program in c++ and generated its executable but every time I need to use my program I need to change my directory to the folder and then execute it. How do I make my program run like an ...
3
votes
1answer
1k views

How to set the path OSX applications use

I'm running Mountain Lion 10.8.4, and have my environment all customized through ~/.profile so that when I run GUI apps like Sublime Text or Eclipse from the command line open /Applications/Sublime\ ...
3
votes
2answers
3k 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
2answers
23 views

How to set the path for one cron command

I had programmed a cronjob to restart a service with an apparent memory leak weekly and got an email saying that the killproc command wasn't found. That's in /sbin/killproc and I don't want to ...
0
votes
2answers
30 views

Insert path in file

I have the a file.dat and would like to insert the path of this file as first line. Can anyone help me with this please ? Thanks in advance
3
votes
2answers
85 views

Handling duplicate programs names bash

I'm wondering if $PATH cascades entries. You'll all need to take a leap of faith with me here, but here it goes. Let's say we have a Java executable at /usr/bin/java but this version is very old and ...
1
vote
1answer
21 views

Add to path if in subdir

How can I add a file to the path if the working directory is the directory of the file or one of its subdirectories? So when I'm in /foo or in /foo/bar/ I'll have /foo/foo.foo in my path, but if I'm ...
7
votes
5answers
638 views

PATH environment variable in linux [duplicate]

I want to know how the standard environment variables given by the linux OS like PATH, HOME are set automatically. In which file are these read from. There should be some file from which these ...
3
votes
1answer
90 views

History of UNIX not including current directory in $PATH

In the UNIX world, it's well understood that you need to prefix binaries in the current directory with ./ in order to run them: . is not in $PATH by default. This is to avoid evil binaries overriding ...
0
votes
1answer
1k 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: ...
0
votes
1answer
13 views

DMD (D Compiler) home folder location

this might be a pretty dumb question, I installed DMD (the official compiler of the D programming language) in Fedora via the .RPM package I downloaded from the official website. Well, all of this ...
333
votes
7answers
597k views

How to correctly add a path to PATH?

I'm wondering where a new path has to be added to the PATH environment variable. I know this can be accomplished by editing .bashrc (for example), but it's not clear how to do this. This way: export ...
0
votes
0answers
13 views

problem locating module in ubuntu, visible through Anaconda but not accesible

I have Ubuntu 12.04. I have installed Anaconda3 latest version. It has python3.5 which is default for the system now. Some of the programs require using python2.7 which I invoke as follows ...
4
votes
2answers
1k 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 ...
14
votes
6answers
12k views

Why are PATH variables different when running via sudo and su?

On my fedora VM, when running with my user account I have /usr/local/bin in my path: [justin@justin-fedora12 ~]$ env | grep PATH ...
1
vote
2answers
40 views

Metasploit Directory Doesn't Run Executables Without ./

I have Metasploit installed on OSX in /usr/local/share/msf Metasploit's executables can't be run outside it's directory thus would give a command not found error. msfbinscan msfconsole msfd ...
3
votes
2answers
80 views

How to know why and where the $PATH env variable is set?

I'm using zsh 5.0.8 version in iterm2 on OSX. I start my computer and printenv shows me the $PATH variable: /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/git/bin from my understanding, ...
1
vote
1answer
31 views

How to change PATH priority for specified command in zsh

I installed vim by using brew, but because /usr/bin have higher priority than /usr/local/bin/ the /usr/bin/vi is called by default. which -a vi /usr/bin/vi /usr/local/bin/vi I can create a alias in ...
0
votes
2answers
79 views

echo $PATH does not show added path in .bash_profile or /etc/profile

I have just installed LaTEX and need to add the path to my $PATH variable so I can use the command. I have tried adding path (/usr/local/texlive/2015/bin/x86_64-linux) to my .bash_profile and when I ...
0
votes
1answer
48 views

why Whereis not able to show command path, while which is working correctly? [duplicate]

I have created a executable bash shell script file command. I added directory path of my custom command to $PATH variable, but whereis not showing the command path but which shows correctly. I am ...
23
votes
3answers
11k views

Duplicate entries in $PATH a problem?

I source bashrc's of few of my friends. So I end up having duplicate entries in my $PATH variable. I am not sure if that is the problem for commands taking long to start. How does $PATH internally ...
2
votes
3answers
22 views

Managing packages, directories and PATH in Unix (OSX)

I'm a PhD in bioinformatics, mostly self-taught, and I'm coming to a point where I want to clean up my various directory structures (i.e. my data), but I'm also thinking about how I'm storing the ...
4
votes
1answer
267 views

/etc/paths in OS X and other Unices

Is /etc/paths read by every shell that I run in OS X? For example, if I use zsh, will it parse /etc/path to populate $PATH? What exactly is the sequence that OS X follows to populate $PATH? Does it ...
0
votes
0answers
82 views

python3 no module named 'cv2'

I am running an Ubuntu 14.04. I installed opencv from the latest source with cmake to with install prefix usr/local. It seems to be on my path (note ...
2
votes
2answers
62 views

Why running command as sudo returns command not found?

Sample command: drush cc all works, but this: sudo drush cc all gives me: sudo: drush: command not found Why? How to fix this?
10
votes
4answers
1k views

Why is my program called “set” not being executed?

I've created a simple C program like so: int main(int argc, char *argv[]) { if (argc != 5) { fputs("Not enough arguments!\n", stderr); exit(EXIT_FAILURE); } And I have my ...
0
votes
2answers
39 views

'cd //; pwd' # What's happening here? [duplicate]

A coworker just pointed out something odd, and I'm curious what the explanation might be. On the systems I've tried, cd /', 'cd //', and 'cd ///' all have the effect of changing directory to the file ...
2
votes
1answer
2k views

When I run “sudo su” I get --bash: command not found for everything

I'm not good with command lines or servers. But I needed to configure for work a AMI of EC2 AWS with LINUX So I've installed a lot of stuff, moved a lot of stuff around and then I realized that sudo ...
1
vote
3answers
91 views

How to check for valid $PATH directories, and output them telling whether each one is valid or not?

Ok so I got this: check="${PATH//:/'\n'}" The above gets me each path in a simplified manner, and formats it nicely into a variable. Now how do I check each line for existence, and state that for ...
15
votes
4answers
3k views

Share aliases and PATH setting between zsh and bash

The shell that I normally use is zsh. I have several aliases to enable color in some programs such as ls and grep. I've also set my custom path so that I can execute programs in non-standard place ...
2
votes
1answer
32 views

building code from source and adding them to your path

Typically on Debian when you install things from the repository, they just work. It sets up things just fine and life is good. This is great for things that are up to date in the repository. I am ...
2
votes
3answers
766 views

Select default binary to use

This is the output from which -a autoconf: /usr/bin/autoconf /usr/bin/autoconf /home/amumu/root/bin/autoconf I want to use autoconf in my home directory since it's newer version compare to the ...
1
vote
3answers
33 views

How to control pathing when executing a string command using bash -c?

Background, I am trying to use a Python library that spawns a subprocess using arguments ["bash", "-c", "python someScript.py"]. What's happening is Python 2.6 is executed, but I want python2.7 ...
4
votes
2answers
6k views

Basic commands in Unix not working i.e: -bash: ls: No such file or directory

I'm new to Unix and in the process of installing a program for my dissertation I must have played with the PATH for the basic Unix commands such as ls. Every time I type ls and the directory name I ...
7
votes
4answers
268 views

Execute a command where a file is found

How do I execute a command where a file is found? Consider I've an directory named testdir that contains the following: $ ls -R testdir/ testdir/: dir1 dir2 dir3 dir4 dir5 testdir/dir1: doc1.pdf ...
2
votes
1answer
18 views

Bizarre path description

I think this a silly question but I don't know the answer. I have a checked out a project with file hierarchy: REPO/project/src/multiple sub-directories here I am reading some documentation and at ...
1
vote
0answers
22 views

how to set up path in .cshrc? [duplicate]

I am installing one software in linux. How to setup path in .cshrc. The directory of my software is /home/software. Now I want to set up its path in .cshrc file. Using vi .cshrc I extended the PATH ...
2
votes
1answer
6k views

Unable to log in. xsession-errors file looks like it could be useful if I understood

I am unable to log in to my account, having recently installed Linux Mint. I had this problem with Ubuntu 13.10, and no amount of re-installations seemed to fix it. However, Mint gives me a very ...
2
votes
2answers
206 views

How to set PATH for R installed in my directory

I would like to install “R” into my directory in the server, Here is what I have tried following the guidance here: Install R in my own directory wget ...