I'm currently exploring and experimenting with my linux just for fun and educational purposes.
I have deleted the content of the /etc/bash.bashrc
and /etc/profile
and I don't have any configuration in the home directory for both root and local users, I also perform a reboot.
However when i run printenv PATH
the values of the path was still there which is:
$PATH=usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/usr/games
what might be defining the $PATH?
EDIT:
I forgot to mention that I'm using Kali linux.
I've found one of the culprit is in the /etc/profile.d/kali.sh
as mentioned by a guy named flyingdrifter in the comment section of this thread ->
Complete view of where the PATH variable is set in bash
(although his distribution is LinuxMint).
Now the $PATH variable has been reduced to
$PATH=/usr/local/bin:/usr/bin:/bin:/usr/games
which means that there are probably one last file that setting the PATH variable.
/etc
and shell init files in user's homes. A good place to start is the question in Wildcard's comment above. – Nasir Riley Aug 16 '18 at 13:50/etc
. – Nasir Riley Aug 16 '18 at 16:33