Saturday, April 27, 2024
 Popular · Latest · Hot · Upcoming
24
rated 0 times [  24] [ 0]  / answers: 1 / hits: 71016  / 3 Years ago, wed, june 16, 2021, 7:01:22

I am trying to configure a build from source an old version of gcc on my dev machine. The documentation highlight several environment variables that need to be changed in order to do this. I was wondering how to do this and also where linux stores them and if a system restart is required for any changes to be registered??


More From » 12.04

 Answers
5

The Global environment variables of your system are stored in /etc/environment.

Any changes here will get reflected throughout the system and will affect all users of the system. Also, you need a Reboot, for any changes made here to take effect.



User level Environment variables are mostly stored in .bashrc and .profile files in your Home folder. Changes here only affect that particular user. Just close and open the terminal for configuration changes to take place.



Edit : If you don't want to Reboot or restart your terminal, you can make use of the source command.

Eg. source /etc/environment or source .bashrc


[#36799] Thursday, June 17, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
brailloni

Total Points: 122
Total Questions: 108
Total Answers: 108

Location: North Korea
Member since Tue, Apr 4, 2023
1 Year ago
brailloni questions
Tue, Jun 21, 22, 21:51, 2 Years ago
Thu, Jul 29, 21, 05:25, 3 Years ago
Sat, Apr 2, 22, 17:32, 2 Years ago
Mon, Oct 31, 22, 21:39, 2 Years ago
;