Tagged Questions

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

14
votes
1answer
390 views

Percent in $PATH environment variable

My $PATH looks like this: ...
0
votes
1answer
178 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 ...
18
votes
4answers
869 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). ...
11
votes
6answers
703 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
133 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
78 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
294 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
279 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
403 views

List all binaries from $PATH

Is there one-liner that will list all executables from $PATH in bash.
0
votes
2answers
122 views

How to work with dfspace command?

I am trying to execute dfspace command but I am getting the error root@Kali:~# /dfspace -bash: /dfspace: No such file or directory
4
votes
6answers
447 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 //' ...
3
votes
4answers
988 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
2k 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
264 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
92 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
74 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 ...
4
votes
3answers
3k 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
81 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
85 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
127 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
258 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
476 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 ...
1
vote
2answers
63 views

How can I substitute one command for another temporarily?

I'd like to alias sed to gsed, but only while a particular script is running. I have a script that invokes sed. On the Mac, BSD sed doesn't support the required features, but I don't want to replace ...
1
vote
2answers
84 views

Make Trickle get the correct $PATH

Trickle is a bandwidth limiting program. I have the following script for trickle. #!/bin/bash echo $PATH trickle -s -t 3 -u 200 -d 200 "$@" I have a script in ~/bin/ that want to run the script ...
0
votes
1answer
78 views

cc1 not in the PATH

I 'm trying to configure kernel via make menuconfig [Angstrom distribution] on BeagleBoard-xM, but I get these errors: make: Warning: File `/usr/src/linux-2.6.32.61/arch/arm/Makefile' has ...
1
vote
1answer
202 views

Editing the .profile file to access

I am trying to source my .profile file to easily access a directory of javatools. The bash code below seems like it should work but it does not. Any help troubleshooting this script would be very much ...
2
votes
1answer
1k views

Why I got error: `error while loading shared libraries: libmpich.so.3`?

I installed mpich-3.0.4 not in a default location. I installed it based on the mpich installer's guidance. However when I try to run: mpiexec -n 4 -f machinefile ./mpich-3.0.4/examples/cpi It ...
0
votes
1answer
147 views

Full path name of bash? and base process of Linux?

I am new to Linux and I recently had a test at school which had the following questions: What is the full path name of bash? What is the base process of Linux? I couldn't answer these. Does anyone ...
0
votes
1answer
215 views

Unable to override the JAVA home in opensuse 13.1

What I did : made an entry in both ~/.bash_profile ~/.profile export JAVA_HOME=/usr/java/jdk1.7.0_51 export PATH=$PATH:/usr/java/jdk1.7.0_51/bin still system points to some openJDK installed by ...
2
votes
2answers
118 views

What is PATH on a Mac OS?

What is the PATH in a Mac OS? I have used it to install global command-line tools, but the only documentation I have found are tutorials for doing just that, with no real explanation of what is ...
2
votes
1answer
76 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
26 views

VMware path to System ISOs on remote server

When I connect to a remote server in vmware workstation I can create a new vm. But where to put the .iso files on the remote server? (linux) As shown on the screenshot I have only a "[standard]" ...
1
vote
1answer
1k views

Meaning of `export PATH=…` in .bash_profile

I'm using a mac for some years now and as I'm currently learning ruby on rails, I felt like I should learn more about the system I'm using. I took a look at the ~/.bash_profile, it looks like this ...
1
vote
1answer
2k views

/etc/environment not working

I am using Ubuntu 12.04. Recently, I accidentatlly removed python, causing a huge number of packages to be uninstalled. I reinstalled them, but now I am having problems. $ echo $PATH ...
0
votes
1answer
189 views

Adding Postgres bins to PATH: should I `export`? [duplicate]

I'm on a Mac, but this seems like a UNIX/Linux question. I just installed Postgres.app, and the documentation says to add the /bin directory that ships with Postgres.app to your PATH by adding the ...
2
votes
1answer
145 views

difference between /var/www and /usr/local

I don't understand the difference between /var/www path and /usr/local path on linux command because for instance at the moment I can see my red5 server folder is in the latter path and within that ...
0
votes
1answer
493 views

java add to the path

I have some .jar files in a directory, /home/unix/dfernand/bin/picard/picard-tools-1.106. But when I add the directory to the PATH and CLASSPATH in my bashrc, java still does not recognize the .jar ...
1
vote
2answers
119 views

How can I clean out duplicate entries from my PATH? [duplicate]

Currently, my $PATH has two identical entries for /usr/local/bin and I'm curious whether there's a way to clean that up, or if I should just not worry about it. It looks like this (broken up into a ...
1
vote
1answer
97 views

Getting sudo to work for an alias

I installed Sublime Text 3 in Fedora 20 which has got GNOME, as I couldn't get it being called from terminal I created a .bash_aliases file which a line like this: alias sublime='sublime_text' And ...
2
votes
2answers
3k views

Why does sshd requires an absolute path?

Why does sshd require an absolute path when restarting, e.g /usr/sbin/sshd rather than sshd Are there any security implications? P.S the error message: # sshd sshd re-exec requires execution with ...
5
votes
1answer
1k views

How to identify executable path with its PID on AIX 5 or more

On AIX 5 or 6, `ps -ef` shows the executable full path randomly. Why and how to determine it? I find many thread through internet and also Unix & Linux and this stack overflow post about finding ...
1
vote
2answers
2k 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
0answers
29 views

Chromium OS Compiling Path [duplicate]

After following the steps at the Chromium OS Developer site, I would like to know how I could add the path to my .bashrc file so I could make it permanent? I am using Ubuntu 13.10
11
votes
1answer
1k views

Add a path in $PATH globally for every user

Do we have anyway to add a path globally so that each user gets it in $PATH. I want to add path of ANT so that each user doesn't need to add it in his $PATH variable.
1
vote
0answers
95 views

Map invalid file paths to valid file paths

I am running a program on linux which access an invalid location, say: /home/area/file. I know the valid location is /home/area/something_else/file. The problem is the input file for this program is ...
1
vote
1answer
55 views

Filepath: use same filepath on unix and winodws

I am working on application which work on both unix and windows environment. I have mapped my unix drive on windows using samba. On cygwin: ls -l /remote /remote -> //samba1 when I try ...
3
votes
2answers
95 views

Recently installed applications missing from $PATH

When I install apps using apt-get or NVM or NPM on Ubuntu, I can type the command and it works. Then I log out of the shell and log back in. Now none of the things I installed work when I ask for ...
5
votes
4answers
185 views

How do I use which(1) with the system's default $PATH?

I would like to use which with the system's default path, ignoring any embellishments from the user's shell configuration files. Motivation I am attempting to write a script to find the system's ...
2
votes
4answers
1k views

How can I find out where the firefox bin is?

I am trying to add Firefox to my PATH like in this tutorial. I have Firefox in the Applications folder of my GUI on my mac book air. I am familiar with adding locations to my path. But I don't know ...
2
votes
2answers
4k views

How to install a custom boost version in CentOS?

I'm trying to compile and install boost 1.54 from source in CentOS. The documentation is pretty straight forward and there are plenty of tutorials in the internet available (1) (2) (3). This is what ...