网络服务
ping
:检查网络联通性,-c
选项可以指定发生测试包的数量- 如:
ping www.baidu.com -c 5
- 如:
ifconfig
:查看或设置网卡信息,windows
下使用命令ipconfig
ifconfig
:查看网卡信息ifconfig 网卡名称 up|down
:开启|关闭指定网卡
ifup
:开启指定网卡ifdown
:关闭指定网卡- 配置网卡信息:
/etc/network/interfaces
# 静态 auto enp0s5 iface enp0s5 inet static address 10.8.162.8 netmask 255.255.255.0 gateway 10.8.162.1 # 动态 auto enp0s5 iface enp0s5 inet dhcp
需要重启电脑,个别发行版只需要重启网络服务就行
sudo service networking restart
版权声明:除非特别标注,否则均为本站原创文章,转载时请以链接形式注明文章出处。
还木有评论哦,快来抢沙发吧~