macos 安装telnet命令

在10.12及以下版本,都内置了telnet命令,但是在10.13中,已经取消了

接下来给大家介绍下如何安装telnet命令

打开“终端”,输入:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

接着输入密码,一路回车就完成了。

完成后输入:brew help

正确输出命令提示就完成安装了,接下来我们继续安装telnet命令

输入:brew install telnet

等待完成,然后输入命令测试

telnet toutiao.com 80

通过上图可以看出来,已经成功安装,至于为什么头条返回400,是因为 我只发送了个hello,world,不是http协议的标准头。

还可以用brew安装wget命令:brew install wget

转自:http://baijiahao.baidu.com/s?id=1583456151074034806&wfr=spider&for=pc

posted @ 2018-06-17 01:57  Graffiti  阅读(1270)  评论(0编辑  收藏  举报