Archlinux网络配置


两种方法配置网络

1,启动网卡

ifconfig eth0 up


2,获取ip

dhcpcd  eth0


3,查看网卡

ifconfig




1.查看下可用的网卡

ifconfig -a


2.配置/etc/rc.conf

interface=eth0

eth0="dhcp"

lo="lo 127.0.0.1"

eth0="eth0 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255"

#eth0 IP netmask 子网掩码 broadcast 广播

(根据自己的情况来定)

INTERFACES=(eth0)

gateway="default gw 192.168.0.1"

#gateway 网关

ROUTES=(gateway)


3.配置/etc/reslov.conf

nameserver 61.128.128.68
nameserver 61.128.192.68

(根据自己的情况来定)


4.重启网络

/etc/rc.d/network restart



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值