ubuntu网络配置
                                                            生活随笔
收集整理的這篇文章主要介紹了
                                ubuntu网络配置
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.                        
                                本文介紹ubuntu中的網絡配置方法。
ubuntu需要在/etc/network/interfaces文件中設置網絡配置,基本的格式如下:
auto <網卡名> iface <網卡名> inet <模式> address <ip> netmask <掩碼> gateway <網關> dns-nameservers <dns1, dns2>網卡名可通過以下命令來獲取到系統全部的網卡名:
ifconfig -a模式一般使用dhcp或static。當設置為static靜態設置時,需要說明至少address和netmask兩個參數,示例:
通過dpchp
auto eth0iface eth0 inet dhcp靜態ip
auto eth0iface eth0 inet staticaddress 192.168.0.11netmask 255.255.255.0gateway 192.168.0.1dns-nameservers 192.168.0.1在桌面版本的ubuntu中,另外有network-manager服務來自動管理系統的網絡配置。同時,network-manager在檢測到/etc/network/interfaces文件經過了修改時,會取消自動管理。如果已經修改了/etc/network/interfaces,那么重啟network-manager服務:
service network-manager restart查看/etc/NetworkManager/NetworkManager.conf文件,managed此時設置為false。
[main]
 plugins=ifupdown,keyfile,ofono
 dns=dnsmasq
[ifupdown]
 managed=false
轉載于:https://www.cnblogs.com/fengyc/p/4196474.html
總結
以上是生活随笔為你收集整理的ubuntu网络配置的全部內容,希望文章能夠幫你解決所遇到的問題。
                            
                        - 上一篇: install_mysql57.sh
 - 下一篇: gradle项目打war和jar包