Description:
system: ArchLinux
IP address: 192.168.21.170
Subnet Mask: 255.255.255.0
Gateway: 192.168.21.2
dns:8.8.8.8
8.8.4.4
actions:
1, set IP address, gateway
nano/etc/rc.conf #编辑配置文件
interface= E th0 #网卡名称
address= 192.168.21.170 #IP地址
netmask= 255.255.255.0 #子网掩码
broadcast= 192.168.21.255 #这个是广播地址, calculated by IP address and subnet mask
gateway= 192.168.21.2 #网关
The
hostname= "Myhost" #修改主机名称, you can default to modify
locale= zh_cn. UTF-8 "#默认语言LOCALE =" en_US. UTF-8 "modified to Chinese, you can default to do not modify
ctrl+o #保存
ctrl+x #退出
2, setting DNS
Nano /etc/resolv.conf #编辑配置文件
nameserver 8.8.8.8
nameserver 8.8.4.4
ctrl+o #保存
Ctrl+x #退出
/etc/rc.d/network restart #重启网络
now ArchLinux already have access to the Internet
#########################################################
Extended reading: changing system encoding
Nano/etc/locale.gen #编辑文件, canceling the comment before each line below
ZH_CN. GB18030 GB18030
zh_cn. GBK GBK
zh_cn. UTF-8 UTF-8
zh_cn.gb2312
ctrl+o #保存
ctrl+x #退出
Modify root password
The default installation root password is empty
passwd root #修改密码
Enter the new password two times, the modification succeeded.