Brij Raj Kishore Brij Raj Kishore - 1 year ago 325
Linux Question, command not found

I am using Ubuntu 16.04 LTS and installed hadoop 2.7.2. The Output of

hadoop version


Hadoop 2.7.2
Subversion -r b165c4fe8a74265c792ce23f546c64604acf0e41
Compiled by jenkins on 2016-01-26T00:08Z
Compiled with protoc 2.5.0
From source with checksum d0fda26633fa762bff87ec759ebe689c
This command was run using /usr/local/hadoop-2.7.2/share/hadoop/common/hadoop-common-2.7.2.jar

and when i run

whereis hadoop

it gives output as

hadoop: /usr/local/hadoop /usr/local/hadoop-2.7.2/bin/hadoop.cmd /usr/local/hadoop-2.7.2/bin/hadoop

But when i run command

it says command not found.
also when i run

it gives output as command not found.

I am able to run these command when i navigate to hadoop directory but i want to run these command without navigating into hadoop directory.

Answer Source

Your problem is that bash doesn't know where to look for ./

You can fix this by opening $HOME/.bashrc and entering a line that looks like this:


This tells bash that it should look in '/usr/local/hadoop/sbin' for

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download