在Ubuntu系统下,您可以使用以下命令来启动和停止Telnet服务:
打开终端(快捷键:Ctrl + Alt + T)
启动Telnet服务:
sudo systemctl start inetd
或者
sudo service inetd start
停止Telnet服务:
sudo systemctl stop inetd
或者
sudo service inetd stop
如果您希望Telnet服务在系统启动时自动运行,请执行以下命令:
sudo systemctl enable inetd
或者
sudo service inetd enable
如果您希望禁止Telnet服务在系统启动时自动运行,请执行以下命令:
sudo systemctl disable inetd
或者
sudo service inetd disable
请注意,这些命令适用于基于Systemd的系统(如Ubuntu 16.04及更高版本)。如果您使用的是基于SysVinit的系统(如Ubuntu 14.04),请使用service inetd start/stop/enable/disable命令。