if config 配置網卡
ifconfig :顯示所有網卡信息
ifconfig eth0 : 查看網卡eth0的信息
ifconfig eth0 down :禁用eth0
if config eth0 up : 激活eth0
if config eth0 192.168.1.101 : 配置網卡eth0的IP地址
網絡設置:
sudo route add default gw 192.168.1.1 : 添加網關
/etc/network/interfaces restart : 重啟網絡服務
配置DNS:
sudo vi /etc/resolv.conf :
nameserver 202.96.134.133
nameserver 202.96.128.68
nameserver 202.96.128.68
配置靜態IP:
sudo vi /etc/network/interfaces :
iface eth0 inet static # 配置eth0接口為靜態地址
address 192.168.1.10
gateway 192.168.1.254
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
抓包:
tcpdump -i wlan0
返回上一次的路徑 :
cd -