I'm newbie here and unknowingly i added some un necessary paths (like 2 times java ) to
$PATH
I tried many solution but they remove until i'm active. If i reboot last path comes again.
/usr/lib/jvm/java-13-oracle/db/bin
Here is my output
/home/nikhil/anaconda3/bin:/home/nikhil/anaconda3/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/lib/jvm/java-13-oracle/bin:/usr/lib/jvm/java-13-oracle/db/bin
How to remove that permanently. Even i log out or reboot or shut down. I'm on ubuntu 18.04.
This is my etc/env...
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"
/etc/environment/?/etc/profile?~/.bashrc?) – steeldriver Feb 25 '20 at 15:37sudo adduser user, login as it usingsudo usercommand andecho $PATHfrom it in your question. – Gryu Feb 25 '20 at 15:49cat /etc/bash.bashrc? – Gryu Feb 25 '20 at 16:00crontab -eandsudo crontab -e– Gryu Feb 25 '20 at 16:08.shfiles that might have been sourced from the/etc/profile.ddirectory ex.grep -w 'PATH' /etc/profile.d/*.sh– steeldriver Feb 25 '20 at 16:10# Expand $PATH to include the directory where snappy applications go. /etc/profile.d/apps-bin-path.sh:if [ -n "${PATH##*${snap_bin_path}}" -a -n "${PATH##*${snap_bin_path}:*}" ]; then /etc/profile.d/apps-bin-path.sh: export PATH=$PATH:${snap_bin_path} /etc/profile.d/jdk.sh:export PATH=$PATH:/usr/lib/jvm/java-13-oracle/bin:/usr/lib/jvm/java-13-oracle/db/bin– Nikhil Badyal Feb 25 '20 at 16:15/etc/profile.d/jdk.shfile – steeldriver Feb 25 '20 at 16:31.ignoreor (3) delete the file. Which one is right for your situation is for you to decide. – steeldriver Feb 25 '20 at 16:45/etc/profile.d, you will need to log out or at least start a new login session (ex.su -l username) for the changes to take effect – steeldriver Feb 25 '20 at 19:39