网络服务
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
关注公众号,免费刷快排。
转载请说明出处
奇点seo » Linux 的网络服务
奇点seo » Linux 的网络服务