1】进入根目录
[ling@localhost root]$ su root
Password: (输入密码)
2】查看当前网络配置文件
输入[root@localhost ~]# more
/etc/sysconfig/network-scripts/ifcfg-eth0
3】更改IP地址
[root@localhost ~]#
ifconfig eth0 192.168.2.195 netmask 255.255.255.0
出现问题:bash: ifconfig: command not found
解决:[root@localhost ~]# whereis ifconfig
ifconfig: /sbin/ifconfig /usr/share/man/man8/ifconfig.8.gz
命令改为:[root@localhost ~]# /sbin/ifconfig eth0 192.168.2.195
netmask 255.255.255.0
4】查看更改后的IP地址
5】获取IP地址
XShell中新建,主机中填写IP地址
6】用户验证,填写用户账号和密码
7】连接成功