请选择 进入手机版 | 继续访问电脑版

[Linux] linux常用操作命令之网络 - (以太网和WIFI无线)

[复制链接]
查看2608 | 回复1 | 2019-7-21 21:45 | 显示全部楼层 |阅读模式
linux常用操作命令之网络 - (以太网和WIFI无线)
  1. ifconfig eth0 显示一个以太网卡的配置
  2. ifup eth0 启用一个 'eth0' 网络设备
  3. ifdown eth0 禁用一个 'eth0' 网络设备
  4. ifconfig eth0 192.168.1.1 netmask 255.255.255.0 控制IP地址
  5. ifconfig eth0 promisc 设置 'eth0' 成混杂模式以嗅探数据包 (sniffing)
  6. dhclient eth0 以dhcp模式启用 'eth0'
  7. route -n show routing table
  8. route add -net 0/0 gw IP_Gateway configura default gateway
  9. route add -net 192.168.0.0 netmask 255.255.0.0 gw 192.168.1.1 configure static route to reach network '192.168.0.0/16'
  10. route del 0/0 gw IP_gateway remove static route
  11. echo "1" > /proc/sys/net/ipv4/ip_forward activate ip routing
  12. hostname show hostname of system
  13. host www.example.com lookup hostname to resolve name to ip address and viceversa
  14. nslookup www.example.com lookup hostname to resolve name to ip address and viceversa
  15. ip link show show link status of all interfaces
  16. mii-tool eth0 show link status of 'eth0'
  17. ethtool eth0 show statistics of network card 'eth0'
  18. netstat -tup show all active network connections and their PID
  19. netstat -tupl show all network services listening on the system and their PID
  20. tcpdump tcp port 80 show all HTTP traffic
  21. iwlist scan show wireless networks
  22. iwconfig eth1 show configuration of a wireless network card
  23. hostname show hostname
  24. host www.example.com lookup hostname to resolve name to ip address and viceversa
  25. nslookup www.example.com lookup hostname to resolve name to ip address and viceversa
  26. whois www.example.com lookup on Whois database
复制代码


老虎 | 2019-8-19 22:14 | 显示全部楼层
学习了,感谢自丢教程网
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

UID
1
贡献
387
丢币
38902
主题
4607
回帖
116
注册时间
2018-9-25
最后登录
2024-4-16