fedora 6 (linux)網路相關配置

來源:互聯網
上載者:User

su - ,以管理員的身份登入。 

1.設定IP地址


查看你使用的IP網卡
ifconfig -a
找到你要使用的網卡
vi /etc/sysconfig/network-scripts/ifcfg-eth0

# Intel Corporation 82801BA/BAM/CA/CAM Ethernet Controller
DEVICE=eth0
BOOTPROTO=static
#BROADCAST=59.188.15.255
HWADDR=00:02:A5:F5:80:23
IPADDR=59.188.15.117
NETMASK=255.255.255.240
#NETWORK=59.188.15.0
ONBOOT=yes

2.設定網關地址
vi /etc/sysconfig/network

NETWORKING=yes
HOSTNAME=localhost.localdomain
GATEWAY=192.168.32.1

3.設定DNS 地址
vi /etc/resolv.conf

nameserver&<60; 172.19.30.63
nameserver&<60; 172.19.30.64
search localdomain

OK設定完了

/etc/init.d/network restart

補充:su 與 su - 的對比

su user保留原來exported的環境變數,而su - user就像以使用者user登陸進來一樣,重新初始化環境變數。
舉個例子:
# su mishuang
# cd
# pwd
/export/home/root
# su - mishuang
# cd
# pwd
/export/home/mishuang

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.