Skip to main content

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.

Filter by
Sorted by
Tagged with
1 vote
0 answers
49 views

Command works when path is entered manually, but not when $PATH is used

I installed Golang into a custom folder under $HOME called .go/exec. After the installation, it put the binary under $HOME/.go/exec/go. So I updated $PATH to contain this directory: $HOME/.go/exec:$...
Berk Açıkgöz's user avatar
4 votes
1 answer
997 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!...
Tim's user avatar
  • 1,054
0 votes
2 answers
64 views

How to modify $PATH globally

On my Debian server I use crontab to schedule a python code. The problem is: when I add a line like this: 6 9 * * * python /path/to/daily_task.py &> $HOME/out.txt Not too surprisingly the ...
user9102437's user avatar
0 votes
2 answers
67 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 ...
Anton Samokat's user avatar
1 vote
1 answer
107 views

How to set export PATH="$HOME/neovim/bin:$PATH" automatically [duplicate]

I'm on a Raspberry Pi 5 and I had to build from source to get the latest stable version. The program built successfully and I'm able to run it just fine. However whenever I open a new terminal I have ...
user avatar
0 votes
1 answer
74 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 ...
lukeflo's user avatar
  • 131
0 votes
0 answers
74 views

"Run dialog" BOX is not recognizing custom commands

I completely switched to linux a week ago, I modified my windows to run commands on "Execute" box (WIN + R) and thats VERY handy, for such things like open folders in specific locations, ...
wido's user avatar
  • 1
-1 votes
2 answers
96 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, ...
EE18's user avatar
  • 253
0 votes
0 answers
249 views

How can I echo/print the environment files of a directory/path in a Jenkinsfile during a build?

In a Jenkins file, I have the following code: #!/usr/bin/env groovy .... def env_prod = 'prod.env' def entrypoint = "${env.WORKSPACE} The above is then combined like this: ${env.WORKSPACE}/$...
Patrick_Chong's user avatar
0 votes
1 answer
16 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 ...
Nero Vanbiervliet's user avatar
5 votes
3 answers
2k views

How does resolution of .. and . proceed in Linux systems?

I am reading Sobell's A Practical Guide to Linux Commands, Editors, and Shell Programming, 4e. Early on he talks about the . and .. and says that they are "synonymous with the pathnames" of ...
EE18's user avatar
  • 253
6 votes
3 answers
879 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 ...
midnite's user avatar
  • 443
0 votes
1 answer
815 views

How can I move a file to /usr/local/bin?

For some preliminary information, I am using WSL2. This is my first time using Linux. I would like to install Typst which is similar to LaTeX. I have used wget to download the file for my computer ...
HailVelkekia's user avatar
0 votes
1 answer
121 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? ...
Matteo's user avatar
  • 73
0 votes
2 answers
667 views

I have to run eval $(/opt/homebrew/bin/brew shellenv) every time I start my pc for the terminal to recognise it

I use the Fish shell on OSX and installed brew. Now I notice everytime I start my mac I need to run the eval $(/opt/homebrew/bin/brew shellenv) command again to make it recognice brew. I also noticed ...
Wout Junius's user avatar
1 vote
1 answer
228 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/...
Y. zeng's user avatar
  • 145
0 votes
0 answers
190 views

Environment variable explicitly set on /etc/profile is lost on Arch

This was my /etc/profile before I modified it. $ cat /etc/profile # /etc/profile # Append "$1" to $PATH when not already in. # This function API is accessible to scripts in /etc/profile.d ...
du578110's user avatar
1 vote
3 answers
782 views

How to do wildcard/glob expansion when the pattern and the resolved pathes contain spaces?

I need to expand some pathes using a POSIX sh or Bash: Here are two example patterns (I chose overly complicated patterns on purpose): $ npm pkg get workspaces | jq -r '.[]' apps/app* lib/{be,fe *} ...
Forivin's user avatar
  • 897
0 votes
1 answer
246 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:/...
ant's user avatar
  • 29
0 votes
1 answer
41 views

How to disambiguate a second version of an installation from command-line?

I installed a tool called herd (http://diy.inria.fr/herd/). The original version of this I think is in the global path so I can call it from anywhere by writing herd7. Now I also have a second ...
IIM's user avatar
  • 103
0 votes
4 answers
201 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/...
ant's user avatar
  • 29
0 votes
0 answers
56 views

My system can't find command, though I can find it manually [duplicate]

When I had enter any command (grub, parted, gparted, fdisk) my system cannot find it, although it is present on a disk, because the distribution has installed and works. But when I invoke any command, ...
ant's user avatar
  • 29
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 ...
Zoltan King's user avatar
0 votes
2 answers
175 views

Commands cannot be located after sourcing a bash script

I have a short bash script cdline that takes two arguments PATHS and LINE and changes directory to the respective LINE in PATHS: #!/bin/bash #command for changing directory to that in the given line......
gohomology's user avatar
0 votes
1 answer
227 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 ...
Nick S's user avatar
  • 103
0 votes
0 answers
105 views

How to add dir to PATH for executing programs

Kate requires omnisharp to be added to the PATH. I'm not sure which configuration file needs to be modified to include omnisharp in Kate's PATH. Only when I start Kate through a console which contains ...
GuillemVS's user avatar
  • 101
1 vote
1 answer
272 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=&...
squirrels's user avatar
  • 119
3 votes
0 answers
8k views

'/var/lib/flatpak/exports/share' is not in the search path set by the XDG_DATA_HOME and XDG_DATA_DIRS

Weird one, when I update flatpaks I get the following message in terminal: Note that '/var/lib/flatpak/exports/share' is not in the search path set by the XDG_DATA_HOME and XDG_DATA_DIRS environment ...
Geoff's user avatar
  • 53
1 vote
1 answer
5k 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' ...
JonasDenmark's user avatar
0 votes
3 answers
86 views

Is there a shortcut to denote the absolute full directory of current path? [duplicate]

Let's say that I am currently in /a/b/c/d/e/, and I want to make symbolic link with a file f.txt in that directory. If I do ln -s f.txt /etc/, the file /etc/f.txt will not point to the file, because ...
Damn Vegetables's user avatar
0 votes
0 answers
30 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 ...
TT Radykal's user avatar
0 votes
2 answers
973 views

Can systemd start a user service after loading `.profile`?

I'm using systemd to start the Emacs daemon, as explained in the Emacs wiki. I also use my ~/.profile file to add my user-installed TeX Live installation to the PATH variable, so it contains the line ...
red_trumpet's user avatar
3 votes
1 answer
249 views

How to get under Linux Mint LMDE5, the path of a launcher through bash commands stored in the launcher?

Linux Mint LMDE5 is a Debian derivative. On the desktop you can create launchers p.e. via GUI, with which you can not only link something, but also store smaller bash code in it. After creating, the ...
Alfred.37's user avatar
  • 137
0 votes
2 answers
213 views

How to get full path names of all opened pdf files (in zathura) - like rofi does

I am trying to get the full path of every PDF that I have opened in the zathura viewer. I know it is possible, since with rofi -show window, I can see the full path. I have tried running ps -p $(pgrep ...
I.P's user avatar
  • 121
1 vote
1 answer
143 views

How to find all files whose contents belong to $PATH?

When I enter $PATH in terminal in Debian 11, I see there are several contents are the same. I checked the file of /etc/profile and ~/.bashrc, which even don't contain some contents of the output of $...
Y. zeng's user avatar
  • 145
0 votes
1 answer
53 views

Be able to access the direcrory but show error in $PATH

When I enter the $PATH in terminal in Debian 11, it outputs /usr/local/texlive/2023/bin/x86_64-linux: No such file or directory at the end, but I can enter /usr/local/texlive/2023/bin/x86_64-linux# ...
Y. zeng's user avatar
  • 145
0 votes
0 answers
105 views

Failed to locate executable /~/.nvm/versions/node/v18.15.0/bin/node: No such file or directory

What is supposed to be the appropriate node executable path to use. My machine runs on windows but i am using Amazon linux as the app is hosted on an AWS EC2 intance. Whenever i start the app from ...
Sanmi Akande's user avatar
1 vote
0 answers
503 views

Sway's dmenu not finding $PATH

I recently installed EndeavourOS, followed by Sway I've added ~/scripts/screenshot.sh however dmenu is not finding it, so tried adding ~/scripts to my path environment however none of my approaches ...
andrewjamesbowen's user avatar
0 votes
1 answer
81 views

is there a way to show all hits for a given command in a user's expanded PATH?

Is there a builtin way to ask a current shell "find me all of the possible matches for a given command in the PATH?" I realize that I could write a script that: expands the current PATH ...
ljwobker's user avatar
  • 539
0 votes
1 answer
136 views

Conventions for the PATH variable's value

I am looking for best practices, or at least conventions, for the PATH variable's value. In particular, I would like to know is there any preferred/recommended ordering for the /bin, /usr/bin, and /...
kjo's user avatar
  • 15.6k
0 votes
1 answer
342 views

passing shell script file name as an command line argument java -jar /test.sh and gives me error Error: Unable to access jarfile /test.sh

java -jar /test.sh --name trigger Error: Unable to access jarfile /test.sh test.sh file contains #!/bin/sh jar_name="-Dspring.config.location=application-test.properties somejarFileVersion_1.0&...
R venkata's user avatar
-2 votes
3 answers
89 views

I have made a program executable, I have added it's dir to path. It still wont execute. What gives?

I have tried: gaspipe@kali:~/bashscripts$ ls ./ ../ addpath* autoinstaller gaspipe@kali:~/bashscripts$ cd .. gaspipe@kali:~$ addpath addpath: command not found gaspipe@kali:~$ addpath* addpath*: ...
jbhntr's user avatar
  • 1
0 votes
0 answers
493 views

Help with zsh: command not found

Attempting to follow these instructions and I'm receiving error zsh: command not found: ord when attempting to do anything in ord, including ord wallet create. Currently running ohmyzsh and have not ...
MrP's user avatar
  • 1
0 votes
0 answers
578 views

Use path as URL in linux?

Some time ago I found a code snippet that used curl (or similar) and instead of using a URL like http://example.com:2882 it accessed the site using a filesystem path. Something like: curl /some/path/...
arielnmz's user avatar
  • 529
1 vote
1 answer
357 views

How to add Drush to PATH?

On a CentOS with Bash with MariaDB and PHP 8.1 I use Drush. Drush is the command line for Drupal, a content management system. Each time I run a Drush command I write like: cd /home/www/example_1.com ...
tainu's user avatar
  • 11
-1 votes
2 answers
268 views

Why Can't I get the path of the root user with sudo

I've changed the PATH environment variable of the root user. The following command are there too show the PATH. su env | grep ^PATH PATH=/root/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/...
Pierre-olivier Gendraud's user avatar
0 votes
0 answers
73 views

Why do I have repeating lines in my default $PATH

Using CENTOS 7 and BASH, after creating a new user, the user has repeating lines in the path variable. I've looked at this site $PATH duplication issues but it's for a .zshrc. Also, this is for the ...
dave's user avatar
  • 11
0 votes
1 answer
135 views

Path resolution depending on pwd (symlinked dirs)

This sort of situation often occurs under the /sys/bus tree (bash-5.1) : Let's say I get some foo directory listing several symlinks to other directories, ls -ails pathto_foo displaying something of ...
MC68020's user avatar
  • 8,239
5 votes
1 answer
596 views

'which' is unable to find command even though it is definitely installed

I have recently installed the cryptsetup. I've double checked with sudo apt-get install cryptsetup. Reading package lists... Done Building dependency tree... Done Reading state information... Done ...
rful7877's user avatar
1 vote
1 answer
710 views

Should relative paths in shell scripts start with a dot?

I often see, and have somewhat adopted myself, to precede relative paths with ./ in shell scripts. But is there situation where source ./foo/helper.sh and source foo/helper.sh would actually yield ...
Xaser's user avatar
  • 115

1
2 3 4 5
21