Questions tagged [path]
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.
1,024 questions
1
vote
2
answers
73
views
`sudo which` command not finding executable that exists in regular user PATH [duplicate]
I'm encountering a confusing behavior with sudo and the which command. An executable is found when running which as a regular user, but not when using sudo which, even though it's accessible when ...
1
vote
1
answer
139
views
Removing duplicate `/snap/bin` from default `$PATH`
In Ubuntu Desktop 24
$ grep VERSION= /etc/os-release
VERSION="24.04.2 LTS (Noble Numbat)"
When I open a Terminal window my $PATH has two copies of /snap/bin
$ echo $PATH | sed -e 's/:/:\n/...
1
vote
0
answers
73
views
gnome-wayland: unable to change $PATH at gnome-shell level
I can't change the PATH at gnome-shell level so I can execute programs in my ~/bin or ~/.local/bin folder from my .desktop files. I am able to easily define other variables through ~/.config/...
2
votes
0
answers
222
views
Ubuntu 24.04 - /usr/games and /usr/local/games missing in $PATH for newly created user accounts
A fresh installed Ubuntu 24.04 system creates the first user account. That user account has by default the following $PATH = /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/...
2
votes
1
answer
1k
views
PATH on Mac not working for Python
I am trying to run a Python program from my command line on my Mac. (in this case: python3 Hello.py).
For the life of me, I can’t get it to consider the PATH where the program is located. This is the ...
0
votes
2
answers
67
views
How to add a path to PATH that involves a variable that needs to be evaluated?
say I want to add the current directory to path. I need to run echo "export PATH=$PATH:$(pwd)" >> ~/.bash_profile.
this expands $(pwd) like I wanted, but it also expands the $PATH ...
0
votes
0
answers
40
views
Command invoked from one path, "which" says it should be invoked from elsewhere [duplicate]
I've built an executable which, for the sake of this question, is named foo. There is already a version of it at /usr/bin/foo, and I install a different version as /usr/local/bin/foo. My path has /usr/...
1
vote
0
answers
107
views
ansible rsync command fails from using non-kerberos ssh on remost system
I wish to rsync a directory structure from one remote server to another - using an Ansible playbook.yml. During the play, the ansible shell module's command for rsync fails. I know the reason - it's ...
1
vote
0
answers
40
views
Quarantining Python code from being updated
I have installed Onboard (virtual keyboard) and it resides in
/usr/lib/python3/dist-packages/Onboard/
I have made some changes to a few of the files (for a modified layout) which I want to quarantine ...
-2
votes
3
answers
375
views
What does this $PATH output mean?
I ran in terminal:
echo $PATH
the output is this:
/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/...
4
votes
1
answer
1k
views
Are there alternatives to alias I'm not aware of?
Today I started to notice weird behavior running a local command for a binary installed through Go. It seems the command is aliased, but consulting alias, it isn't.
The command buf somehow executes cp!...
1
vote
2
answers
136
views
How to find files with find tool in system path ($PATH)? Or alternatively, How to specify starting-point directory for find as an expression?
For example, I want to find all symlinks that reference to particular binary in all directories that belong to system $PATH.
This can be successfully achieved with manual specification of all ...
0
votes
1
answer
396
views
zsh custom completion file not sourced properly
I encountered a strange behaviour regarding ZSH completion for my custom script and need some ideas, what went wrong and how to solve it.
I have written a little custom script myscript and also ...
-1
votes
2
answers
198
views
When does the shell search PATH?
I am a bit confused about when PATH is searched. I had thought that PATH was only searched when a simple filename is given as the first token on a line, as in
$ date
A question I am solving however, ...
0
votes
1
answer
100
views
How to configure systemd $PATH to match user $PATH
I run a Next.js frontend on a VM using systemd. My workflow for making systemd services is usually:
Make the application work from the user shell (ec2-user in this case)
Write a unit file which does ...
6
votes
3
answers
1k
views
How can I temporarily set $PATH and . (source) a file?
Consider this. IFS is set only in the execution of read.
IFS='' read -r REPLY
However, if I do similar with . (source), the variable will be assigned and changed even after the execution of the line ...
0
votes
1
answer
382
views
Which binary is used (per specification) if there are multiple ones with the same name at different locations in PATH?
If two different directories in the PATH environment variable both contain a binary with the same name (but slightly different behavior), are there specifications/guarantees on which one will be used?
...
1
vote
1
answer
370
views
A command in $PATH but can't run and "ln" link not work on Debian 12
The computer system is Debian 12. As needed to update my LaTeX, I tried the command sudo tlmgr update --all, which returned sudo: tlmgr: command not found. But which tlmgr returned /usr/local/texlive/...
0
votes
1
answer
586
views
CAN'T open syslog
I had read that syslog is placed in a /var/log directory.
But i can't open it in spite of the directory in PATH included.
lm@debian:~$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/local/games:/...
0
votes
4
answers
451
views
split PATH variable INTO few lines
I have split my PATH variable into few lines, in the file to make them easier to read because it's very long,
as I had seen here.
This is what I changed in my /etc/profile:
# PATH="/usr/share/...
8
votes
4
answers
2k
views
Is there any potential negative effect of adding something to the PATH variable that is not yet installed on the system?
I've added LaTeX to the PATH variable, but as I'm transferring my shell configuration to multiple computers, LaTeX is not installed on all of them. Besides the obvious consequence of being unable to ...
0
votes
1
answer
455
views
Using '/usr/bin/cd' in a cron script fails while 'cd' works
I have a simple shell script that I am running via cron. I am using it to perform a scheduled git pull operation (yeah, I know there are probably better methods, but this is another team's repository ...
1
vote
1
answer
388
views
Ideas for why PATH has these directories
In my .profile I have PATH="$HOME/.local/lib:$HOME/.local/bin:$HOME/.node_modules/bin:$HOME/.cargo/bin:$HOME/local/bin:/usr/bin:$PATH"
In my .zshrc I have miniconda path stuff (export PATH=&...
2
votes
1
answer
8k
views
PATH environment variable could not be located when trying to install SteamCMD
I am trying to install SteamCMD on my Linux machine by using this guide.
However, I ran into a problem after I created the user steam and installed SteamCMD. The whole error code is
Command 'steamcmd' ...
0
votes
0
answers
34
views
'-bash: line 1: rescanscsi: command not found' error even though script location is in PATH and other script runs fine from same folder [duplicate]
I'm new to linux, trying to switch over from Windows, and I could really use some help. This is actually my first time using a forum such as this so please forgive any errors I make.
I'm using Linux ...