Installation of Arch Linux (refer to official documentation, desktop installation is not done well later)

Source: Internet
Author: User
Tags arch linux

Start the installation system first (I'm using a VMware virtual machine)

1. Setting the keyboard layout

#loadkeys "Us"  #设置为美国的键盘布局, you can usually
2. Create a partition of the hard disk

I am using FDISK to partition the disk, the main partition only three,/,/boot,swap partition, just swap partition and the other two is different, is to press T to modify its format to swap format.

Fdisk usage starts Fdisk as root (Disk-device like/DEV/SDA): # fdisk Disk-device if it's a brand new disk or you want to repartition, use the O command to create a new empty DOS partition table. Use the n command to create a new partition (primary partition/First partition). Use the +XG format to specify a partition size of x GB. For example, if you need to create a section of the GiB, you need to enter +15g. Use the T command to modify the partition's ID from the default value to Linux (Type 83). This is an optional step. This is also possible if the user wants to create other types of partitions, such as SWAP,NTFS,LVM. Note that a complete list of available partition types can be obtained through the L command. Other partitions are handled in a similar manner. Use the W command to write the partition table to disk and exit. Formats the new partition as a file system.
3. Document Creation
Use the command to create a EXT4 file system: Warning: After a new file system is created, the data previously stored in that partition is lost and is usually not retrieved. Make a backup of the data you want to keep. # mkfs.ext4/dev/partition In addition, you can use MKFS. This is the uniform entrance to the Mkfs.fstype tool. # mkfs-t Ext4/dev/partition
4. Mount Partitions

To check the identifier and layout of the current disk: # LSBLK/DEV/SDA first mount the root partition to/mnt.# mount/dev/sda1/mnt# ls/mnt The format should be one lost+found then mount the/home partition and the remaining separate partitions (/boot ,/Var, etc.). Then create the home directory in/mnt and mount the partition: # Mkswap/dev/sdax && Swapon/dev/sdax # #分区格式化为swap, and create the Swap partition # mount/dev/sdax/mnt # #挂 Load/partition on/MNT
5. Select Mirror

Using the Nano command to edit the /etc/pacman.d/mirrorlist, select the image you want to select, I am here to use the default, can be used in the domestic source relatively fast.

6. Start the installation system

Install the base software group using Pacstrap. # PACSTRAP/MNT Base
You can also use
# pacstrap/mnt Base Base-devel #安装了基础的开发包
7. Configuring the System

Generate the Fstab file with the following command (set UUID or label with-u or-l option): # genfstab-p/mnt >>/mnt/etc/fstab
#cat/mnt/etc/fstab #查看系统的fstab
Switch the system to the latest system
# arch-chroot/mnt
Set host name

# echo computer_name >/etc/hostname

Setting the time zone

# Ln-sf/usr/share/zoneinfo/zone/subzone/etc/localtime
Example (set to Shanghai, you can also set to other):

# ln-s/usr/share/zoneinfo/asia/shanghai/etc/localtime
Configuring the language of the system

Edit/etc/locale.gen, all the contents of this file are commented, and the corresponding comments are canceled according to the language you need.

# Nano/etc/locale.gen   
If you enable Chinese, you can configure the following
en_US. UTF-8 UTF-8EN_GB. UTF-8 UTF-8ZH_CN. GB18030 GB18030ZH_CN. GBK GBKZH_CN. UTF-8 UTF-8ZH_CN GB2312
If only open English, as long as the en_US. UTF-8 UTF-8 can
And then execute
# Locale-gen       #生成正确的locale信息
Set the system locale preference in/etc/locale.conf; single user set $home/.config/locale.conf:
# echo Lang=your_locale >/etc/locale.conf
Example:

Configure the Network

Systemctl Enable Dhcpcd.service
Set Password

passwd

Input

#  Exit   #退出chroot
To cancel a partition mount cancel mount

# Umount-r/mnt

Rebooting the system

# reboot

8. Installing the Boot program

The BIOS system consists of three options-Syslinux, GRUB, and LILO. Choose a guide according to your preferences
I chose Grub.

# pacman-s grub-bios# grub-install--target=i386-pc--recheck/dev/sda# grub-mkconfig-o/boot/grub/grub.cfg
9. Install the desktop environment
Pacman-s LXDE


























Installation of Arch Linux (refer to official documentation, desktop installation is not done well later)

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.