$ ./bin/zkCli.sh -server localhost:2181
...
JLine support is enabled
[zk: localhost:2181(CONNECTED) 0] ls /
[cluster, controller_epoch, controller, brokers, zookeeper, admin, isr_change_notification, consumers, log_dir_event_notification, latest_producer_id_block, config]
[zk: localhost:2181(CONNECTED) 5] get /controller
{"version":1,"brokerid":200,"timestamp":"1506417983145"}
cZxid = 0x11b
ctime = Tue Sep 26 11:26:23 CEST 2017
mZxid = 0x11b
mtime = Tue Sep 26 11:26:23 CEST 2017
pZxid = 0x11b
cversion = 0
dataVersion = 0
aclVersion = 0
ephemeralOwner = 0x15ebd811a0e0001
dataLength = 56
numChildren = 0
Zookeeper Tips
The zookeeper shell shipped with Kafka works with no support for command line history because jline jar is missing (see KAFKA-2385).
A solution is to use the official distribution of Apache Zookeeper (3.4.10 as of this writing) from Apache ZooKeeper Releases.
Once downloaded, use ./bin/zkCli.sh
to connect to Zookeeper that is used for Kafka.