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 $PATH
output from a new bash session./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/
PATH
definitions?grep PATH /etc/bash.bashrc ~/.bashrc
Did you really mean/.bashrc
or is that a typo? Add the lineecho foo
below yourexport PATH
line and see whether it is executed.export PATH=$PATH:/home/ivan/java-oxygen/eclipse
to ~/.profile