3

I've installed ubuntu 20.04.3 lts and i installed anaconda3, i had to uninstall anaconda3 since i some problem accured by just type this command #rm -f anaconda3 from root and /home/user directory. After this i got this trouble given below,

thilipkumar@thilipkumar-Inspiron-5520:~$ sudo -s
[sudo] password for thilipkumar: 
root@thilipkumar-Inspiron-5520:/home/thilipkumar# ls
Command 'ls' is available in the following places
 * /bin/ls
 * /usr/bin/ls
The command could not be located because '/bin:/usr/bin' is not included in the PATH environment variable.
ls: command not found
root@thilipkumar-Inspiron-5520:/home/thilipkumar# 

and in my .bashrc last few lines,

# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/home/thilipkumar/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
    eval "$__conda_setup"
else
    if [ -f "/home/thilipkumar/anaconda3/etc/profile.d/conda.sh" ]; then
        . "/home/thilipkumar/anaconda3/etc/profile.d/conda.sh"
    else
        export PATH="/home/thilipkumar/anaconda3/bin:$PATH"
    fi
fi
unset __conda_setup
# <<< conda initialize <<<

can anyone suggest me what to do next?

2
  • 3
    Please show us the complete output of echo $PATH
    – user535733
    Oct 24 at 14:31
  • 1
    thilipkumar@thilipkumar-Inspiron-5520:~$ echo $PATH /home/thilipkumar/anaconda3/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin thilipkumar@thilipkumar-Inspiron-5520:~$ sudo -s [sudo] password for thilipkumar: root@thilipkumar-Inspiron-5520:/home/thilipkumar# echo $PATH /root/anaconda3/ root@thilipkumar-Inspiron-5520:/home/thilipkumar# @user535733 Oct 24 at 14:56
4

Check the /root/.profile and /root/.bashrc files of the root user to correct where the path is wrongly set.

You also could revert these files to default by copying the respective files in /etc/skel over to /root.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.