How to set PATH variables for ionic 3 in UBUNTU 16.04?


#1

Friends,

As part of ionic installation I need to set the PATH , ANDROID_HOME variables permanently in my configuration like:

export ANDROID_HOME=/home/t/Android/Sdk

export PATH=$PATH:$ANDROID_HOME/bin

export PATH=/opt/gradle/gradle-4.7/bin:$PATH

How it can do ?

please advise

Thanks

Anes


#2

.bashrc is a shell script that Bash runs whenever it is started interactively.

Update your .bashrc file:

nano .bashrc

If you don’t want to maintain two separate config files for login and non-login shells, put your common settings in ~/.bashrc and make sure you source it from your ~/.bash_profile:

if [ -r ~/.bashrc ]; then
 source ~/.bashrc
fi

See: https://robferguson.org/blog/2016/03/29/how-to-install-git-maven-and-eclipse-on-elementary-os/