How to set up environment variable properly?

TheOnlyIdiot

I opened the /etc/environment and added the line ANDROID_SDK_HOME="/home/tom/android-sdk" but I tried echo $ANDROID_SDK_HOME but displayed nothing. I have JAVA_HOME in the same /etc/environment but its working. Please help me fix the problem. Thanks in advance.

TheKojuEffect

Environment variables can be defined permanently by editing the .profile file in your home directory. Here's how:

Edit your .profile file with a command like gedit ~/.profile. Append this to the end of the file:

export ANDROID_SDK_HOME=/home/tom/android-sdk

You can source .profile to make it apply right away. Each time you restart your system, the .profile file is loaded, restoring this setting.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

How could I set up this variable properly? - Python

How to set the environment variable in tox?

How to set up JavaScript namespace and classes properly?

How to set Environment Variable in Netbeans?

How to set GOPRIVATE environment variable

How to properly set up a Rust environment in VSCode on Debian?

How to set environment variable with heroku?

How to set an environment variable in Android?

How to set up a root cron job properly

How to properly set PHP environment variable to run commands in Git Bash

How can I set up the python environment variable on Windows 7?

how to properly set environment variables

How to set up PulseAudio remote properly and securely?

how to set up an environment variable that it stores a path along with another env variable but doesnt expands

How to properly set up this Sage Cell Server?

How can I set up an environment variable to work with TCC?

What is the LESS environment variable to man and how is it set up?

How to properly set environment variables in Debian Jessie?

Why is this environment variable not set up?

zsh PATH variable not properly set from another environment variable

How to properly set Environment variables (golang on Manjaro)

How to permanently set an environment variable

How to properly set environment variables for KDE?

How to properly set environment variable TERM in CLion

How properly set up transition opacity effect

How to set environment variable permanently?

How to Properly Set Up custom Event

How to properly set bearer API token as an environment variable in K8 pod

nextJS how to load an environment variable properly