Support Questions
Find answers, ask questions, and share your expertise
Check out our newest addition to the community, the Cloudera Innovation Accelerator group hub.

-bash: hdfs: command not found hortonworks HDP_2.5

Hdfs dfs -ls command not working in hortonworks HDP_2.5





The issue can happen in the below scenarios:-

1) hdfs binaries are not installed properly

2) The location of the hdfs execuatble script is not present in $PATH of the user who is executing the command. To verify the same, try the below steps:-

A) Please clarify if the hdfs binaries is installed by navigating to the location "/usr/hdp/<version>/hadoop-hdfs/bin" directory.

B) Please check if /usr/bin directory and HADOOP_HOME is present in the $PATH environment variable? (echo $PATH)

C) Output of the command ls -ltr /usr/bin/hdfs

By default a softlink is created for hdfs script in usr/bin directory.

I am using Hortonwork sandbox 2.5 in Oracle virtual box.i am not compiling anything . So it should be there by default.

@Indrajit swain

How did you connect to the Sandbox? The 2.5 Sandbox uses docker. The SSH server for the docker container is on port 2222. You'll need to connect as follows:

$ ssh root@localhost -p 2222

New Contributor

what is the password for the above command?


I have the same issue. I noticed /usr/hdp is missing and root's .bash_profile is not pre-configured properly with HADOOP_HOME environment valuable missing, and ambari_server start command is not working and recognizable neither.


Please confirm with JPS command whether hadoop services running in your sandbox,and also set hadoop paths in your bash_profile or bashrc and retry hdfs dfs -ls /

Let me know how it went.