1

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"

1 Answers1

0

To find all files with /usr/lib/jvm/java-13-oracle/bin text in your / directory, execute the next command:

sudo grep -rl "/usr/lib/jvm/java-13-oracle/bin" /

To reduce searching time, you could replace / by /etc, then by /home/youruserfolder

Then you could check suspicious files, trying to comment those, where export PATH=$PATH:/usr/lib/jvm/java-13-oracle/bin or something similar is present.

Gryu
  • 7,559
  • 9
  • 33
  • 52