1、先停止桌面版自带的NetworkManager,这东西很难用,且有些设置需要重启。

sudo systemctl stop NetworkManager.service
sudo systemctl disable NetworkManager.service

2、设置MAC地址在帮助文档中应该找这个关键字:hardware address,设置有两种方式,临时和永久。

  1. 临时,直接使用命令行方式,重启后失效

    sudo ifconfig eth0 down
    sudo ifconfig eth0 hw ether xx:xx:xx:xx
    sudo ifconfig eth0 up
  2. 永久,修改/etc/network/interfaces
    #加入如下MAC地址配置
    hwaddress ether :::1b:2C:1F
    #重启网络服务
    sudo service networking restart

3、网络常用设置/etc/network/interfaces(IP/DNS/网关)

#This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces().
# The loopback network interface #环路
auto lo
iface lo inet loopback
# The primary network interface
auto eth0 #网卡
iface eth0 inet static #设置IPV4为静态地址
address 1.1.1.2 #设置IP
netmask 255.255.255.0 #设置子网掩码
network 1.1.1.255 #设置网关
gateway 1.1.1.1 #设置网关
dns-nameservers 1.1.1.1 #设置DNS服务器,多个用空格隔开
dns-search .com #限制.com的查询走上面设置的DNS服务器
hwaddress ether :::1b:2C:1F #设置MAC地址

参考:

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修改MAC地址以及网络常用设置(IP/DNS/网关)的更多相关文章

  1. Ubuntu 16.04服务器版查看DHCP自动分配的IP、网关、DNS

    说明: 1.在服务器版本中,没有想桌面版一样的NetworkManager工具,所以的一切都是在命令行上操作的. 2.本文只针对DHCP默认分配的IP进行查看. 方法: 1.如果要使用DHCP,那么需 ...

  2. Ubuntu 16.04修改ssh端口

    1 安装防火墙 sudo apt-get install ufw启用 sudo ufw enable sudo ufw default deny 作用:开启了防火墙并随系统启动同时关闭所有外部对本机的 ...

  3. Ubuntu 16.04修改配置静态IP和DNS

    Ubuntu 16.04修改配置静态IP和DNS 1.修改interfaces 文件 sudo gedit /etc/network/interfaces 2.添加 例如: auto enp0s25 ...

  4. 阿里云ECS下Ubuntu 16.04系统安装python3.6.5 环境并设置为默认

    一.添加python3.6安装包并安装: 二.修改系统默认python版本为3.6: 三.安装并升级pip版本: 一.添加python3.6安装包并安装: sudo apt-get install s ...

  5. ZZ : Ubuntu:永久修改MAC地址

    方法一: 1)编辑“/etc/init.d/rc.local”文件(sudo gedit /etc/init.d/rc.local) 2)在此配置文件的最后面加上如(Ubuntu:修改网卡的MAC地址 ...

  6. Ubuntu 16.04安装Mac OS 12虚拟机资源(没成功,但资源还是可以用)

    整理的Mac OS 12虚拟机资源.装虚拟机基本是按这样的套路: 1.先装VM 2.破解VM使其支持Mac OS 12,这个脚本基本是全平台支持,可以看里面的教程文档. 3.用镜像安装系统. 资源: ...

  7. ubuntu 16.04 国内仓库地址

    deb http://mirrors.aliyun.com/ubuntu xenial maindeb http://mirrors.aliyun.com/ubuntu xenial universe ...

  8. Ubuntu 16.04修改显示字体大小(包括GNOME/Unity)

    在Ubuntu中字体都基本偏大,且和分辨率无关. Unity: 安装Unity Tweak Tool sudo apt-get install unity-tweak-tool GNOME: 打开优化 ...

  9. Ubuntu 16.04 修改状态栏位置

    修改状态栏位置: gsettings set com.canonical.Unity.Launcher launcher-position Bottom #底部(苹果风格) gsettings set ...

随机推荐

  1. socket 编程 TCP 实现简单聊天功能【转】

    转自:http://blog.csdn.net/liujia2100/article/details/9006479 版权声明:本文为博主原创文章,未经博主允许不得转载. 各个主要函数的功能: .so ...

  2. Style2Paints:用AI技术为线稿快速上色的工具(GitHub 3310颗星)

    python 开源项目: Style2Paints:用AI技术为线稿快速上色的工具(GitHub 3310颗星) https://github.com/lllyasviel/style2paints

  3. Leetcode 之Wildcard Matching(32)

    跟上题类似,主要考虑‘*’的匹配问题.如果遇到‘*’,则跳过继续匹配,如果不匹配,则s++,重新扫描. bool isMatch2(const char *s, const char *p) { if ...

  4. eclipse 配置jsp

    1.安装jdk和jre 下载地址:http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html ...

  5. python中的map、reduce、filter、sorted函数

    map.reduce.filter.sorted函数,这些函数都支持函数作为参数. map函数 map() 函数语法:map(function, iterable, ...) function -- ...

  6. LeetCode解题报告—— Median of Two Sorted Arrays

    There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two ...

  7. python安装numpy和scipy的资源

    whl资源:注意python版本和位数. http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy

  8. python 网络爬虫框架scrapy使用说明

    1 创建项目scrapy startproject tutorial 2 定义Itemimport scrapyclass DmozItem(scrapy.Item):    title = scra ...

  9. For input string: "..."

    之前在项目中通过EL表达式从cart 中取出itemPirce这个值时始终报:For input string: "${cart.itemPrice / 100}" 错误. 事故原 ...

  10. HDU 4863 Centroid of a Tree

    树的重心,树形$dp$,背包. 树的重心有两个充分必要条件: $1$.某树有两个重心$a$,$b$ $<=>$ $a$与$b$相邻,断开$a$与$b$之间的边之后,两个联通分量内的点的个数 ...