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.
- Linux Regular Expression 1)
- Describes how to install a Linux virtual machine.
- How to handle Linux crashes
- Common LinuxYUM commands
- A Brief Introduction to the use of Linux Operators