Tag Info

Hot answers tagged

4

First of all, you don't want to do gradle="...". That simply creates a variable called gradle and is irrelevant (unless that variable is somehow used by gradle but you haven't said so). What you want to do is add the directory containing the gradle executable to the list of directories your system searches through when trying to find programs to run. This is ...


3

First Please note that adding envs to the .bash_profile is not a temporary as indicated in other answer, but your problem is adding in non-suitable place since .bash_profile is called when you login from console which I don't think your case. Please Read the rest and find your solution: Quoted from ...


2

You can add your PATH to ~/.profile ~./bash_profile does not affect terminal emulators, like gnome-terminal, that are started after you log into system. As an option you can setup PATH in /etc/environment globally.


2

You quoted the heredoc delimiter: sudo su<<'HERE' Variables in a heredoc are not expanded if the delimiter is quoted. From the docs: If any characters in word are quoted, the delimiter is the result of quote removal on word, and the lines in the here-document are not expanded. If word is unquoted, all lines of the here-document are ...


1

Maythux is correct, the variable was declared local, but for it to be seen as a global variable by the system it would have to be exported. if [ -f ~/.bashrc ]; then . ~/.bashrc fi Also works in .bash_profile to source $HOME/.bashrc


1

One way is to edit /etc/pam.d/login like this: --- a/login 2015-06-15 03:35:17.422387358 +0200 +++ b/login 2015-06-15 03:36:41.535536201 +0200 @@ -50,7 +50,7 @@ session required pam_env.so readenv=1 # locale variables are also kept into /etc/default/locale in etch # reading this file *in addition to /etc/environment* does not hurt -session ...



Only top voted, non community-wiki answers of a minimum length are eligible