Skip to main content
code formatting
Source Link
Eliah Kagan
  • 120k
  • 58
  • 329
  • 516

The difference between the bothtwo is that the /etc/enivironment/etc/enivironment file will work for all of the users while the bash.bashrc file will particularly work for that user only. And if you do anything wrong in the /etc/environment/etc/environment file then the consequences may be severe while you can easily undo the changes in the bash.bashrc file by copying the contents of the /etc/environment file. But the first preference is give to the bash.bashrcbash.bashrc file and then to /etc/environment file. It is not that if you make changes in the bash.bashrcbash.bashrc file then the terminal will give first preference to the local user file (iei. bashe.bashrc, bash.bashrc) and then to the main file (iei.e., /etc/environment/etc/environment).

The difference between the both is that the /etc/enivironment file will work for all of the users while the bash.bashrc file will particularly work for that user only. And if you do anything wrong in the /etc/environment file then the consequences may be severe while you can easily undo the changes in the bash.bashrc file by copying the contents of the /etc/environment file. But the first preference is give to the bash.bashrc file and then to /etc/environment file. It is not that if you make changes in the bash.bashrc file then the terminal will give first preference to the local user file (ie. bash.bashrc) and then to the main file (ie. /etc/environment)

The difference between the two is that the /etc/enivironment file will work for all of the users while the bash.bashrc file will particularly work for that user only. And if you do anything wrong in the /etc/environment file then the consequences may be severe while you can easily undo the changes in the bash.bashrc file by copying the contents of the /etc/environment file. But the first preference is give to the bash.bashrc file and then to /etc/environment file. It is not that if you make changes in the bash.bashrc file then the terminal will give first preference to the local user file (i.e., bash.bashrc) and then to the main file (i.e., /etc/environment).

Source Link
Pranit Bauva
  • 1.1k
  • 2
  • 13
  • 23

The difference between the both is that the /etc/enivironment file will work for all of the users while the bash.bashrc file will particularly work for that user only. And if you do anything wrong in the /etc/environment file then the consequences may be severe while you can easily undo the changes in the bash.bashrc file by copying the contents of the /etc/environment file. But the first preference is give to the bash.bashrc file and then to /etc/environment file. It is not that if you make changes in the bash.bashrc file then the terminal will give first preference to the local user file (ie. bash.bashrc) and then to the main file (ie. /etc/environment)