hadoop: command not found

0 votes

I hadoop installed in a linux machine. I have started the hadoop via the command /usr/local/hadoop/bin/start-all.sh and this is the prompt I am getting:

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

But when i am trying to push the data into hdfs using the command given below:

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

I am new to Hadoop. Can someone help me to resolve the issue?

Mar 27, 2018 in Big Data Hadoop by Shubham
• 13,290 points
2,471 views

1 answer to this question.

0 votes

The reason you are getting hadoop as unknown command because you have not exported hadoop path in the environment variable. In order to solve it, you need to edit your .bashrc file Here, are the steps that you have to follow:

  • open ~/.bashrc file (like gedit ~/.bashrc)
  • Add the following lines in the same file and save it:
export PATH=$PATH:/usr/local/hadoop/bin/

Now you can run the hadoop commands from any directory.

answered Mar 27, 2018 by kurt_cobain
• 9,240 points

Related Questions In Big Data Hadoop

+1 vote
1 answer
0 votes
2 answers

start-dfs.sh command is not starting Hadoop JobTracker & TaskTracker

On which version of hadoop do you ...READ MORE

answered Jul 24 in Big Data Hadoop by Lokesh Singh
605 views
0 votes
2 answers

Hadoop is not able to find jps command

jps is actually not a command of ...READ MORE

answered Apr 18, 2018 in Big Data Hadoop by Shubham
• 13,290 points
1,617 views
0 votes
1 answer

Hadoop Mapreduce: Class Not Found Exception

Try adding this Job job = new Job(conf, ...READ MORE

answered Oct 29, 2018 in Big Data Hadoop by Omkar
• 67,290 points
366 views
0 votes
1 answer

Hadoop Mapreduce word count Program

Firstly you need to understand the concept ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 10,510 points
2,392 views
0 votes
10 answers

hadoop fs -put command?

put syntax: put <localSrc> <dest> copy syntax: copyFr ...READ MORE

answered Dec 7, 2018 in Big Data Hadoop by Aditya
12,191 views
0 votes
1 answer
+1 vote
1 answer

Where to set hadoop.tmp.dir? core-site.xml or hdfs-site.xml?

hadoop.tmp.dir (A base for other temporary directories) is ...READ MORE

answered Mar 26, 2018 in Big Data Hadoop by nitinrawat895
• 10,510 points
1,669 views
0 votes
1 answer

Hadoop dfs -ls command?

In your case there is no difference ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by kurt_cobain
• 9,240 points
896 views
0 votes
3 answers

Cloudera Hadoop - Daemons not running

Please run below mentioned command. It will ...READ MORE

answered Aug 7, 2018 in Big Data Hadoop by Priyaj
• 56,520 points
540 views