2011年12月12日 星期一

檢視網路設定

$nano ipconfig.sh                          --編輯檔案

ifconfig -a | grep -A1 eth0              --只檢視 eth0 的前段
ifconfig -a | grep -A1 eth1              --只檢視 eth1 的前段
netstat -rn                                      --檢視預設閘道
cat /etc/resolv.conf                        --檢視DNS

$chmod +x ipconfig.sh                  --修改權限為可執行檔
$./ipconfig.sh                                --執行檔案

沒有留言:

張貼留言