How To Edit Environment Variables In Linux?
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. To edit environment variables in Linux, open a terminal window and type “nano /etc/environment”. This will open the environment file in the nano text editor.
2. Scroll through the environment variables in the file and edit any of the variables as desired.
3. After making your changes, press “Ctrl+X” and then “Y” to save your changes and exit the editor.
4. Finally, type “source /etc/environment” in the terminal window to reload the environment variables.