Maybe just for the sake of clarity
/.bashrc would be a file in your root directory /. This file could never be read by any user.
On the other hand ~/.bashrc means the .bashrc file from the current user.
Another option is to edit the .bashrc file in your /etc/skel directory, this change is global and every user in the system would have it as default when created.
.bash_profile as the official docs say:
This is the preferred configuration file for configuring user
environments individually. In this file, users can add extra
configuration options or change default settings:
This file adds some per user extra variables.
PS. If we talk about security, it is not recommendable to have exec paths in your home directory, the most secure option would be to have your eclipse in some place like /opt and as root create a symlink to the binary like:
cd /usr/bin
ln -s /opt/path/to/eclipse
This will produce a link for all the users and you won't need to add this specific ( and probably dangerous ENV var for every user)
echo $PATHoutput from a new bash session. – L29Ah Aug 13 '17 at 10:29/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games: /usr/local/games:/home/ivan/Documents/node-v6.11.0-linux-x64/bin/– NiHao92 Aug 13 '17 at 11:36PATHdefinitions?grep PATH /etc/bash.bashrc ~/.bashrcDid you really mean/.bashrcor is that a typo? Add the lineecho foobelow yourexport PATHline and see whether it is executed. – Hauke Laging Aug 13 '17 at 12:23export PATH=$PATH:/home/ivan/java-oxygen/eclipseto ~/.profile – NiHao92 Aug 13 '17 at 13:02.bashrcvs.bash_profilebut as Gilles pointed out in a previous post, and I agree: Environment variables should be set in one of the profile files as they should only need to be set once at login. That being said I think it should still be working if placed in.bashrcso this isn't being offered as a solution to the problem. – jesse_b Aug 13 '17 at 13:03.profilefile source your.bashrcand it shouldn't be an issue. – jesse_b Aug 13 '17 at 13:04.bash_profileis sourced when you start aloginbash shell..profileis used by all (maybe not all?) other shells for the same purpose, additionally some systems don't have a.bash_profileor you can remove your.bash_profilealtogether and this will cause bash to use.profile..bashrcis sourced whenever you start an interactive shell. http://www.joshstaiger.org/archives/2005/07/bash_profile_vs.html – jesse_b Aug 13 '17 at 13:07/bin/shI'm not sure where that points on linux mint (readlink -f /bin/sh). If it's pointing to/bin/dashit may not source your.bash_profile. Also did you log out and back in or just open a new terminal? – jesse_b Aug 13 '17 at 13:22.profileor.bash_profileeach time you open it. In this case I think.bash_profileis not being called because your default shell isdashand notbash. – jesse_b Aug 13 '17 at 13:29