在 Ubuntu 下“查 telnet”通常有几种含义,我分别说一下,你可以按需看:
which telnet
或
telnet --version
安装客户端:
sudo apt update
sudo apt install telnet
dpkg -l | grep telnetd
或
systemctl status inetd
(telnet 服务通常由 inetd 或 xinetd 管理)
一般 Ubuntu 默认不安装 telnet 服务端,不推荐启用(不安全)。
telnet 192.168.1.100 23
或
telnet example.com 80
Connection refused → 端口没开No route to host → 网络不通sudo netstat -tulnp | grep :23
或(新系统)
sudo ss -tulnp | grep :23
现代系统建议用:
nc -vz 192.168.1.100 23
或
curl telnet://192.168.1.100:23
如果你是想:
告诉我具体场景,我可以给你更准确命令。