arch linux安装netctl配置
安装netctl
pacman -S netctl
配置静态IP
用netctl,在/etc/netctl目录里,example里面是样例,有各种,有线无dhcp,有线自动dhcp,无线,你看名字就知道了,拷贝到上级目录,vim改一改
[root@liujunjun ~]# cat /etc/netctl/ethernet-static Description='A basic static ethernet connection' Interface=ens33 Connection=ethernet IP=static Address=('192.168.0.210/24' '192.168.0.211/24') #Routes=('192.168.0.0/24 via 192.168.1.2') Gateway='192.168.0.1' DNS=('8.8.8.8') ## For IPv6 autoconfiguration #IP6=stateless ## For IPv6 static address configuration #IP6=static #Address6=('1234:5678:9abc:def::1/64' '1234:3456::123/96') #Routes6=('abcd::1234') #Gateway6='1234:0:123::abcd'
netctl start ethernet-static 不能启动就ip link set 接口 down,再启动
如果还是不行就,systemctl stop dhcp,netctl enable ethernet-static,再重启root。