0

I was installing Hadoop on my Ubuntu.

This is my PATH now

echo $PATH
/usr/lib/jvm/java-1.11.0-openjdk-amd64/bin:/home/miki/.local/bin:/opt/hadoop-3.2.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

If I try ll

miki@miki:~$ ll
ll: command not found

My bashrc edit line

echo 'export HADOOP_HOME=/opt/hadoop-3.2.0;export PATH=$HADOOP_HOME/bin:$PATH' > ~/.bashrc

the ~/.bashrc file has only one line

export HADOOP_HOME=/opt/hadoop-3.2.0

All previous scripts were deleted.

It is also strange that letters have changed the color. Why?

1 Answers1

5

By using ... > ~/.bashrc, you have replaced the content with just the echo output.

So you removed all the other content of your .bashrc file. You can recover the default .bashrc with.

cp /etc/skel/.bashrc ~/

Then run your command again, but make sure to use >> instead of > to append to the file instead of replacing it.

See also.

pLumo
  • 22,565