Linux How To Set Environment Variable?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
1. Use the export command to set environment variables using the following syntax: export VARIABLE_NAME=VALUE
2. To make the environment variable permanent, add it to the end of the ~/.bashrc file in the user‘s home directory.
3. To make a variable available to all users on the system, edit the /etc/profile or /etc/environment file.