ArchLinux set IP address, gateway, DNS method

Source: Internet
Author: User
Tags locale nameserver

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.

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.