nmblookup -a ip位址
ifconfig eth0 |awk '/inet/ '
w3m -no-cookie -dump www.123cha.com|grep -o '[0-9]//.[0-9]//.[0-9]//.[0-9]/'w3m -no-cookie -dump ip.loveroot.com|grep -o '[0-9]//.[0-9]//.[0-9]//.[0-9]/'
lsof -i :80
ifconfig eth0 | head -1 | awk ''
#在網絡卡eth0上增加乙個1.2.3.4的ip:sudo ifconfig eth0:0 1.2.3.4 netmask 255.255.255.0
#刪除增加的ip:
sudo ifconfig eth0:0 down
echo 1 | sudo tee /proc/sys/net/ipv4/ip_forwardsudo iptables -t nat -i postrouting -j masquerade
netstat -rnsudo route -n
sudo route add -net 192.168.0.0 netmask 255.255.255.0 gw 172.16.0.1
sudo route del -net 192.168.0.0 netmask 255.255.255.0 gw 172.16.0.1
sudo ifconfig eth0 down #關閉網絡卡永久改位址方法sudo ifconfig eth0 hw ether 00:aa:bb:cc:dd:ee #然後改位址
sudo ifconfig eth0 up #然後啟動網絡卡
sudo gedit /etc/network/inte***ces在 iface eth0 inet static 後面新增一行:
pre-up ifconfig eth0 hw ether 01:01:01:01:01:01配置檔案應該像如下
iface eth0 inet static最後是 logout 或者rebootpre-up ifconfig eth0 hw ether 01:01:01:01:01:01
address 192.168.1.10
netmask 255.255.255.0
gateway 192.168.1.1
netstat -na|grep established|awk ''|awk -f: ''|sort|uniq -c|sort -r -nnetstat -na|grep syn|awk ''|awk -f: ''|sort|uniq -c|sort -r -n
tcpdump -tnn -c 20000 -i eth0 | awk -f "." '' | sort | uniq -c | sort -nr | awk ' $1 > 100 '
echo "blacklist ipv6" | sudo tee /etc/modprobe.d/blacklist-ipv6
sudo netstat -atnp
netstat -n | awk '/^tcp/ end '
nc -zv localhost 1-65535
#安裝 ethstatus 軟體sudo apt-get install ethstatus
#檢視 adsl 的速度
sudo ethstatus -i ppp0
#檢視 網絡卡 的速度
sudo ethstatus -i eth0
#或安裝 bwm-ng
sudo apt-get install bwm-ng
#檢視當前網路流量
· -r:在本機建立伺服器端目錄結構;
· -k: 轉換非相對鏈結為相對鏈結。
sudo apt-get install axelaxel -n 5
或者lftp -c "pget -n 5 「
w3m -dump_head或 curl --head
Ubuntu下網路設定 遠端訪問等方面的命令
檢視網路是否好使 ifconfig 自動獲取ip sudo dhclient eth0 每次開機都自動獲取ip sudo gedit etc network inte ces 在該檔案中用下面的行來替換有關eth0的行 the primary network inte ce use dhcp to ...
ubuntu下網路配置
ubuntu 系統配置檔案在 etc network inte ces 編輯配置檔案 sudo vi etc network inte ces 在為配置之前有 1 auto lo 2 iface lo inet loopback 將這兩行注釋掉 我這邊的路由器位址是192.168.1.1 因此配置為...
linux下網絡卡相關檢視設定
查整機硬體資訊命令 dmesg 檢視網絡卡裝置相關 dmesg grep eth 檢視網絡卡eth0資訊 dmesg grep eth0 使用ethtool命令檢視指定網絡卡資訊 ethtool eth0 使用 mii tool命令檢視指定網絡卡情況 mii tool v eth1 為了使用lspc...