欢迎来到山村网

linux查看ip地址、显示太网卡配置、网络设备

2019-03-09 13:24:44浏览:929 来源:山村网   
核心摘要:  ifconfig eth0 显示一个以太网卡的配置  ifup eth0 启用一个 'eth0' 网络设备  ifdown eth0 禁用一个 'eth0' 网络设备 

  ifconfig eth0 显示一个以太网卡的配置

  ifup eth0 启用一个 'eth0' 网络设备

  ifdown eth0 禁用一个 'eth0' 网络设备

  ifconfig eth0 192.168.1.1 netmask 255.255.255.0 控制IP地址

  ifconfig eth0 promisc 设置 'eth0' 成混杂模式以嗅探数据包 (sniffing)

  dhclient eth0 以dhcp模式启用 'eth0'

  route -n show routing table

  route add -net 0/0 gw IP_Gateway configura default gateway

  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'

  route del 0/0 gw IP_gateway remove static route

  echo "1" > /proc/sys/net/ipv4/ip_forward activate ip routing

  hostname show hostname of system

  host www.example.com lookup hostname to resolve name to ip address and viceversa(1)

  nslookup www.example.com lookup hostname to resolve name to ip address and viceversa(2)

  ip link show show link status of all interfaces

  mii-tool eth0 show link status of 'eth0'

  ethtool eth0 show statistics of network card 'eth0'

  netstat -tup show all active network connections and their PID

  netstat -tupl show all network services listening on the system and their PID

  tcpdump tcp port 80 show all HTTP traffic

  iwlist scan show wireless networks

  iwconfig eth1 show configuration of a wireless network card

  hostname show hostname

  host www.example.com lookup hostname to resolve name to ip address and viceversa

  nslookup www.example.com lookup hostname to resolve name to ip address and viceversa

  whois www.example.com lookup on Whois database

  GO TOP INDEX ^

  Microsoft Windows networks (SAMBA)

  nbtscan ip_addr netbios name resolution

  nmblookup -A ip_addr netbios name resolution

  smbclient -L ip_addr/hostname show remote shares of a windows host

  smbget -Rr smb://ip_addr/share like wget can download files from a host windows via smb

  mount -t smbfs -o username=user,password=pass //WinClient/share /mnt/share mount a windows network share

(责任编辑:豆豆)
下一篇:

Linux系统中git 入门教程

上一篇:

Linux下可以利用mencoder将视频里的音频提取出来的方法

  • 信息二维码

    手机看新闻

  • 分享到
打赏
免责声明
• 
本文仅代表作者个人观点,本站未对其内容进行核实,请读者仅做参考,如若文中涉及有违公德、触犯法律的内容,一经发现,立即删除,作者需自行承担相应责任。涉及到版权或其他问题,请及时联系我们 xfptx@outlook.com