linux 7 网络相关

查看网卡情况:

ifconfig

ip addr

查看网卡流量:

# ip -s link show

查看本地路由:

route -n

ip route

查看目标路径:

traceroute

tracepath

查看本地端口:

netstat  -anpt

ss  -tln

使用linux 6版本格式的网卡命名模式:

1、编辑/etc/sysconfig/grub

2、在GRUB_CMDLINE_LINUX中rd.lvm.lv前面增加net.ifnames=0 biosdevname=

3、执行grub2-mkconfig -o /boot/grub2/grub.cfg

4、重启操作系统

猜你喜欢

转载自blog.csdn.net/David_ifx/article/details/114379205