Problem: When you execute hdfs dfs -ls /input, you encounter hdfs: command not found.
Prerequisite: hadoop-2.8.5 package is under /home/angel/app; ordinary users are angel.
Solution:
1. Add the environment variable
cd /home/angel/
vim.tiny /home/angel/.profile
at the end of the file:
export HADOOP_HOME=/app/hadoop-2.8.5/bin
export PATH=$JAVA_HOME/bin:$PATH
2. Activate the environment variable
source.profile
3. Test
hdfs
to solve this problem successfully!