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

4
votes
2answers
913 views

How to add a path to system $PATH for all users's non-login shell and login shell on debian

I installed some programs in /opt/my-program/bin, I wanted to add /opt/my-program/bin to system $PATH for all users's non-login shell and login shell. What should I do? Changing /etc/environment is ...
3
votes
2answers
361 views

Make problem with includes

I am installing imagick-v3.1.0RC2 package on CentOS 5.5. I have ImageMagick 6.7.9-9 installed as well and have a problem on the make step. Problem is that its cannot find included file: ...
4
votes
2answers
319 views

Inhibit Variable Expansion in Paths

How do I prevent Zshell (and Bash I assume) from expanding environment variables in paths be completed as shown in the following example: $PREFIX/alt/li should expand to $PREFIX/alt/lib and not ...
4
votes
2answers
2k views

Change user and load entire environment in shell script

I'm having some trouble with an upstart script of ours that changes user and starts up a few ruby daemon processes. In the past i would simply bash -c "do the business" -l someuser making sure to use ...
1
vote
1answer
649 views

How to force a particular version of Java?

I am on a RHEL 5.5 64 bit box. The systems engineer installed the 64-bit Java VM under /usr/bin ; however, I needed a 32 bit VM which he installed in /opt/jdk1.6.0_35. But now, everytime I do java ...
4
votes
3answers
5k views

How to add a path to system $PATH for all users's non-login shell for debian

After installing some programs in /opt/xxx/bin, I want to add /opt/xxx/bin to system $PATH for all users's non-login shell. What should I do?
7
votes
3answers
827 views

My `which` command may be wrong (sometimes)?

I've compiled the last emacs version from the source code (v24.2) because the version installed on my machine is (quite) old for me (v21.3). I've done the usual: $configure --prefix=$HOME make make ...
2
votes
1answer
952 views

update PATH variable in .bashrc using sed

I've been trying to update my PATH variable permanently by putting it in my .bashrc file. However, I don't want to just append it to the file, but rather replace the current PATH=........ with the ...
4
votes
2answers
9k views

How to export LD_LIBRARY_PATH to all users and system services

I want to export LD_LIBRARY_PATH to system services and all users. System services are run before login, so .bashrc is not applicable. How to achieve this?
6
votes
2answers
3k views

Why Bash unable to find command even if $PATH is specified properly?

I am specifying path to my command in the file /etc/profile: export PATH=$PATH:/usr/app/cpn/bin My command is located in: $ which ydisplay /usr/app/cpn/bin/ydisplay So, when I performing "echo ...
3
votes
2answers
229 views

open a file using CDPATH and symlink

To quickly move around, I added a path to CDPATH that contains symlinks to different locations. I did this by adding the following line to .bashrc: export CDPATH=~/symlinks When working with ...
10
votes
2answers
336 views

Why do so many programs live in PATH?

One thing that puzzles me about desktop Linux, at least, is that just about everything is in my PATH. By everything, I mean every desktop application, including things like gnome-character-map and ...
7
votes
2answers
6k views

What is the difference between PATH and LD_LIBRARY_PATH?

I am having some difficulties understanding the difference between PATH and LD_LIBRARY_PATH. I have an installation setup that needs a file pkg.tcl and I am not where to add the path to it: should it ...
13
votes
3answers
6k views

How do I get rid of Cygwin's /cygdrive prefix in all paths?

I'm switching to Cygwin from the bash shell that ships with Git for Windows, and encountering a strange problem. Someone thought it would be a good idea to add /cygdrive/ to all paths, while I think ...
0
votes
2answers
545 views

.profile in SCO

Where can I find the .profile in my user's logon in SCO? I am needing to edit it, so I can add a PATH to it, so that my PATH loads up in start up. I have to add: echo $PATH ... as I have already ...
1
vote
2answers
11k views

changing an environment variable like PATH forever [duplicate]

Possible Duplicate: How do I set a user environment variable? (permanently, not session) to change the amount of PATH variable , I use : export PATH=... but when I close the terminal, the ...
1
vote
2answers
14k views

How to set environment variable JAVA_HOME that will be saved on exit? [duplicate]

Possible Duplicate: How do I set a user environment variable? (permanently, not session) I use Suse. First was installed jdk7, so JAVA_HOME remains like: /usr/java/jdk1.7.0_05/ After I ...
2
votes
0answers
407 views

Can I apply real time Linux kernel patch on Android kernel?

I would like to apply real time patch on the Android kernel (given I've found Kernel patch for corresponding Kernel version). Is it possible or should I create a patch specifically for the purpose of ...
1
vote
1answer
186 views

How to find/correct error in a path

It's often that a long path is mistyped or you get a log file entry that a path does not exist. Is there a command or shell function that navigates the path hierarchy until it finds a matching path? ...
2
votes
1answer
329 views

How to use whitespace in procmailrc recipe destination path?

I use Mutt Maildir for storage mails. I created one mailbox like this Stack Exchange/. (whitespace between Stack and Exchange here) procmailrc recipe: :0 * From: .*Stack\ Exchange Stack Exchange/ ...
4
votes
2answers
4k views

Adding a folder of jar files to my path

Unix newbie here. I have java tools that I need to use. The tools are in a folder full of jar files. I wanted to add this folder to my path, for the obvious reasons, but after I edit my .bash_profile ...
3
votes
3answers
170 views

Exporting just a single file

To make scripts accessible from anywhere in the terminal, one can use the following sequence of commands: PATH=$PATH:some_path_here export PATH Which includes all files at the path sent in ...
1
vote
0answers
496 views

Having a problem installing snort on fedora 17 [closed]

I've installed the latest versions of libpcap and libdnet. There is however a problem with daq. I configured snort with --wth-daq-libraries=/usr/local/lib/daq and --with-libpcap-libraries=/usr/lib ...
19
votes
12answers
3k 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 ...
1
vote
1answer
225 views

Using emacsclient with custom emacs in $PATH

I want to use emacs command as a substitution for emacsclient -c -a "", which according to man connects to an existing emacs daemon, or creates a new daemon and connects to it otherwise. So i created ...
3
votes
3answers
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 ...
1
vote
1answer
1k views

What is wrong with my JDK installation?

I tried to compile a Hello world example in java and got a gcc error. As far as I understand it, gcc is trying to compile my java class (and for some reason failing to find the main method, but that's ...
5
votes
1answer
138 views

Can non-canonicalized forms of filesystem paths be significant? (eg. “foo//bar”, “foo/./bar”, and “foo/../bar”)

I have a script for building a particular flavor of GCC cross-compiler. Throughout the script there are many paths that are not in canonical form, such as duplicate path separators (/xxx/foo//bar/yyy) ...
0
votes
1answer
409 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 ...
7
votes
1answer
201 views

Does POSIX guarantee that the standard utilities are in PATH?

In the "Command Search and Execution" section, the POSIX specification says that PATH is searched when finding a utility to execute (with some exceptions). Does the specification mention anywhere ...
27
votes
4answers
20k views

What is the 'working directory' when cron executes a job

I have a script that works when I run it from the command line, but when I schedule it with cron I get errors that it cannot find files or commands. My questions is twofold: When I schedule a cron ...
4
votes
1answer
667 views

Why do Mono applications only start from their own directory?

If I want to run the application monodevelop, I need to chdir to /usr/lib/monodevelop/Bin and then execute ./MonoDevelop.exe. This is the same for all other Mono applications such as banshee, tomboy, ...
3
votes
2answers
189 views

Finding program name by wildcard pattern

I am trying to write a script that will attempt to find if a certain program is installed. Lets say that the program is called, myprog. The problem is that the program can be named in different ...
2
votes
2answers
894 views

Where can PATH to Thunderbird be set in Ubuntu 10.04

I'd like to migrate to Thunderbird 11 from Thunderbird 3. I installed Thunderbird 3 using apt-get (the newer versions are not available in binary form, unfortunately, at least not in main, universe or ...
0
votes
2answers
155 views

Path is there, but cannot call one program without specifying path [duplicate]

Possible Duplicate: How to correctly add a path to PATH? I installed "perf" on Linux. But I can only use it by specifying the path: ~/bin/perf I checked path by using echo and I found /bin ...
1
vote
2answers
584 views

Checking if PATH contains $HOME/mydir and adding it if not (all in a script) [duplicate]

Possible Duplicate: keep duplicates out of $PATH on source I am not an expert with Unix scripting. Some of my scripts are located in $HOME/mydir. Unfortunately, they are not accessible from ...
8
votes
4answers
3k views

Adding paths to PATH using a multi-line syntax

As far as I understand, the usual way to add a path to the PATH environment variable is by concatenating paths separated by the : character. For example, if I want to add three paths to it ...
6
votes
4answers
2k views

How does Bash path completion work with sudo?

Tab path completion does not work (at least on Ubuntu and AFAIK Arch) with sudo mount <whatever> The iso file I am trying to mount is not in /etc/fstab. If I just type mount <whatever> ...
5
votes
1answer
2k views

Reloading the $PATH from the GUI terminal

My machine is running Fedora 16 x86_64 I am trying to figure out why I can not get my GUI terminal window to refresh the path. I recently added a new location to the path (in .bash_profile), after ...
5
votes
1answer
291 views

zsh - fully expand binary path on <tab>

In my current zsh behaviour, hitting tab after typing "sudo" just adds a space. $ sudo ... What I really want is for the tab to fully expand to the path of the binary it is about to execute when I ...
3
votes
1answer
110 views

Access PgSQL executables from anywhere

I've installed PgSQL 9.1.2 from PostgreSQL repositories and all it's fine except that I can't execute command from every path in my OS. For example suppose that I want to run the command pg_dump: for ...
2
votes
2answers
2k views

ldconfig issue with non-standard lib directory in CentOS

I am working with a virtual machine (CentOS 5.3) that has very little storage space on the main drive (which includes /usr, /usr/local, etc). Most of the storage space is available on a separate drive ...
2
votes
4answers
542 views

Update Linux Path permanently [duplicate]

Possible Duplicate: How do I set a user environment variable? (permanently, not session) How can I permanently modify the PATH variable in Ubuntu? Is it possible to do it without modifying ...
2
votes
1answer
2k views

Why my $PATH is not inherited by the invoked bash?

I work on an AIX system where I have no administrator privileges. It has several shells installed, default being tcsh. I am not allowed to change the login shell. Usually I start my session from exec ...
1
vote
1answer
353 views

Broken PATH in CentOS 5.x

I am having troubles with typing commands within the terminal on some of our CentOS servers. For example, I have to include the complete and full path to the command (i.e. /sbin/chkconfig vs. ...
97
votes
4answers
159k 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 ...
4
votes
2answers
7k views

How to add home directory path to be discovered by Unix which command?

I have installed node.js at custom location and added the location to the $PATH in .profile file. Hoons-MacBook-Air:npm Eonil$ node --version v0.6.2 Hoons-MacBook-Air:npm Eonil$ which node ...
2
votes
2answers
925 views

How do you set the path in a non-shell environment (KDE)? [duplicate]

I'd like to override one of the applications set in /usr/bin/. I have created an alternative with the same name in ~/bin/ which in in my PATH (as set both in .bashrc and in .profile). When I start ...
1
vote
2answers
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 ...
2
votes
2answers
2k views

How to fix bash looking for a program in the wrong dir (Issues setting up NPM on Ubuntu 11.10)

This time I ran the "trusting" install script curl http://npmjs.org/install.sh | sudo sh from the dir /. $ which npm /usr/local/bin/npm $ npm bash: /home/steven/local/bin/npm: No such file or ...