In version 10.12 and below, the Telnet command is built in, but in 10.13, it has been canceled.
Next, we'll show you how to install the telnet command.
Open "Terminal" and enter:
/usr/bin/ruby-e "$ (curl-fssl https://raw.githubusercontent.com/Homebrew/install/master/install)"
Then enter the password, all the way to complete the return.
Input after completion: Brew Help
The correct output command prompt completes the installation, then we continue to install the Telnet command
Input: Brew Install Telnet
Wait for completion, and then enter the command test
Telnet toutiao.com 80
As can be seen, has been successfully installed, as to why the headline returned 400, because I only sent a hello,world, not the standard header of the HTTP protocol.
You can also install the wget command with brew: Brew Install wget
Transferred from: http://baijiahao.baidu.com/s?id=1583456151074034806&wfr=spider&for=pc
MacOS Installation telnet command