Why am I getting the Hadoop command and not finding an error?

I have installed and configured Hadoop on my Linux machine. I trying to run a sample MR job. And, started the Hadoop via the command /usr/local/hadoop/bin/start-all.sh and It gives me output as shown below.

namenode running as process 7876. Stop it first.

localhost: datanode running as process 8083. Stop it first.

localhost: secondarynamenode running as process 8304. Stop it first.

jobtracker running as process 8398. Stop it first.

localhost: tasktracker running as process 8612. Stop it first.


So I thought it is configured successfully. But when I am trying to run the below command it is giving an error Hadoop command not found, as shown below

jeet@jeet-Vostro-2520:~$ hadoop fs -put gettysburg.txt /user/jeet/getty/gettysburg.txt

hadoop: command not found

I am new to Hadoop, please address this issue.

The reason you are getting this error “Hadoop: command not found” is that you have not exported the Hadoop path in the environment variable.

Below are the steps that you can follow to remove this error:

open ~/.bashrc file (like gedit ~/.bashrc)

Add the following command in the same file and save it:

export PATH=$PATH:/usr/local/hadoop/bin/

Following the above steps, enable you to run the Hadoop commands from any directory.


The error “ Hadoop: Command not found” means that the command isn't in your search path.

Your Answer


Parent Categories