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
0 votes
0 answers
15 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
198 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
  • 817
0 votes
1 answer
19 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
33 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
71 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
53 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
63 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
40 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
147 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
2 votes
0 answers
2k 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
  • 43
1 vote
1 answer
471 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
55 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
222 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
206 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
  • 120
0 votes
2 answers
112 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
  • 111
0 votes
1 answer
58 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
  • 115
0 votes
1 answer
38 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
  • 115
0 votes
0 answers
59 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
250 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
0 answers
81 views

tmux split pane command loads different PATH

After I run the split pane with vertical layout command (ctrl+b "), I end up with a different version of Node available. I use nvm to manage my NodeJS version. When I open a new terminal I see ...
Jahorse's user avatar
0 votes
1 answer
42 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
  • 499
0 votes
1 answer
61 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
  • 14.8k
0 votes
0 answers
24 views

Manage PATH and other environmental variable centrally in Unix/Linux?

In windows, we can make a window pop up in control panel to edit environmental variables. That includes PATH. Then at all places we can use programs in PATH. However, in macOS, linux, etc, we add ...
Ma Joad's user avatar
  • 111
0 votes
1 answer
235 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
61 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
355 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
17 views

bash: adding/removing duplicate programs executes the wrong ones [duplicate]

i'm currently testing the install target (which installs into /usr/local/bin) of some software (that is also installed via my package manager into /usr/bin), and noticed that bash doesn't find the ...
umläute's user avatar
  • 6,342
0 votes
0 answers
134 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
  • 519
1 vote
1 answer
136 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
133 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
47 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
89 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
  • 6,349
5 votes
1 answer
563 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
0 votes
1 answer
412 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
  • 105
0 votes
1 answer
157 views

My $PATH differs from that stated in /etc/profile

This is my entire /etc/profile. # /etc/profile: system-wide .profile file for the Bourne shell (sh(1)) # and Bourne compatible shells (bash(1), ksh(1), ash(1), ...). if [ "$(id -u)" -eq 0 ];...
lini37827's user avatar
16 votes
4 answers
5k views

Does Linux support invoking a program directly via its inode number?

I’m asking because string comparisons are slow, but indexing is fast, and a lot of scripts I write are in bash, which to my knowledge performs a full string lookup for every executable call. All those ...
Jacob Valdez's user avatar
24 votes
2 answers
12k views

What is this weird directory in my PATH on my Mac, (running latest macOS Ventura)?

I found that my PATH on my MacBook Pro running Mac OS Ventura 13.0.1 has a strange directory inside all of the normal ones, i.e. /opt/homebrew/bin:/usr/local/bin:XXX:/usr/bin:/bin:/usr/sbin:/sbin: /...
l3v1tat3's user avatar
  • 243
1 vote
1 answer
328 views

How can i successfully launch IDEA IntelliJ from the terrminal?

I tried to add the directory of IntelliJ installation to my PATH environment in order to launch it from anywhere using the command: idea or idea.sh.  But even if I think the path is added I still can'...
Anthony's user avatar
  • 13
-1 votes
1 answer
34 views

Does logging into a shell session build a cache of executables on the path which never gets updated? [duplicate]

I notice that when I compile a custom build of a packaged program stored in /usr/bin eg /usr/bin/emacs, which emacs shows the already existing executable at /usr/bin/emacs instead /usr/local/bin/emacs,...
vfclists's user avatar
  • 7,225
1 vote
1 answer
539 views

-bash: /home/me/.profile: line 28: syntax error near unexpected token `('

I've spent the last week of my life trying to set up a development environment so I can learn machine learning. I have less hair now, not that I had too much before. Never mind. I am using WSL 2 ...
Kreative Zombie's user avatar
0 votes
1 answer
932 views

Running a command from cmd.exe using WSL

I am facing the same issue here: Passing command to bash from cmd.exe (WSL) not working Except that for me the solutions there do not work either. I have WSL installed, and I am trying to run a ...
Tamer's user avatar
  • 3
-3 votes
2 answers
60 views

Is there an app, where I can add things to the path variable permanently?

I know it's fairly easy with simple terminal commands but I still want a program where I say e.g.,: > addtopath "~/bin" and it does it permanently without me having to edit some config ...
El Hocko's user avatar
  • 161
1 vote
0 answers
309 views

How to append to system-wide `$PATH` in MX Linux?

I want to append to the system-wide $PATH. How can I do this in MX Linux (MX-22.2.1_x64 ahs)? To be totally clear: I want to append to the existing $PATH, not set an entirely new one. (So editing /...
midrare's user avatar
  • 153
2 votes
1 answer
220 views

Why is $PATH reversed?

On my MacBook I use zsh, which I configured via a .zshenv and a .zshrc. If I add an echo statement at the end of the .zshenv, the $PATH variable looks like this: /opt/homebrew/bin /opt/homebrew/sbin $...
baggiponte's user avatar
2 votes
2 answers
886 views

How do I resolve a relative path in a POSIX shell if readlink/realpath is not available?

If neither utility readlink, nor realpath is available (I think today mostly from GNU coreutils?), what can I use in POSIX shell scripting to resolve a relative path? There is a realpath C function, ...
finefoot's user avatar
  • 2,960
0 votes
1 answer
136 views

Ubuntu - Run executable with customized name from anywhere

I have installed etcher and I can run it from its installation directory (.../balena-etcher-electron-1.7.9-linux-x64/squashfs-root) with the command ./balena-etcher-electron. Well wonderful ! But now ...
Mickael Evrard's user avatar
0 votes
0 answers
254 views

Fedora, terminal not recognizing command even though path variables are set up

I have set up path variables for the location of something called saw in a folder inside documents. When I put echo $PATH it shows the right path. I've exported it and put it in the bashrc file. Path ...
Robert hause's user avatar

1
2 3 4 5
20