- How to find .bashrc file
This file is a hidden file inside your home directory
Do a:
ls -la ~/ | more
There should be a .bashrc on the first page. If not just create it with:
sudo vi ~/.bashrc
and add in the lines you need to add into it.
Permissions of my .bashrc are:
-rw-r--r-- 1 discworld discworld 3330 Mar 10 16:03 .bashrc
(chmod 644 .bashrc to make it rw r r).
2. -bash command not found
This issue happens if there is no $PATH variable set.
In this case, run the following command:
export PATH=”/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin”
3. Set JAVA_HOME or PATH
We can set JAVA_HOME or PATH either in /etc/environments or in .bashrc file