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
1answer
27 views

Bash ignoring my PATH and it's cache

I have installed pip in my ~/.local/bin/ directory. Here are the outputs of which, type and $PATH $ type pip pip is hashed (/home/bcc/pedros/.local/bin/pip) $ which pip /usr/bin/pip $ echo $PATH ...
4
votes
3answers
474 views

Does sudo a command temporarily change $PATH to be the root's?

When running sudo <command> under a user login session, will that change $PATH to be the root's $PATH during the running of sudo <command>? If <command> relies on the user's $PATH, ...
1
vote
2answers
62 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 ...
2
votes
3answers
55 views

bash: iptables: command not found

How do I fix the iptables: command not found problem that happened to Debian 7.6? batman@gotham:~$ uname -a Linux gotham 3.14-0.bpo.2-amd64 #1 SMP Debian 3.14.13-2~bpo70+1 (2014-07-31) x86_64 ...
0
votes
1answer
44 views

`command` vs `type` - Locate program file in user's PATH [duplicate]

I need locate program file in user's PATH. I found few solution, the best are command and type. Which is better, faster, UNIX-like way and why? command -v <application> type -p ...
2
votes
2answers
44 views

How is PATH set for users in puppet?

I'm having an interesting problem which I was able to work around by manually specifying PATH. The problem is that although my root user's PATH is: ...
0
votes
1answer
32 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
46 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: ...
-1
votes
1answer
26 views

bash: adduser: command not found on centOS

I installed centos 5.5 on my vmware 8 recently and i am trying to add a new user on the system. I am unable to add the user unless i use su - option. I believe it has to do something with path not set ...
0
votes
1answer
37 views

What do you do when you try to sudo and root's PATH has gone kerblooey?

I've got a feeling something bad just happened to this machine. faheem@bulldog:/usr/local/src/mercurial$ sudo dpkg -i mercurial_3.0-1_amd64.deb mercurial-common_3.0-1_all.deb dpkg: warning: ...
0
votes
0answers
14 views

In Ubuntu, what is the folder in which MySQL's UDF should be installed?

I am using Ubuntu 14.04. I wonder where should I install binary UDF for MySQL. Is there any way to discover the path of the UDF directory? Is there a standard for this in Ubuntu?
0
votes
1answer
18 views

paths for searching executables [duplicate]

My old xournal is 0.4.5, which is /usr/bin/xournal. I just installed a new version 0.4.8 by compiling from source to /usr/local/bin/xournal. When I call xournal directly from the terminal, it is the ...
1
vote
1answer
42 views

PATH update does not stay after reboot

I have updated the PATH environmental variable on a Redhat distribution but after reboot, the path is gone. To add the path: PATH=/opt/rh/mysql55/root/usr/bin export PATH echo $PATH ...
0
votes
1answer
49 views

path in environment variable PATH, but command still not found

I am working with a Redhat distribution. Mysql is installed with the binary in the following path: /root/opt/rh/mysql55/root/usr/bin/mysql Furthermore, the environmental variable PATH echos: echo ...
2
votes
0answers
25 views

How to set up environment after installation of a software inside home directory?

I am not familiar much with environment and path settings in UNIX environment. I have installed CDO (climate data operators) in a folder in my home directory. I am only able to run it when I go into ...
4
votes
1answer
148 views

Keep getting the same result after “export PATH”

I am doing this: $ which cabal /usr/bin/cabal $ export PATH=$PATH:$HOME/.cabal/bin $ which cabal /usr/bin/cabal I expect to get /.cabal/bin/cabal for $ which cabal (this path exists) after this. ...
3
votes
2answers
97 views

Getting the current path in .desktop EXEC command

Im trying to make a .desktop file run a .sh which is stored in the same directory as the .desktop. The whole directory needs to be portable and moved from machine to machine. my run script is run.sh ...
0
votes
0answers
39 views

-bash: android: command not found

I'm on a Mac running Mavericks trying to learn how to develop Android apps (in the process I'm learning bash too). To run on the emulator they suggest the command android avd. I always get the error ...
4
votes
1answer
44 views

How to update 'command cache' after change of soft links?

I have changed multiple soft links on my system with ln -f -s. When I view the link with ls -l, I see they point to the right target. However, when I try to run the command, it still tries to use the ...
1
vote
1answer
69 views

Terminal sometimes fails to find executables on local directory [duplicate]

I can open my terminal emulator via a keyboard shortcut or through the apps finder that executes the exo-open --launch TerminalEmulator command. My terminal starts and I can cd to any directory and ...
1
vote
2answers
205 views

Setting PATH vs. exporting PATH in ~/.bash_profile [duplicate]

What's the difference and which is better to use when customizing my bash profile? Documentation on the export command is scarce, as it's a builtin cmd. Excerpt from version 1 of my ~/.bash_profile: ...
1
vote
2answers
74 views

Alias from .bash_profile is not reflected across the system

I have few path settings and alias in .bash_profile, and I am exporting those. For example: alias gcc=/abc/def/......./myrtgcc export gcc And I want use myrtgcc to compile C programs either from ...
1
vote
2answers
50 views

Hardcoded /usr/bin/env in configure scripts

I'm building a Linux system that doesn't have a /usr directory. Getting the toolchain to work was surprisingly easy, but I'm hitting this irritation with a lot of auto* scripts: configure, etc. often ...
0
votes
3answers
65 views

How do I create this symbolic link in Unix?

I want to run gmake when I run make, so I am creating a symbolic link. My gmake is inside /usr/local/dist. My make is inisde /usr/ccs/bin. Is this the correct command: ln -s /usr/local/dist/gmake ...
1
vote
3answers
223 views

Add $HOME/bin to PATH for a single user in Debian Wheezy with LXDE

In Ubuntu, if $HOME/bin exists, it will be automagically added to PATH, but this doesn't happen in Debian. How do I permanently add it to PATH for a given user, but only for him, not for all users? I ...
0
votes
1answer
80 views

Why $PATH variable different between two directories?

When I'm in one directory and echo path pwd /Users/me/src/some_proj echo $PATH /Users/me/.gem/ruby/2.0.0/bin:/opt/boxen/chruby/versions/2.0.0- ...
0
votes
2answers
32 views

env command shows 3 times same path

When i run env it shows 3 times /usr/bin under PATH . Same for every path under PATH title. For example - my scala bin directory shows 3 times . However, in my .bash_profile, it is written just one ...
2
votes
2answers
200 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
2answers
37 views

remove files after insertion into tarball

I want to limit the number of files that get put into a tar ball and erease them after they've been inserted into the tarball and being indipendent from the current directory. I've tried this: tar -C ...
12
votes
1answer
283 views

Percent in $PATH environment variable

My $PATH looks like this: ...
0
votes
1answer
63 views

Path variable not being set properly in zsh

For some reason, my $PATH variable is not being set properly which means I can't run a lot of commands I would like to. Here are the relevant lines from my .zshrc file: if [[ -f ~/.profile]]; then ...
17
votes
4answers
801 views

Path independent shebangs

I have a script that I want to be able to run in two machines. These two machines get copies of the script from the same git repository. The script needs to run with the right interpreter (e.g. zsh). ...
10
votes
6answers
606 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 ...
1
vote
0answers
59 views

'ls' not working, wrong PATH variable [closed]

ls is not working [root@xilinx ~]# echo $PATH /root/usr/bin:/root/usr/bin [root@xilinx ~]# ls bash: ls: command not found Was trying to add; > PATH=/root/CodeSourcery/Sourcery_G++/bin:$PATH ...
2
votes
2answers
48 views

How to add new elements to PATH for daemons (or other best practices)?

I want to add some scripts for custom administrative work to a Linux server (Ubuntu 12.04). Ultimately those scripts are callback scripts from at least one daemon (PostgreSQL in my case but that ...
8
votes
3answers
211 views

where to put binaries so they are always in path and can be found easily

I am making quite some binaries, scripts etc that I want to install easily (using my own rpms). Since I want them accessible for everyone, my intuition would be to put them in /usr/bin; no need to ...
4
votes
3answers
175 views

What's the right way to set “dynamic” PATH in bash? (for android sdk)

I have android sdk installed, and I want the binaries in build-tools/android-VERSION to be available in PATH, so I add few lines: ...
4
votes
6answers
231 views

List all binaries from $PATH

Is there one-liner that will list all executables from $PATH in bash.
3
votes
6answers
211 views

Will $0 always include the path to the script?

I want to grep the current script so I can print out help and version information from the comments section at the top. I was thinking of something like this: grep '^#h ' -- "$0" | sed -e 's/#h //' ...
2
votes
4answers
560 views

Bash script to output path to USB flash memory stick

How would I return (output) the path to any USB flash memory stick(s) connected to the local computer using bash (Ubuntu and Linux Mint)? Background: I'm providing users with an automated backup ...
1
vote
1answer
824 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 ...
6
votes
2answers
168 views

Sudo changes PATH, yet executes the same binary

There are two Python interpreters installed: [user@localhost ~]$ /usr/bin/python -V && /usr/local/bin/python -V Python 2.4.3 Python 2.7.6 Sudo changes PATH when executed: [user@localhost ...
2
votes
1answer
82 views

Which is the real PATH variable

On my office computer it seems like I've have two PATH variables. $path : This is delimited by " " (Space) $PATH : This is delimited by ":" (Colon) Though when I update one, the other one ...
1
vote
1answer
53 views

Changing the PATH variable for a process running as a user on Linux

I have a server application which I start using an init.d script and run as a user: su $USER -c "${PLAY} start ${APPLICATION_PATH} --%prod-test >/dev/null" The application needs ffmpeg, which is ...
3
votes
3answers
1k views

Adding to path vs. linking from /bin

Our sys admin installed a software (Maven) on the server, and told everyone to add the "/usr/local/maven/bin/" folder to their path. I think it could be more convenient to just link the few programs ...
1
vote
1answer
54 views

Does a duplicate entries in a PATH variable revoke the precedence given by the first entry?

If I have a PATH variable that (when exploded onto multiple lines) contains something like this (with a few notes added by me): /Users/brandon/.rvm/gems/ruby-2.0.0-p353/bin ...
1
vote
1answer
68 views

Program installed to `/home/username/bin` and added to path… not launching [duplicate]

I just installed newer versions of grep and vim to my local ~/bin directory. I have the path added via PATH=$PATH:$HOME/bin in my .bash_profile. When I try to run either, the version installed in ...
5
votes
2answers
97 views

Default preference of executable over built-ins with the same name

I was playing around a bit with the names of some executables, putting them in a folder, ~/bin, which is in my $PATH. Now I'm wondering how I can set the preferences of a bash-3.2 terminal so that it ...
1
vote
1answer
107 views

Why does root not have /usr/local in path?

I've noticed that the default path for root on my of my vm's and servers do not include /usr/local/bin sudo -s echo $PATH /sbin:/bin:/usr/sbin:/usr/bin Whereas normal users on the server do have ...
2
votes
4answers
299 views

Add multiple subdirectories under the same parent directory to PATH

I have installed some tools and put it under $HOME/tools/ and each tool has its own /bin directory that contains the executable program. I now have the path to each individual /bin in my $HOME/.bashrc ...