Can not use command telnet in git bash

一曲冷凌霜 提交于 2019-12-06 22:32:45

问题


I try to use the command telnet in Git Bash, but it shows this error:

bash:telnet: command not found

My operating system is Windows 10. Any idea is appreciated.


回答1:


That's because telnet is not provided with git.

In windows, you need to go to control panel, programs, turn windows features on/off and enable the telnet client.




回答2:


To add on to @lostbard's answer and @signonsridhar's comment, telnet utility need to be invoked with winpty to work on git bash.

Example:

 MINGW64 ~
$ which telnet
/c/WINDOWS/system32/telnet
 MINGW64 ~
$ winpty telnet localhost 2181
    Zookeeper version: 3.4.14-4c25d480e66aadd371de8bd2fd8da255ac140bcf, built on 03/06/2019 16:18 GMT


来源:https://stackoverflow.com/questions/38155583/can-not-use-command-telnet-in-git-bash

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!