Summary: a simple method for setting the Linux ubantu Nic

Source: Internet
Author: User

In Linux, ubantu is a branch of the release version, and ubantu Linux is installed on my machine. Here we will summarize a simple answer for setting your machine on the Linux ubantu Nic, I hope it will be helpful for users who want to learn Linux to set the NIC. The Linux ubantu Nic settings are as follows:

Sudo su
Gedit/etc/network/interfaces

File Content:

Auto lo
Iface lo inet loopback

Auto eth0 # This should determine whether to enable this port
Iface eth0 inet static # static IP Address Setting
Hwaddress ether 52: 54: xx: 51: xx # Add the MAC address. Remember to put it before the IP address.
Address 202.198.151.17
Netmask 255.255.255.0
# Broadcast 202.198.151.255
Gateway 202.198.151.254

# Dynamic settings through dhcp

Iface eth1 inet dhcp

Set the MAC address ing or binding)

Gedit/etc/iftab

Add a row

Eth1 mac 52: 54: xx: 51: xx

Set DNS Server

Sudo vi/etc/resolv. conf

Content

Nameserver 202.198.125.255

Reset the network to enable new settings

Sudo/etc/init. d/networking restart

Is Over

In this way, we have completed the Linux ubantu Nic settings. The method is simple.

  1. Linux Regular Expression 1)
  2. Describes how to install a Linux virtual machine.
  3. How to handle Linux crashes
  4. Common LinuxYUM commands
  5. A Brief Introduction to the use of Linux Operators

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.