1. 程式人生 > >linux 配置靜態ip

linux 配置靜態ip

script 啟用 boot etc linux number bootproto 名稱 pan

1.vim /etc/sysconfig/network-scripts/[網卡名]

2.加入配置

TYPE=Ethernet

DEVICE=enp0s3 #綁定的網卡名稱

ONBOOT=yes #開機啟用(重要)

BOOTPROTO=static #使用靜態IP

IPADDR=192.168.1.203 #IP地址

NETMASK=255.255.255.0 #子網掩碼

GATEWAY=192.168.1.1 #網關

DNS1=192.168.1.1 #DNS

NAME=enp0s3

linux 配置靜態ip