Ubuntu 16.04修改MAC地址以及网络常用设置(IP/DNS/网关)
1、先停止桌面版自带的NetworkManager,这东西很难用,且有些设置需要重启。
sudo systemctl stop NetworkManager.service
sudo systemctl disable NetworkManager.service
2、设置MAC地址在帮助文档中应该找这个关键字:hardware address,设置有两种方式,临时和永久。
- 临时,直接使用命令行方式,重启后失效
sudo ifconfig eth0 down
sudo ifconfig eth0 hw ether xx:xx:xx:xx
sudo ifconfig eth0 up - 永久,修改/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://blog.csdn.net/u011077672/article/details/71123319
https://wiki.debian.org/NetworkConfiguration
Ubuntu 16.04修改MAC地址以及网络常用设置(IP/DNS/网关)的更多相关文章
- Ubuntu 16.04服务器版查看DHCP自动分配的IP、网关、DNS
说明: 1.在服务器版本中,没有想桌面版一样的NetworkManager工具,所以的一切都是在命令行上操作的. 2.本文只针对DHCP默认分配的IP进行查看. 方法: 1.如果要使用DHCP,那么需 ...
- Ubuntu 16.04修改ssh端口
1 安装防火墙 sudo apt-get install ufw启用 sudo ufw enable sudo ufw default deny 作用:开启了防火墙并随系统启动同时关闭所有外部对本机的 ...
- Ubuntu 16.04修改配置静态IP和DNS
Ubuntu 16.04修改配置静态IP和DNS 1.修改interfaces 文件 sudo gedit /etc/network/interfaces 2.添加 例如: auto enp0s25 ...
- 阿里云ECS下Ubuntu 16.04系统安装python3.6.5 环境并设置为默认
一.添加python3.6安装包并安装: 二.修改系统默认python版本为3.6: 三.安装并升级pip版本: 一.添加python3.6安装包并安装: sudo apt-get install s ...
- ZZ : Ubuntu:永久修改MAC地址
方法一: 1)编辑“/etc/init.d/rc.local”文件(sudo gedit /etc/init.d/rc.local) 2)在此配置文件的最后面加上如(Ubuntu:修改网卡的MAC地址 ...
- Ubuntu 16.04安装Mac OS 12虚拟机资源(没成功,但资源还是可以用)
整理的Mac OS 12虚拟机资源.装虚拟机基本是按这样的套路: 1.先装VM 2.破解VM使其支持Mac OS 12,这个脚本基本是全平台支持,可以看里面的教程文档. 3.用镜像安装系统. 资源: ...
- ubuntu 16.04 国内仓库地址
deb http://mirrors.aliyun.com/ubuntu xenial maindeb http://mirrors.aliyun.com/ubuntu xenial universe ...
- Ubuntu 16.04修改显示字体大小(包括GNOME/Unity)
在Ubuntu中字体都基本偏大,且和分辨率无关. Unity: 安装Unity Tweak Tool sudo apt-get install unity-tweak-tool GNOME: 打开优化 ...
- Ubuntu 16.04 修改状态栏位置
修改状态栏位置: gsettings set com.canonical.Unity.Launcher launcher-position Bottom #底部(苹果风格) gsettings set ...
随机推荐
- 【字符串处理算法】字符串包含的算法设计及C代码实现【转】
转自:http://blog.csdn.net/zhouzhaoxiong1227/article/details/50679587 版权声明:本文为博主原创文章,对文章内容有任何意见或建议,欢迎与作 ...
- 网络知识===wireshark抓包出现“TCP segment of a reassembled PDU”的解释(载)
网上胡说八道,众说风云,感觉这篇还算靠谱点. 原文链接:http://blog.csdn.net/dog250/article/details/51809566 为什么大家看到这个以后总是会往MSS, ...
- 【常见的SQL Server连接失败错误以及解决方法】
[常见的SQL Server连接失败错误以及解决方法] http://blog.csdn.net/feixianxxx/article/details/5523922 ADO连接SQL Server ...
- [hadoop][基本原理]zookeeper简单使用
代码:https://github.com/xufeng79x/ZkClientTest 1.简介 zookeeper的基本原理和使用场景描述可参考:[hadoop][基本原理]zookeeper基本 ...
- Linux设备驱动--内存管理
MMU具有物理地址和虚拟地址转换,内存访问权限保护等功能.这使得Linux操作系统能单独为每个用户进程分配独立的内存空间并且保证用户空间不能访问内核空间的地址,为操作系统虚拟内存管理模块 ...
- java中的逻辑运算符,以及&与&&的区别,|与||的区别
原创,转载请留言联系 逻辑运算符: & 与 false&true=false:true&true=true:false&false=false 必须两个都是true才返 ...
- memcached安装+绑定访问ip
安装: 1.由于memcached是基于libevent的,需要安装libevent,libevent-devel $yum -y install libevent libevent-devel 2. ...
- vue分页tbale小荔枝
首先,动态加载数据 <table class="table table-bordered table-condensed no_margin_bottom jyjg_tab" ...
- python模块安装路径
Unix(Linux): prefix/lib/pythonX.Y/site-packages 默认路径:/usr/local/lib/pythonX.Y/site-packages 另外,在Unix ...
- es6字符串、数值、Math的扩展总结
字符串的扩展 1.for...of遍历字符串 2.includes()判断字符串中是否包含某个字符串,返回bool 3.startsWith(),endsWith()分别盘对字符串的头部和尾部是否含有 ...