what is difference between .bashrc , /etc/profile , /etc/environment ?

Forum rules
Before you post please read how to get help
Post Reply
Ultegro778
Level 1
Level 1
Posts: 16
Joined: Fri Jul 13, 2018 11:49 am

what is difference between .bashrc , /etc/profile , /etc/environment ?

Post by Ultegro778 » Thu Jul 04, 2019 5:01 am

hello guys i want setup java variable and path on my ubuntu. what is the correct file to setup it ? thx

rene
Level 11
Level 11
Posts: 3658
Joined: Sun Mar 27, 2016 6:58 pm

Re: what is difference between .bashrc , /etc/profile , /etc/environment ?

Post by rene » Thu Jul 04, 2019 7:46 am

This is detailed at https://help.ubuntu.com/community/EnvironmentVariables and specifically includes a Java example as an /etc/profile.d/ script.

Post Reply

Return to “Scripts & Bash”