ip a
sudo vi /etc/network/interfaces
更改网卡配置文件添加内容
修改内容以下:下面的enp0s3须要改为本身的网卡名称。ip地址,掩码网关本身合理配置就好了。记得wq!保存退出。html
auto enp0s3 iface enp0s3 inet static address 192.168.0.1 netmask 255.255.255.0 gateway 192.168.0.1 dns-nameservers 223.5.5.5
/etc/init.d/networking restart
ping baidu.com
sudo ps -e |grep ssh sudo netstat -lntp
若是安装了的是会有sshd服务的,下面的图片是没有安装ssh服务
ubuntu
sudo apt-get update
sudo apt-get install openssh-server
ifconfig ip a