首页 > 系统服务 > 详细

Archlinux设置静态ip

时间:2019-09-25 23:47:02      阅读:831      评论:0      收藏:0      [点我收藏+]

1. 查看网卡名称

$ ifconfig

2. 复制配置文件例子。

# cp /etc/netctl/examples/ xxxxx  ../xxxxx

3. 编辑配置文件

# vim /etc/netctl/xxxxxx

##################################################
Description=‘A basic static ethernet connection‘  //描述文件
Interface=xxxxxxxx   //改上自己的网卡名称
Connection=ethernet
IP=static
Address=(‘192.168.1.20/24‘)    //填写自己的ip地址
#Routes=(‘192.168.0.0/24 via 192.168.1.2‘)
Gateway=‘192.168.1.1‘
DNS=(‘192.168.1.1‘)

## 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‘

4. 启动配置文件

# netctl enable xxxxxx

5. 重启即可。

 

Archlinux设置静态ip

原文:https://www.cnblogs.com/mc-r/p/11588182.html

踩
(0)
赞
(0)
   
举报
评论 一句话评论(0)
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!