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

How to set fixed IP based on Ubuntu 16.04

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

Share

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

This article mainly introduces how to set up a fixed IP based on Ubuntu 16.04. the article is very detailed and has a certain reference value. Interested friends must read it!

The methods are as follows:

First of all, this is done on the vm virtual machine under mac.

Add virtual network card to 1.vm

Turn on vm's preferences

Enter ifconfig on the local terminal

You can see that this is the virtual network card that you just joined.

two。 Set up virtual machine network adapter

At this point, starting the virtual machine is randomly allocated between 192.168.219.3 and 192.168.219.254, but if we need a fixed allocation, we need to configure it in the system itself.

3.ubuntu system allocates fixed ip

Enter sudo vim / etc/network/interfaces

Add the following content (the original content needs to be emptied)

Auto ens33iface ens33 inet staticaddress 192.168.219.100netmask 255.255.255.0gateway 192.168.219.2dns-nameservers 192.168.219.2

Let's explain it in detail.

The fixed ip 192.168.219 assigned by auto ens33iface ens33 inet static# is determined according to your virtual network card. In the first step, address 192.168.219.10 "netmask 255.255.255." gateway with fixed subnet mask is all x.x.x.2 by default, but the vm under windows can be set by itself. I did not find gateway 192.168.219.on mac dns-nameservers 192.168.219.2 if the input is the same as the gateway.

When you are finished, you only need to restart the network.

Sudo / etc/init.d/networking restart above are all the contents of the article "how to set fixed IP based on Ubuntu 16.04". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

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