Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The method of setting fixed ip address by ubuntu16.0.4

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Since ip is easy to change after Ubuntu restart, the ip address can be fixed in the following ways

1. Set ip address

Vi / etc/network/interface# The loopback network interfaceauto loiface lo inet loopback# The primary network interfaceauto ens32iface ens32 inet staticaddress 192.168.159.130netmask 255.255.255.0gateway 192.168.2.1

two。 Set up dns

Vi / etc/resolvconf/resolv.conf.d/basenameserver 8.8.8.8nameserver 8.8.4.4

3. Refresh the configuration file

Resolvconf-u

4. Restart network services

/ etc/init.d/networking restart

If the above command fails to restart the network card, you can manually close the network card, and then open the network card, this is the ip has been changed to the fixed ip you set.

Summary

The above is the method of setting a fixed ip address for ubuntu16.0.4 introduced by the editor. I hope it will be helpful to you. If you have any questions, please leave me a message and the editor will reply you in time. Thank you very much for your support to the website!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report