1.Centos 7.6 临时修改IP地址
Centos 修改临时IP 用的是ifconfig命令 如:查询修改临时IP地址:ifconfig 设备网卡名 IP 子网掩码, 例如:ifconfig ens32 192.168.1.6/24
注意:1.临时IP重启后将消失
2.ifconfig在centos 7最小安装下可能没有,因为centos 7 是推荐用的是IP命令管理IP 查看IP如果想用ifconfig那就运行 yum search ifconfig (运行必须要连网)和yum install net.tools.x86_64 安装一下。
Service network restart // 重启centos 6 网卡的方法
System restart network // 重启centos 7 网卡的方法
2. 添加多个临时IP地址
Ifconfig 网卡名:0 第一个IP地址(netmask 子网掩码)
Ifconfig 网卡名:1 第二个IP地址(netmask 子网掩码)
3. 删除临时IP地址
Ifconfig ens32:0 del 192.168.1.6