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. 自动化测试===uiautomator2类似appium

    项目地址:https://github.com/openatx/uiautomator2 http://mp.weixin.qq.com/s/YKxwW-pL603Fll3QIWapVw https: ...

  2. 安全测试===sqlmap(叁)转载

    十五.操作系统控制 1.执行任意操作系统命令 参数:--os-cmd和--os-shell 若数据库管理系统是MySQL.PostgreSQL或微软的SQL Server且当前用户有相关权限Sqlma ...

  3. gnu app url[web][5星]

    http://www.gnu.org/software/software.zh-cn.html http://linux.chinaunix.net/news/2010/12/07/1175310.s ...

  4. 【模板】BZOJ 1692:队列变换—后缀数组 Suffix Array

    传送门:http://www.lydsy.com/JudgeOnline/problem.php?id=1692 题意: 给出一个长度为N的字符串,每次可以从串头或串尾取一个字符,添加到新串中,使新串 ...

  5. react项目中遇到的一些问题

    推荐使用facebook官方构建工具create-react-app来创建React基础工程.(然而我还是手动构建) (路由)官方旧版本和V4的比较.https://github.com/ReactT ...

  6. 解决 :java -version出现错误:“could not open `C:\Program Files\Java\jre7\lib\amd64\jvm.cfg”

    cmd 下java -version出现错误:“could not open `C:\Program Files\Java\jre7\lib\amd64\jvm.cfg”,出现这种错误可能是由于先前有 ...

  7. NOIP 2012 Day2

    tags: 扩展欧几里得 二分答案 查分 倍增 二分答案 贪心 NOIP categories: 信息学竞赛 总结 同余方程 借教室 疫情控制 同余方程 Solution 首先同余式可以转化为等式. ...

  8. POJ-2778

    DNA Sequence Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 12726   Accepted: 4862 Des ...

  9. http跟https的区别

    http: Hypertext transform protocol 超文本传输协议 是一个为了传输超媒体文档(比如html)的应用层协议 是为了web的浏览器跟web的server端的交流而设计的, ...

  10. Set Matrix Zeroes——常数空间内完成

    Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in place. Did yo ...