Getting error while running Kafka

Hi,

I am getting error while running the below command
kafka-topics.sh --create --zookeeper --ip-172-31-13-154.ec2.internal:2181 --replication-factor 1 --partitions 1 --topic testTwe
etWithKafka

-bash: kafka-topics.sh: command not found

Can some one help with this issue?

The unix shell looks for command in the PATH variable. To help shell find the kafka-topics.sh, you will have to append the location of kafka binaries in PATH environment variable in linux.

export PATH=$PATH:/usr/hdp/current/kafka-broker/bin

Please check: https://cloudxlab.com/assessment/slide/2/linux-basics/56/environment-variables