0

Can anyone explain the difference between

$ gedit ~/.bashrc

and

$sudo -H gedit /etc/environment

in setting environment variables?

Bachalo
  • 753
  • 2
  • 10
  • 27

1 Answers1

1

Long story short:

  • If environment variable should be used by every user -> /etc/environment

  • If variable is just for one user -> ~/. profile or ~/.bashrc

Sergiy Kolodyazhnyy
  • 103,293
  • 19
  • 273
  • 492