linux下修改MAC地址方法
一、修改MAC地址方法
linux环境下:
需要用
#ifconfig eth0 down
先把网卡禁用
再用ifconfig eth0 hw ether 1234567890ab
这样就可以改成功了
要想永久改就这样
在/etc/rc.d/rc.local里加上这三句(也可以在/etc/init.d/network里加下面三行)
ifconfig
eth0 down
ifconfig eth0 hw ether 1234567890ab
ifconfig eht0
up
二、修改IP地址的方法
#ifconfig ethe0 down
#ifconfig ethe0 192.168.169.245
netmask
255.255.255.0
以上的方法下次启动时就无效了
如果要以后每次都生效则加入到以下文件里面
在/etc/sysconfig/network-scripts/下修改ifcfg-eth0地址
三、一块网卡添加两个ip地址
ifconfig
eth0:1 192.168.1.1 netmask 255.255.255.0
ifconfig eth0:2 192.168.1.2 netmask
255.255.255.0
以上是对网卡eth0修改了两个IP地址的方法
方法一:
1.关闭网卡设备
ifconfig eth0 down
2.修改MAC地址
ifconfig eth0 hw ether MAC地址
3.重启网卡
ifconfig eth0 up
方法二:
以上方法一修改后linux重启后MAC又恢复为原来的,为了下次启动时修改后的MAC仍有效,我们可以修改文件file: /etc/rc.d/rc.sysinit(RedFlag Linux为这个文件,其他版本的linux应该不同)的内容,在该文件末尾加以下内容:
ifconfig eth0 down
ifconfig eth0 hw ether MAC地址
ifconfig eth0 up
方法三:
很简单的,只是在./etc/sysconfig/network-scripts/ifcfg-eth0中加入下面一句话:
MACADDR=00:AA:BB:CC:DD:EE
linux下修改MAC地址方法的更多相关文章
- 嵌入式 Linux下修改MAC地址
Linux下修改MAC地址 方法一: 1.关闭网卡设备ifconfig eth0 down2.修改MAC地址ifconfig eth0 hw ether MAC地址3.重启网卡ifconfig eth ...
- Linux/CentOS下修改MAC地址
Linux/CentOS下修改MAC地址 摘自:https://blog.csdn.net/qq_33233768/article/details/64906265 2017年03月22日 11:06 ...
- Linux修改MAC地址方法
Linux修改MAC地址方法 - Linux modifies MAC address method ifconfig wlan0 down ifconfig wlan0 hw ether MAC地址 ...
- linux下修改IP地址的方法
linux下修改IP地址的方法 1.网卡的命名规则 在centos7中,en表示着:ethernet以太网,即现在所用的局域网,enX(X常见有以下3种类型) 2.IP地址的临时修改(重启后失效) 查 ...
- cent os 7.3修改mac地址方法
一.修改MAC地址方法 linux环境下: 需要用 #ifconfig eth0 down 先把网卡禁用 再用ifconfig eth0 hw ether 1234567890ab ...
- Linux下修改PATH的方法
Linux下修改PATH的方法 1.直接在命令行里敲 PATH=$PATH:/path1:/path2:/pathN用户登出之后PATH恢复原样. 只是临时起作用. 2.修改~目录下bash_prof ...
- Linux 修改mac 地址方法记录
Linux 修改MAC 记录: sudo ifconfig eth0 hw ether 70B3D5106F90
- linux下修改ip地址,默认网关以及DNS
*修改IP地址 即时生效: ifconfig eth0 192.168.1.100 netmask 255.255.255.0 重启生效: vim /etc/sysconfig/network-s ...
- radhat 6.7修改mac地址方法
vi ifcfg-eth0 #HW……,即注释掉原硬件地址. 再自己照着原地址写:MACADDR="新mac地址" 重启
随机推荐
- mysql 报错:java.lang.OutOfMemoryError: Java heap space
原因:mysql会将查询到的记录全部发送到java端保存,而JVM中如果98%的时间是用于GC,且可用的Heap size 不足2%的时候将抛出此异常信息.JVM堆的设置是指java程序运行过程中JV ...
- oracle 学习之DG的搭建
1.配置过程 确认为归档模式 SQL> select log_mode from v$database; LOG_MODE ------------ ARCHIVELOG 配置归档日志存放路径( ...
- C# WebBrowser禁止F5刷新
在用写一个桌面软件的过程中,用到webbrowser实现界面.这时有一个禁止webbrowser通过f5按键进行刷新的要求.本着边做边学的原则,本菜查了一下百度,原来这么简单,代码如下: this.w ...
- module parameters
Parameter values can be assigned at load time by insmod or modprobe(this can read parameter from con ...
- R绘图学习笔记(二)-
依照计量对比药物A和药物B的响应情况 #计量向量 dose <- c(20,30,40,45,60) #药物A的反应向量数据 drugA <- c(16,20,27,40,60) #药物B ...
- ios打开系统自带APP
打开系统自带app 打开系统设置: [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs:root= ...
- Sublime Text 2
常用功能: 安装Package Control:https://sublime.wbond.net/ 多行选择.多行编辑鼠标选中多行,按下 Ctrl+Shift+L (Command+Shift+L) ...
- iOS开发The Operation couldn't be completed.(LaunchServicesError error 0.)的解决方法
显示错误:The Operation couldn't be completed.(LaunchServicesError error 0.)解决办法:第1种方法.点击当前的模拟器,点击IOS Sim ...
- 苹果4S
港版.4S.白.非翻新机.16G.联通3G移动2G电信2G 1000 美版.4S.白.翻新.16G.联通3G移动2G电信3G 980
- DX shader根据顶点设置颜色
matrix ViewProjMatrix; vector Blue = {0.0f, 0.0f, 1.0f, 0.0f}; struct VS_INPUT { vector position : P ...