需求:设置ip为 192.168.88.130
先关闭虚拟机

启动虚拟机
查看当前自动获取的ip
bash
ifconfig

使用 FinalShell 通过 ssh 服务远程登录系统,更换到 root 用户

修改ip配置文件
bash
vim /etc/sysconfig/network-scripts/ifcfg-ens33

重启网卡
bash
systemctl restart network
这时 FinalShell 会断开连接,因为 ip 已经由 192.168.88.128 变为 192.168.88.130了,更换ip重新连接,查看当前 ip

查看ip配置文件
bash
vim /etc/sysconfig/network-scripts/ifcfg-ens33
