使用
#dhclient eth0 只需要这一个指令即可,eth?根据实际情况填写不同的数字。
备注:
Linux Force DHCP client (dhclient) to renew ip address
Linux renew ip command
$ sudo dhclient -r //release ip 释放IP
$ sudo dhclient //获取IP
Now obtain fresh IP:
$ sudo dhclient
There is no need to restart network service. Above command should work with any Linux distro such as RHEL,
# ifdown eth0
# ifup eth0
# /etc/init.d/network restart
OR
# /etc/init.d/networking restart
本文介绍如何在 Linux 系统中使用 dhclient 命令来更新 IP 地址,包括释放当前 IP 和获取新的 IP 地址的方法。此外还提供了通过重启网络服务和使用 ifdown 与 ifup 命令来更新 IP 的替代方案。
941

被折叠的 条评论
为什么被折叠?



