linux 以太网ethernet最常用设置命令

1、打开和关闭

ifconfig eth0 up

ifconfig eth0 down

2、配置ip、子网掩码、网关

ifconfig eth0 172.18.31.98 netmask 255.255.255.0
route del default eth0
route add default gw 172.18.1.1 dev eth0

3、临时修改mac

ifconfig eth0 down
ifconfig eth0 hw ether 00:0C:18:EF:FF:ED
ifconfig eth0 up 

[网络配置相关]——ifconfig命令、ip命令、route命令

https://www.cnblogs.com/snsdzjlz320/p/5616775.html

网络相关的一些基本的命令的使用(ping、ifconfig、route、netstat)---Linux学习笔记

https://blog.csdn.net/u013991521/article/details/49803353

猜你喜欢

转载自blog.csdn.net/lindonghai/article/details/90748894