linux 環境下修改ip位址(設定靜態IP)

2021-06-19 00:24:25 字數 363 閱讀 2221

vi  /etc/sysconfig/network-scripts/ifcfg-eth0

device=eth0:1

bootproto=static (dhcp動態獲取,static靜態的)

onboot=yes

ipaddr=192.168.0.254

netmask=255.255.255.0 

gateway=192.168.1.1

#service network restart       //重啟

#ifconfig eth0      //檢視網絡卡為eth0的資訊

一般vi進入之後,其他的你不用修改,只要改一下ip位址和閘道器 子網掩碼。其他的都不要修在做修改

linux下修改ip位址

os fc2 nic eth0 host name fc2 ip 192.168.0.20 24 default gateway 192.168.0.254 直接執行 setup 然後會彈出選項視窗,設定一下就可以了 或者修改配置檔案 etc sysconfig network scripts 下有...

linux下修改IP位址

linux修改ip和dns 以red hat enterprise linux 5.2為例 1 最常用的給網絡卡配置ip的命令為 ifconfig eth0 192.168.0.1 netmask 255.255.255.0 up 說明 eth0是第乙個網絡卡,其他依次為eth1,eth 192.1...

linux下修改ip位址

linux修改ip和dns 以red hat enterprise linux 5.2為例 1 最常用的給網絡卡配置ip的命令為 ifconfig eth0 192.168.0.1 netmask 255.255.255.0 up 說明 eth0是第乙個網絡卡,其他依次為eth1,eth 192.1...