linux 配置mac地址

您所在的位置:网站首页 linux修改mac地址配置文件 linux 配置mac地址

linux 配置mac地址

2024-06-01 07:10| 来源: 网络整理| 查看: 265

root@a1000:~# ifconfig eth0 hw ether xx:xx:xx:xx:xx:xx SIOCSIFHWADDR: Device or resource busy - you may need to down the interface root@a1000:~# ifconfig eth0 down root@a1000:~# ifconfig eth0 hw ether xx:xx:xx:xx:xx:xx root@a1000:~# ifconfig eth0 up

不过重启又没了 可通过配置文件 /etc/sysconfig/network-scripts/… 进行配置并 service network restart 有的板子没有这些服务或配置文件,可以搞个脚本或命令放到/etc/profile,不过每次起来IP都会变,所以把ip也一起配置了,必须up之后才能配置ip:

root@a1000:~# ifconfig eth0 down root@a1000:~# ifconfig eth0 hw ether xx:xx:xx:xx:xx:xx root@a1000:~# ifconfig eth0 up root@a1000:~# ifconfig eth0 xx.xx.10.xx broadcast xx.xx.11.255 netmask 255.255.252.0 root@a1000:~# #!/bin/sh mkdir ~/.ssh/ cat > ~/.ssh/authorized_keys /etc/profile


【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3