Mac install and use telnet command operation

Popular selected articles, more technical dry goods, WeChat search the public account [Laughing Architect], reply the number "666", get a lot of free technical information, all are classics in the classics:

Since the mac system is upgraded, telnet cannot be used, but sometimes ping is not accurate enough, so look for some operation methods that can use telnet.

brew install telnet

When brew is installed, telnet can be installed by using the above command, but I get an error when I operate it. The error message is as follows:

> brew install telnet
Updating Homebrew...
Error: The following directories are not writable by your user:
/usr/local/sbin

You should change the ownership of these directories to your user.
  sudo chown -R $(whoami) /usr/local/sbin

And make sure that your user has write permission.
  chmod u+w /usr/local/sbin

It means to change the ownership of the directory /usr/local/sbin to the current user, and enter the following command directly in the terminal:

sudo chown -R $(whoami) /usr/local/sbin

After the command is executed, execute the installation command "brew install telnet" in the first step again, and you can see that the installation is successful. The prompt of successful installation does not necessarily need to be exactly the same as the following figure, it can be seen that the information is obviously different from the error message.

After the installation is complete, you can easily use the telnet command, the operation method is telnet ip port.

[Laughing Architect] Belongs to the programmer's own circle, scan the QR code on WeChat to follow , get more technical dry goods in the first time!

Guess you like

Origin blog.csdn.net/guoguo527/article/details/92810745