Ubuntu 16.04 Modify MAC address and network common settings (ip/dns/Gateway)

Source: Internet
Author: User

1, first stop the desktop version of the NetworkManager, this thing is very difficult to use, and some settings need to restart.

sudo systemctl Stop Networkmanager.service sudo systemctl disable Networkmanager.service

2, set the MAC address in the Help document should look for this keyword: hardware address, set up in two ways, temporary and permanent.

    1. Temporary, direct use of the command line, restart after the failure
      sudo ifconfig eth0 Down sudo ifconfig eth0 hw ether xx:xx:xx:xx sudo ifconfig eth0 up
    2. Permanent, modify/etc/network/interfaces
      xx:Networking:1b:2c:1f# Restart network services sudo service restart

3, Network Common settings/etc/network/interfaces (ip/dns/Gateway)

#Thisfiledescribes the network interfaces available on your system# and how to activate them. for Moreinformation, see Interfaces (5). # The Loopback network interface #环路auto loiface Lo inet Loopback # The primary network Interfaceauto eth0 #网卡iface Eth0 inet Static #设置IPV4为静态地址address1.1.1.2#设置IPnetmask255.255.255.0#设置子网掩码network1.1.1.255#设置网关gateway1.1.1.1#设置网关dns-nameservers1.1.1.1#设置DNS服务器, multiple DNS separated by spaces-search. com #限制. com queries go to the DNS server set above hwaddress etherxx: on:Geneva: 1b:2c:1f #设置MAC地址

Reference:

http://blog.csdn.net/zhangwu1241/article/details/53311534

http://www.youritronics.com/how-to-set-the-mac-address-from-etcnetworkinterfaces-in-debian/

Https://www.cnblogs.com/qiuxiangmuyu/p/6343841.html

Http://wiki.ubuntu.org.cn/Quick_HOWTO_:_Ch03_:_Linux_Networking/zh#.2Fetc.2Fnetwork.2Finterfaces.E6.96.87.E4.BB.B6

http://blog.csdn.net/u011077672/article/details/71123319

Https://wiki.debian.org/NetworkConfiguration

Ubuntu 16.04 Modify MAC address and network common settings (ip/dns/Gateway)

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.