修改arm下的mac位址和ip位址

2021-07-30 16:33:54 字數 417 閱讀 4649

修改方式很簡單,是在arm啟動的時候,新增指令碼進去,之後就可以了。這是我的同事教我的,thanks!

建立乙個檔案:/etc/init.d/ chmac.sh

#!/bin/bash

ifconfig eth0 down

ifconfig eth0  hw ether ******

ifconfig eth0 up 

#以上是修改mac位址

ifconfig eth0  ******//ip位址

之後,建立軟連線:ln -s /etc/init.d/chmac.sh /etc/rc5.d/s99chmac.sh

兩個檔案,增加執行許可權,就可以了。

ps:如果有兩個eth,這樣的話,修改的eth是相反的,修改的是eth0,結果卻是修改的是eth1的,有點鬱悶,不知道為什麼。

如何修改公網ip和mac位址

現在很多玩電腦的,估計很多不清楚公網ip和mac位址這兩個吧。現在就大家掃掃盲,說一下 如何修改公網ip和mac位址?一。公網位址 所謂公網位址,是相對內網位址而言。內網位址主要有以下3種192.168.x.x,10.x.x.x,172.16.x.x格局。以家庭無線路由舉例,經過ipconfig看到...

LINUX下獲取IP位址和MAC位址

include include include include include include include include ifdef solaris include endif define maxinte ces 16 main argc,argv register int argc reg...

LINUX下獲取IP位址和MAC位址

判斷網絡卡狀態 if buf int ce ifr flags iff up else 獲取當前網絡卡的ip位址 if ioctl fd,siocgifaddr,char buf int ce else this section can t get hardware address,i don t ...