UBUNTU16 Network Settings

Source: Internet
Author: User
Open the Ubuntu terminal and enter:

sudo gedit/etc/network/interfaces

Indicates that the interfaces file is opened using the Gedit editor. In the open file, if there is content, delete all first. Then enter the following code:

Auto Lo
Iface Lo inet Loopback

Auto Ens33
Iface ens33 inet Static
Address 192.168.8.100
Netmask 255.255.255.0
Gateway 192.168.8.2


Configuration complete, restart Network service:

/etc/init.d/networking restart

After startup, it was found that only lo, viewing logs, found no eth0 device found.

The original Ubuntu 16.04 network card is no longer named Eth0, this and the Rhel series, this time need to see the real network card name is God horse:

Cd/proc/sys/net/ipv4/conf

As you can see in this directory, in addition to Lo, there are ens160, so the NIC name is ens160 instead of the traditional eth0, so you need to modify the name in the interface file above.

UBUNTU16 Network Settings

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.