Tag Info

New answers tagged

0

This question is related to some of the other posts on askubuntu.com The following might be of help in answering your questions about the PATH environment variable in general as well as your specific Android studio setup. General PATH related questions on Linux: What is $PATH Add a directory to your path There are also some old Android SDK path questions ...


1

Adding a variable to /etc/environment did work for me. However I did have to reboot after changing /etc/environment for the change to take effect. Simply closing and re-opening the terminal window was not sufficient.


2

For me, this is logical: the $PATH is searched from the beginning to the end and the first matching executable will be run. See the following Q&A's on the same topic: Order of files to be executed in linux and how to change it How to correctly add a path to PATH? How does unix search for executable files? So, first found, first used!


1

To answer this question well really requires a thorough understanding of GNU autotools, which I don't have: nevertheless I hope these comments will help. The configure script for a particular build is generated from its configure.ac file using autoconf. In turn, configure.ac uses standard macros to test for the presence of specified components. In this ...


1

All you need to do is quoting the variable, since it contains a space character. cd "$geo" Quoting variables which might contain spaces is always good practice in shell code.


2

You see: bash: cd: /media/geo/Novo: No such file or directory since you tried to set a variable for the folder "/media/geo/Novo volume/Geo" (with a space) and the error is about only the first part of the path up to the space, you see, that the space is wrongly treated as separator. If you want to use cd $geo yuo could have to include the quotes in ...


1

Stolen from this SO question If you do cd "$geo" I'll bet you get the right result That being said, try doing alias geo="cd /media/geo/OS/Users/Geo" and then just using geo (as a command) to go there.


0

The issue is tracked on github where they also give an alternative solution that worked for me: sudo apt-get install nodejs-legacy


0

The tutorial EnvironmentVariables is good reading on this topic.


0

You can use su directly if you have enabled the root user by setting a password for the same. This can be done with the command sudo passwd root


1

I think I read somewhere that sudo does not pass along all environment variables on purpose, since that could be used to introduce root exploits (not unlike the recent bash bugs). Or you may need to use sudo with -E -E, --preserve-env Indicates to the security policy that the user wishes to pre‐ serve their existing environment ...


1

As others have said, you may want to edit ~/.bashrc instead. Just want to mention that if you want the modified PATH to be available also in the graphical environment, you should edit ~/.profile rather than ~/.bashrc.


0

open .bachrc file and write it in it: type gedit ~/.bashrc in terminal copy and paste this line at the end of the file(one new line): PATH="$PATH:$HOME/.composer/vendor/bin" this way the path will be available every time you open terminal besides this, you can also store some variables. for example, add a="this a variable" add the end of file. this ...


1

You shoud write it in your ~/.bashrc not in your ~/.bach_profile, then it should work


1

As muru said, this is a duplicate question. You can't do it in /etc/environment, but you can create e.g. /etc/profile.d/mypath.sh and give it this contents: export PATH="$PATH:$SCALA_HOME/bin" Reference: EnvironmentVariables


1

You don't need to use export; the PATH variable is already exported at that point. Anyway, .profile is read when you log in, so what you've done is correct, but opening a new terminal does not count as logging in.


2

Adding them to ~/.profile (apply to your user) or a /etc/profile.d/*.sh file (apply to the entire system) is the correct way. In order for the change to apply, you have to log out of your system and log back in, as ~/.profile and /etc/profile.d/*.sh are loaded when you login. To 'reload' ~/.profile in a running terminal, you can use source ~/.profile



Top 50 recent answers are included