All Questions
261
questions
2
votes
1
answer
1k
views
How to correctly deal with locally built binaries?
I tend to build binaries from sources.
My usual setup is the following
$HOME/build -> this gets the sources
$HOME/programs -> this is where the build happen, so where the binaries are
Once ...
1
vote
1
answer
321
views
Is it safe for a program to add its bin directory to PATH?
I am building a program that relies on a series of external programs (pandoc, samtools, vcflib, etc..). To ensure that the correct versions are being used, I have downloaded the binaries for all of ...
0
votes
1
answer
737
views
How can I use ifuse command in a bash script? [duplicate]
When I enter this command in a terminal window, it works as expected:
ifuse "/home/sadi/mnt"
But it is ineffective when used in a bash script run via a .desktop file.
What can I do to use it like ...
51
votes
2
answers
12k
views
Bash remembers wrong path to an executable that was moved/deleted
When I do
which pip3
I get
/usr/local/bin/pip3
but when I try to execute pip3 I get an error as follows:
bash: /usr/bin/pip3: No such file or directory
This is because I recently deleted that ...
6
votes
4
answers
1k
views
Bash: Path or link to a line in a file?
/path/to/fname#line1242
Is there a way to refer to a specific line number in a file as part of the pathname, or some way to package a link to a line number, which looks/behaves like a pathname? For ...
1
vote
1
answer
132
views
executable within $PATH still going unrecognized
I'm having an issue where I get the error
bash: stp: command not found (stp is the name of the file I am trying to execute)
Even when I have the folder that this program resides inside is in my $...
0
votes
1
answer
921
views
How can I see all files which are sourced for an environment variable?
For example, I would like to see all files that are setting $PATH. For some terminals, this could be trivial, but I'm troubleshooting my terminal and having a hard time finding every file where this ...
16
votes
1
answer
13k
views
/etc/profile not sourced for `sudo su`
I have PATH=foo set in /etc/profile
According to /etc/password the root and myaccount users have /bin/bash as the login shell.
When I log in as myaccount, the PATH has been set correctly from /etc/...
2
votes
1
answer
2k
views
Can I set add something to PATH, system-wide for all users, which has LOWEST precedence?
I can put this in /etc/environment and all users will have it:
PATH=/opt/my/bin
As I understand it, /etc/environment sets initial environment variables, then .profile, .bashrc and similar happen ...
-1
votes
1
answer
1k
views
Unable to modify PATH using bashrc
I have read many posts and help files about updating the PATH using .bashrc. I might have to use .bashrc_profile as discussed here.
However, I can't get .bashrc to even work from the command line.
I ...
1
vote
2
answers
10k
views
What is the difference between /bin and ~/bin?
I am trying to understand exporting paths in Bash, and someone had told me that /bin is not the same as ~/bin. What is the difference between the two?
2
votes
1
answer
3k
views
Moving from bash to zsh: PATH reset
I'm on Mac and I've just moved from Bash to Zsh with Oh-my-zsh.
It's all working fine, except my $PATH is now missing several entries, for example the path to the nodeJS binaries.
The workaround I ...
6
votes
2
answers
2k
views
* at end of directory path
I have a question about the * character at the end of a directory path in a bash script.
I have a script that's supposed to automatically delete some archives from a server once they get old enough. ...
2
votes
2
answers
1k
views
Duplicate PATH entries - don't know where they're being set from [closed]
TL;DR something changing my path, triplicating my custom directories even when commenting out the export PATH= line from bashrc
Recently I added a line to my .bashrc to add two custom directories to ...
0
votes
3
answers
613
views
How to make a script which uses $0 work when it's on $PATH?
I have a script (~/.../gremlin) which I created a soft link for:
ln -s ~/[...]/gremlin ~/sc/gremlin
~/sc/gremlin is in $PATH.
Calling the script directly works.
Calling it through the link doesn't.
...
2
votes
2
answers
6k
views
Firefox doesn't want to execute
I removed previous version of firefox and I downloaded the 45.3.0esr.
I moved it to /home/user/firefox. Obviusly, if I type:
firefox
It raises:
bash: /usr/bin/firefox: No such file or directory
So ...
1
vote
1
answer
7k
views
Reset $PATH Variable to Default Kali setting
Running Kali Linux Rolling Distro.
Attempted to install Cuda Toolkit to the /opt/ directory using the following syntax:
chmod +x cudatoolkit_4.1.28_linux_64_ubuntu11.04.run
./cudatoolkit_4.1....
1
vote
0
answers
132
views
Internal path not set in GVim when launched from gvim.desktop
shell: bash, fish
terminal: xfce4-terminal
other-applications: xfce4-whiskermenu, tmux
I'm trying to have GVim inherit the full path from bash and/or fish when launching from from xfce-whisker-menu....
4
votes
1
answer
8k
views
.bashrc doesn't export the path?
Every time I login to our company cluster, I first get a Kerberos ticket and then try to submit a job, but it fails to find spark-ubmit:
-bash-4.1$ ./pipeline.runtime/scripts/vpspark-submit.sh crow-...
0
votes
1
answer
1k
views
Installing tar.gz file with no install target
I have tried a few answers, namely:
How to install tar.gz files?
Installing tar.gz file which has no configure, install, and readme file
How to install tar file (jhead) on Mac or Linux machine
I am ...
3
votes
2
answers
18k
views
find composer global install path as root
I have some php packages installed globally using php composer within a script
sudo -u me composer global require "phpmd/phpmd"
I want to find the path of these globally installed php packages. When ...
2
votes
3
answers
18k
views
Bash commands not found
I use CentOS 7 and I install anaconda and some tools, after that some basic command like clear which not work.
[zhilevan@localhost ~]$ clear
bash: clear: command not found...
when I echo $PATH I ...
0
votes
1
answer
748
views
Mess with an export PATH
I have tried to include INTEL PARALLEL COMPOSER to my .bashrc.But something went wrong.Now I can not use gedit or vi editor.
milenko@milenko-HP-Compaq-6830s:~$ gedit .bashrc
Command 'gedit' is ...
0
votes
2
answers
85
views
Command passed as an argument to another command is not found in PATH
Generally when a command appears as an argument to another command e.g.
command1 command2
how is command2's executable searched for?
Is it searched in $PATH?
Is it specific to how command1 ...
5
votes
3
answers
3k
views
Bash one-liner to temporarily append path for chained commands without additional bash invocation?
Consider this:
$ cd /tmp
$ echo "echo YES" >> prog/myprog
$ chmod +x prog/myprog
$ prog/myprog
YES
$ myprog
myprog: command not found
I can temporarily modify PATH to call myprog by name like ...
1
vote
1
answer
454
views
Why is bash not respecting ${PATH} and/or symlinks? [duplicate]
I am on OSX and installed Homebrew to get the GNU coreutils. I wanted gsort to be used instead of the preinstalled sort command so I created a symlink to gsort. My limited experience tells me that ...
2
votes
3
answers
399
views
.bashrc path problems
Can anyone tell me how to add a directory, say Idl, which contains many sub-directories to my IDL_PATH in .bashrc such that when I do source .bashrc, I will be able to it is able to run all the ...
1
vote
2
answers
6k
views
ls, mv, cp, cat, vi, command not found
I was trying to add a new path to my bashrc file but I have seemed to messed something up. after I $ source ~/.bashrc I no longer can use the commands ls, mv, cp, cat, vi, and probably others that I ...
0
votes
1
answer
108
views
Editing the variable PATH
I want to start script just by typing script not the full path of the script for example ~/Desktop/name/script so i tried to edit variable PATH
PATH="$PATH:~/Desktop/name"
in the name folder i have ...
0
votes
1
answer
895
views
No paths getting set on login - bash not loading correctly?
I don't know if this is because of virtualenv, but I ran the virtualenv command to set up a tensorflow environment. Now no paths get loaded at all. Nothing works. To do even basic commands (such as ls)...
15
votes
3
answers
125k
views
Add PATH to .bashrc [duplicate]
I am trying to install Anaconda on my Linux machine.
Right or wrong, at the end of the instructions they say to
add this line to the file .bashrc in your home directory: export PATH="/home/...
0
votes
1
answer
1k
views
bash: /home/hadoopuser/hadoop/sbin: Is a directory
I am in Ubuntu 14.04 LTS. Based on how to set a Hadoop cluster I am executing this:
# Add Hadoop bin and sbin directory to PATH
export PATH=$PATH:$HADOOP_HOME/bin;$HADOOP_HOME/sbin
where I know that ...
3
votes
2
answers
225
views
Handling duplicate programs names bash
I'm wondering if $PATH cascades entries. You'll all need to take a leap of faith with me here, but here it goes.
Let's say we have a Java executable at /usr/bin/java but this version is very old and ...
2
votes
3
answers
12k
views
echo $PATH does not show added path in .bash_profile or /etc/profile
I have just installed LaTEX and need to add the path to my $PATH variable so I can use the command. I have tried adding path (/usr/local/texlive/2015/bin/x86_64-linux) to my .bash_profile and when I ...
0
votes
1
answer
9k
views
why Whereis not able to show command path, while which is working correctly? [duplicate]
I have created a executable bash shell script file command. I added directory path of my custom command to $PATH variable, but whereis not showing the command path but which shows correctly. I am ...
1
vote
3
answers
3k
views
How to check for valid $PATH directories, and output them telling whether each one is valid or not?
Ok so I got this:
check="${PATH//:/'\n'}"
The above gets me each path in a simplified manner, and formats it nicely into a variable. Now how do I check each line for existence, and state that for ...
2
votes
1
answer
3k
views
building code from source and adding them to your path
Typically on Debian when you install things from the repository, they just work. It sets up things just fine and life is good. This is great for things that are up to date in the repository.
I am ...
2
votes
3
answers
590
views
How to control pathing when executing a string command using bash -c?
Background, I am trying to use a Python library that spawns a subprocess using arguments ["bash", "-c", "python someScript.py"]. What's happening is Python 2.6 is executed, but I want python2.7 ...
3
votes
4
answers
516
views
Help with bash script
I am teaching myself bash scripting with the book 'Learning the Bash Shell' by Newbam. I'm getting on OK with the book, but am a bit confused by the following script. It is a script which uses a for ...
0
votes
0
answers
257
views
Continuum Anaconda Fedora 22 Linux path
After an update to Windows 10 I encounter problems in my dual boot system so I had to re-install Fedora 22.
So, starting with a fresh system I re-installed my work environment. The one installation ...
0
votes
0
answers
324
views
Continuum Anaconda Fedora 22 path
After an update to Windows 10 caused problems in my dual boot system I had to reinstall Fedora 22. So, starting with a fresh system I reinstalled my work environment. The one installation that has ...
0
votes
1
answer
3k
views
How to update .bashrc with PATH
I have installed a new JRE on my RedHat linux system.
lsb_release -i -r
Distributor ID: CentOS
Release: 6.5
I have updated the symbolic links pointing to the desired Java installation:
ls -l /...
39
votes
4
answers
29k
views
Add path to $PATH if not already in $PATH [duplicate]
I need to add a path in a bash script, but it may be executed several times:
export PATH=${OPENSHIFT_HOMEDIR}/app-root/runtime/bin/:${PATH}
I don't want that path to be added over and over. How can ...
7
votes
1
answer
74k
views
When I run "sudo su" I get --bash: command not found for everything
I'm not good with command lines or servers.
But I needed to configure for work a AMI of EC2 AWS with LINUX
So I've installed a lot of stuff, moved a lot of stuff around and then I realized that sudo ...
-2
votes
1
answer
2k
views
ls: No such file or directory [closed]
I have been messing around trying to install macvim to a higher version of 7.4. I finally got it working but now I get the error
ls: No such file or directory
when looking for a directory. I can ...
2
votes
1
answer
110
views
Binary not accessible from Bash despite being in path
I am learning how to program in Racket. Its binary is in "/Applications/Racket v6.2/bin/racket".
Let me show what happens:
MacBook:~ enedil$ echo $PATH
/Applications/Racket\ v6.2/bin:/usr/...
1
vote
1
answer
629
views
bash: Passing several space containing filenames
In a bash script I am rasterizing a PDF page by page into single files, in the end the single resulting PNGs are merged again into a PDF like this:
convert -monitor /path/to/1.png /path/to/2.png /...
0
votes
2
answers
5k
views
How do I add Metasploit into my PATH variable?
I have Metasploit installed on my Mac in /usr/local/share/msf.
Everytime I want to use it I have to cd into that directory and use msfconsole.
If I try to /usr/local/share/msf/msfconsole in my home ...
3
votes
2
answers
7k
views
How do you add a bash script to your PATH variable using symlinks?
I run a gaming server called PocketMine. So basically I have a folder in my home directory that has a bash script to run the server: ~/PocketMine/start.sh
Everytime I want to run the server I either ...
16
votes
2
answers
25k
views
Adding a new directory to PATH vs. a symlink for directory already in PATH
In setting it up so I could execute Sublime Text from bash, I discovered two methods of doing this via different tutorials:
Method 1) Create a symlink from /usr/local/bin/subl to Sublime's bin dir:
...