1

Whenever I open a terminal, I always end up with this same error.

-bash: export: `/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin:/usr/local/hadoop/bin': not a valid identifier

And when I run command lines, I get errors like this:

-bash: sudo: No such file or directory

I can't even edit ~/.bashrc through gedit ~/.bashrc which I think could be the problem. echo $PATH gives me an empty line.

All this stuff happens under my personal account. There's a dedicated hadoop user account, which I created specifically for running hadoop and that works fine without a glitch.

In the process of hadoop setup, which involves editing environment variables, I edited ~/.bashrc as instructed by some tutorials.

What could be the problem, and how might I fix it?

Zanna
  • 72,312

1 Answers1

3

Probably your .bashrc or .profile is messedup.

Your gedit will not start if it is not in path and since your path is empty it is not in the path.

You should first establish a good enough path.

export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

And then you should be able to start gedit. Alternativelly you could just run gedit with its whole path. Like:

/usr/bin/gedit