Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

how to set environment variable in linux permanently

#open terminal and type:
$ nano .bashrc

#scroll to the bottom of the script and type:
export <place variable name in here> = '<place variable value here>'

#e.g
export ANDROID_SDK_ROOT='/home/<$USER>/Android/Sdk'

#once you,re finished typing in your variable hit Ctrl+X then press enter
 
PREVIOUS NEXT
Tagged: #set #environment #variable #linux #permanently
ADD COMMENT
Topic
Name
7+9 =