All Questions
76
questions
0
votes
0
answers
45
views
Pycharm does not launch from other directory even after editing .bashrc, .profile and .environment
I downloaded PyCharm, and from the directory where the executable pycharm.sh is, it works fine, however, whenever I do sudo vim ~/.profile, sudo vim ~/.bashrc, and add export PATH="$HOME/pycharm-...
1
vote
2
answers
171
views
Where can I add to the ***universal*** path?
I'm a script kiddie of sorts and enjoy writing bash scripts for things, and I keep them in a repository that I synchronize, and on my personal computers I keep it in a home/otherStuff/customBin folder,...
-1
votes
2
answers
460
views
Accidentally changed PATH variable and I cant change it back, or use vim etc..help
I know there are many questions like this, but I unfortunately dont know enough about Ubuntu to be able to apply it to my situation. I have all my stuff saved for work on a remote machine, that i ...
1
vote
1
answer
331
views
Terminal is neither showing path nor working
The default terminal and the VS code Terminal are neither showing path nor working.
I have updated the system, cleared the cache, reinstalled the terminal, installed the new other terminals, and saw ...
4
votes
2
answers
2k
views
How to create an alias for a "cat" file usable in a path
I have two huge files (150G each) and I need to use a tool for which I should supply them as a single file (since the tool only accepts one file). However, I do not want to merge these files for ...
-2
votes
2
answers
502
views
In concatenating two variables, the system expands the resulting path and returns unexpected results. How do I prevent this?
Question 2.0:
Given the code:
SSLPasswordFilePath="$SSLFilesDir$SSLPasswordFile"
When I run:
"$SSLPasswordFilePath"
I get this unexpected result:
/tmp/ConfigFiles/SSL/Password....
2
votes
1
answer
913
views
How does PATH get its contents back after I restart the shell?
Exercise 2 from Missing Semester asks the following:
Run PATH= and try running the previous commands again, some work and some don’t, can you figure out why?
Setting PATH= removes all the contents ...
0
votes
1
answer
439
views
How to add browser cutable path in ubuntu
just trying out ubuntu, and installed a node/npm CLI application where we can run the command in the terminal. That command/tool requires us to specify the browser e
cutable path every time when we ...
0
votes
2
answers
1k
views
Modify path to include quotes
Ubuntu is installed on a Windows OS. I have searched and found how to add a new path but I'm not quite getting how to modify a path that already exists and then adding quotes around paths with spaces. ...
0
votes
1
answer
13k
views
How to change python3 path pointer?
I am using Ubuntu 20.04.2 LTS with python version 3.9.5 installed.
When I type which python in the terminal, it shows /usr/bin/python which is the default path for python2 (2.7 in my case).
But when I ...
1
vote
1
answer
1k
views
A path set in /etc/profile/ doesn't appear on other users' environment
I have the following PATH variable in /etc/profile. The last line should allow me to use the conda command for any user.
# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
# and ...
0
votes
1
answer
2k
views
Go packages not running as sudo
I installed golang via sudo apt install golang-go
I installed some go packages, like go get -u github.com/tomnomnom/assetfinder
I can run my packages without sudo, but when I do use sudo, the ...
0
votes
1
answer
904
views
tmux errors running bash commands due to path
When I run $tmux and open an instance of a tmux session and try to run a command such as ls I receive the following error:
∆ ls
Command 'ls' is available in the following places
* /bin/ls
* /usr/bin/...
4
votes
1
answer
5k
views
How to run scripts that are in PATH?
I'm pretty much completely new to Ubuntu, so bear with me.
I have made a few scrips without the .sh extension and granted them permission with chmod 755, and the scripts run just fine as long as I'm ...
2
votes
1
answer
516
views
After installing binary to another directory, error "No such file or directory"
After uninstalling a program with apt and reinstalling it in another location (ex. pypy with snap), running the program from command line reports bash: /usr/bin/pypy: No such file or directory, but ...
0
votes
0
answers
3k
views
Changing the default file path for gcc compiler
I'm trying to compile a file named "filename.c" and as far as I know, it has to be in the Home folder when I use the command:
gcc filename.c -o filename
Alternatively, I would have to specify file ...
0
votes
1
answer
6k
views
How to permanently change a PATH variable in Debian [closed]
I'm trying to change the directory that is accessed when I call blender in my terminal.
This is currently where it is:
...$ which blender
/usr/bin/blender
And I'd like to instead use the version ...
25
votes
1
answer
9k
views
Why isn't tilde recognised as home folder in this case?
This doesn't work:
$ ls "~/.wine/drive_c/tools/Family Tree v2.0"
ls: cannot access '~/.wine/drive_c/tools/Family Tree v2.0': No such file or directory
But this does:
$ ls "/home/daniel/.wine/...
1
vote
1
answer
2k
views
How to add a directory to PATH in Linux ? I am using Windows Subsystem for Linux - Ubuntu [duplicate]
I am new at Linux and I am facing a problem.
I am trying to add the bin directory to the PATH in the Linux executing the command below:
$ export PATH="/opt/gcc-arm/bin:$PATH"
However, when I try to ...
1
vote
3
answers
12k
views
How to run an executable file from a different directory without cd or modifying the PATH?
Variations similar to what I want to ask exist but I could not find the exact question, so I'll ask it here.
Let's say I have a comiled .c file resulting in the executable ex which is located as /mnt/...
0
votes
0
answers
4k
views
19.04 bash : /usr/sbin/ip No such file or directory
19.04 updated everyday
Today this happened :
ip r
bash: /usr/sbin/ip: No such file or directory
But then there's this :
which ip
/sbin/ip
This does not happen in a dash shell, but I don't want ...
1
vote
0
answers
49
views
How to link command to correct program? [duplicate]
I've installed a command called gsutil on my Ubuntu VM with the command
sudo snap install google-cloud-sdk --classic
However, when running gsutil I started an unrelated existing program of ...
1
vote
0
answers
67
views
Is it possible for bash to recognize hardlinks or symlinks in $PATH?
Terminal, WSL
For example, I currently have GHC's executable in ~/bin/ghc/bin/ghc, but my $PATH only specifies /home/user/bin. I have tried running ln ~/bin/ghc/bin/ghc ~/bin/ghc-usr, but bash still ...
1
vote
1
answer
2k
views
Pass/set `current directory` to/for a shell script from Java in Ubuntu 16.04
While trying to automate an installation process in Ubuntu 16.04 with a .jar file, I did not know how to solve the following problem:
Problem description
Part of the installation files automatically ...
0
votes
1
answer
1k
views
How to set, permanently, my own directory instead of /home/bin in $PATH in ubuntu? [duplicate]
This might be a repeated question, but I couldn't relate to any previous answer. I basically want to run my shell-script from anywhere in ubuntu 16.04 (whether I'm inside the directory where the shell-...
4
votes
1
answer
32k
views
Adding folders to your PATH environment variable
Currently running Ubuntu 18.04 LTS. I'm trying to install Ndless
and the SDK that goes with it so I can write programs in C and run them on my calculator. Anyways, I was wondering if somebody could ...
4
votes
2
answers
5k
views
How to get the real path of a sh file that is being sourced
I added this line into my ~/.bashrc
. /mnt/c/Users/enzo/drive/projects/dotfiles/init.sh
And and inside of init.sh I am trying to get the path of init.sh but I am not able to.
I tried this so far:
...
3
votes
2
answers
8k
views
App installed in directory on the PATH, but not found. Weird /snap/bin - error message
I have the app minikube in /usr/local/bin/minikube. When I do minikube version with the whole path, I get:
$ /usr/local/bin/minikube version
minikube version: v0.28.2
When I do minikube version ...
0
votes
1
answer
273
views
Login Loop in Ubuntu 16.04 after editing the Path
I was editing the path as said in this page: Source
After I did that, I logged out, and ever since that, I was not able to Login.
I have tried various Login Loop Remedies said in this Exchange, but ...
4
votes
2
answers
17k
views
When I do an export path using terminal, which file does it save to? [duplicate]
For example, when I run export export PATH=$PATH:$GOROOT/bin:$GOPATH/bin or a GOPATH=~/workspace/me/go which file does this get added to?
0
votes
1
answer
1k
views
CPLEX and PYTHONPATH
First I installed CPLEX on my ubuntu. Then I set my PYTHONPATH by adding the following line to .bashrc file
export PYTHONPATH="/opt/ibm/ILOG/CPLEX_Studio1271/cplex/python/2.7/x86-64_linux"
but when ...
1
vote
2
answers
3k
views
How do I add make a directory like a variable?
Sorry for my weird question, I am very new to Linux and I am not sure what the correct terminology is.
I am writing a bash script, and I want to be able to add some directories to... I don't know ...
0
votes
1
answer
1k
views
Setting "$PATH" environment for Unix "which" command
I am trying to run two chemistry programs together that need the PATH environment changed in order to find one another. The manual says:
Under the UNIX operating systems, R.E.D. looks for the "...
4
votes
1
answer
3k
views
Why does `which` point to a different binary? [duplicate]
I have 2 versions of curl installed on my system, one with http2 support.
I thought I could use which to point to the binary, but it doesn't seem to work the way I expect.
$ curl --http2 -I https://...
37
votes
4
answers
302k
views
Variable path issue : conda command not found
After installing Anaconda correctly. I wanted after finishing the installation to do the following. I forget to do it while installing anaconda:
export PATH="/root/anaconda3/bin"
conda --version
...
17
votes
4
answers
31k
views
Windows filepath converted to Linux filepath
I have a Windows path in a bash variable as a string:
file='C:\Users\abcd\Downloads\testingFile.log'
I am trying to convert this path into a Linux path starting with /c/Users....
My attempt
The ...
30
votes
4
answers
90k
views
When writing a bash script, how do I get the absolute path of the location of the current file?
Suppose I have a bash file called myBash.bash. It resides in:
/myDirect/myFolder/myBash.bash
Now I want to use the string /myDirect/myFolder (the location of myBash.bash) inside the script. Is ...
9
votes
1
answer
3k
views
How can I sanitize or escape absolute paths returned by realpath or readlink?
realpath and readlink return absolute paths:
+akiva@X230:~$ realpath ZannaIsAwesome
/home/akiva/ZannaIsAwesome
A path like that is easy to deal with. However, something like this is going to have ...
9
votes
3
answers
2k
views
Can I feed a bash script a local file into $1 and have it echo the file's absolute path? [duplicate]
Pretty self explanatory.
The first argument should be:
Checked if the file exists
Echo that file's absolute path
For example:
+akiva@akiva-ThinkPad-X230:~$ ./myscript myfile.txt
/home/akiva/...
1
vote
1
answer
13k
views
How to remove a directory path from PATH permanently?
I am using Ubuntu 16.04 LTS. I am really new to Linux.
I created a softwares directory within the Downloads dir for all the software and added it to my PATH. Then I was advised that it's better to ...
1
vote
1
answer
2k
views
How to change path for command
I had a self-compiled program installed on my computer. Tried to delete it by removing all of the folders and files, including the binaries located in usr/local/bin/.
I reinstalled the program from ...
18
votes
4
answers
76k
views
Show full path to file in terminal [duplicate]
I have a file. I'd like to echo out the full path to it in the terminal.
Which command would?
9
votes
1
answer
18k
views
Pytest is in PATH but not found
I've installed pytest for python testing, but I get No such file or directory error when simply trying to run it from a project folder.
It's in a location that should be accessible through the PATH ...
2
votes
1
answer
2k
views
Install java in a linux server without admin rights
I am using a cloud computing server were I don't have admin rights, for biology research which has java's
version:
user@server:~$ java -version
java version "1.4.2"
gij (GNU libgcj) version ...
3
votes
4
answers
37k
views
How to reset my $PATH environment variable back to default?
I am a noobie. I tried searching the duplicates for answers, but none worked. I accidentally altered my $PATH variable in my terminal when trying to install ghc. Every time I open a terminal window I ...
3
votes
1
answer
2k
views
Create txt with full paths to files and some additional text
I have a bunch of files, in many folders and I wanted to create txt file with full paths to this files and with space and name of the directory they are in. something like:
halva/foo/bar/1/something....
1
vote
2
answers
376
views
How do I modify paths and change to a real path?
I am a beginner at Ubuntu. I am wanting to install my-udev-notify, and I was able to follow these instructions in the README.md file:
Installation
------------
- unpack archive somewhere ...
1
vote
1
answer
479
views
Why my .bashrc has error?
I added this path to .bashrc file .
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export HADOOP_INSTALL=/usr/local/hadoop
export $PATH=$PATH:$HADOOP_INSTALL/bin
export $PATH=$PATH:$...
1
vote
1
answer
2k
views
Emscripten and em++ install question
I installed the latest emsdk_portable so I could use Emscripten, then I ran the following commands with no problem.
$ ./emsdk update
$ ./emsdk install latest
Then, I went to run this command:
./...
2
votes
3
answers
3k
views
How can I create a command with arguments and a configuration file? [closed]
Directly to the point, I want to give the user the flexibility to pass arguments to a command in order to control how the commands should run, something like:
pcap -d 30 -w 2
In other words:
I want ...