0

Can anyone explain the difference between

$ gedit ~/.bashrc

and

$sudo -H gedit /etc/environment

in setting environment variables?

Bachalo
  • 753

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
  • 105,154
  • 20
  • 279
  • 497