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, Fedora, CentOS, Ubuntu and others. On a related note you can also try out the following commands:
# ifdown eth0
# ifup eth0
# /etc/init.d/network restart
OR
# /etc/init.d/networking restart

posted on 2018-10-31 13:00  刘应杰  阅读(531)  评论(0编辑  收藏  举报

导航