常用的Linux 網路命令

來源:互聯網
上載者:User

適用於Debian 系Linux 發行版本

ifconfig – 顯示網路資訊,包括IP地址、資料包接收/發送情況
iwconfig – 顯示無線網路資訊
sudo /etc/init.d/networking restart – 重啟網路
/etc/network/interfaces – 手動設定網路檔案
ifup interface – 啟用網路介面

ifdown interface – 禁用網路介面
iwlist scan- 顯示地區內無線網路情況
lshw -C network – 顯示網卡和網路裝置驅動資訊(需以管理員權限運行)

lspci -nn – Shows PCI vendor and device codes as both numbers and names of hardware connected to the pci bus
lsusb – Shows USB connected hardware
lshw -C usb – Additional info on USB related hardware (good for USB dongles)

route -n – 列舉核心 IP 路由表,可用網關來解決相關問題
sudo dhclient – 從DHCP 伺服器上擷取IP地址
sudo dhclient -r – 從指定的網路介面擷取IP 位址
/etc/udev/rules.d/70-persistent-net.rules – (File) 主管映射logical names (eth0, wlan0, etc) 到 MAC 位址
cat /etc/resolv.conf – 查看DNS 伺服器

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.