ArchLinux Installation Record

Source: Internet
Author: User
Tags locale

Main steps
    1. Download image and Burn
    2. Boot installation
    3. Networking
    4. Edit a mirror station file
    5. Partition
    6. Format the partition and mount it
    7. Install the base operating system
    8. Configuring the underlying operating system
    9. Boot system
    10. User Management
    11. Network configuration
    12. Installing the GONME Desktop environment
    13. Other optimizations
Start preparing
  1. Download image and Burn

    Mirror recommended Address: https://mirrors.tuna.tsinghua.edu.cn/, you can choose the original English can also choose the Chinese version is archlinuxcn; I chose ARCHLINUXCN. After the download is complete, insert the USB flash drive you want to burn and choose to burn with Utraliso.


    Note the write mode with raw, click OK, wait for the burn to finish.

  2. Boot installation

    Boot into USB drive (UEFI boot)

    The system starts, and the default is automatically logged in as the root user.

  3. Networking

    In the case of desktops, the network is usually connected by default, unless you need Pope or WiFi, see the official documentation for ArchLinux. I'm a desktop, so I went on.

  4. Edit a mirror station file
    Because there are too many foreign URLs in the image station file, the network speed is slow, so at the beginning of the mirror station file add the domestic mirror station.

    nano /etc/pacman.d/mirrorlist

    Copy as much of the server line below #china as possible to the blank line on line sixth. Perform ctrl+x exit, prompt for save, enter Y, and return to save

  5. Partition
    Check partition table

    fdisk -l

    Results

    Zoning Plan:

    根分区,/dev/sda1,作为基本启动盘;交换分区, /dev/sda2,作为基本分区,是内存的两倍(2*RAM);逻辑分区, /dev/sda3,剩余空间

    View your computer's hard drive device

    lsblk

    fdisk /dev/sda

    Enter the Fdisk interaction interface:

    Input: G build GPT partition table:

    (2) Creating a partition
    Input: N Add a partition

    Enter:

    Tip Let the input start sector (a sector of 512B, according to the size of the partition you want to calculate)
    Input 2048, enter

    Let the input end sector, due to a sector of 512B, to create a 200M partition, you should enter: +200m;

    Create a second partition:
    Enter N;
    Enter
    Enter Start sector: Enter (default start sector is available)
    Input End Sector: +200m

    Create a third partition:
    Enter N;
    Enter
    Enter Start sector: Enter (default start sector is available)
    Input end sector: Direct carriage return (the default large number)

    Input: W save and exit;
    Execution: Lsblk as shown:

  6. Format the partition and mount it
    (1) Formatting
    Format ESP Partition

    mkfs.fat -F32 /dev/sda1

    Formatting the boot partition

    mkfs.ext4 /dev/sda2

    Formatting the root partition

    mkfs.ext4 /dev/sda3

    (2) Mounting

    mount /dev/sda3 /mntmkdir /mnt/bootmount /dev/sda2 /mnt/bootmkdir /mnt/boot/EFImount /dev/sda1 /mnt/boot/EFI

    View the LSBLK command again to see the mounted partition

  7. Install the base operating system

    Execute the following command to wait for the installation to complete.

    pacstrap -i /mnt base base-devel

    Enter directly until you are finished.

  8. Configuring the underlying operating system

    (1) Configuration Fstab

    genfstab -U /mnt >> /mnt/etc/fstab
    Configuration

    Execute again

    cat /mnt/etc/fastab

    (2) switch to the new system

    arch-chroot /mnt /bin/bash

    (3) Make local language settings
    Will en_US. UTF-8 UTF-8 and ZH_CN. UTF-8 UTF-8 before the # comment Delete, exit and save

    vi /etc/locale.gen

    locale-gen

    (4) Setting the time zone

    ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

    (5) Set hardware time

    hwclock --systohc --utc
  9. Boot system

    Grub for UEFI Boot

    # 安装引导工具pacman -S dosfstools grub efibootmgr# 安装grubgrub-install --target=x86_64-efi --efi-directory=/boot/EFI --recheck# 配置grubgrub-mkconfig -o /boot/grub/grub.cfg
  10. User Management
    (1) Set root password

    passwd

    (2) Add user

    useradd -m -g users -s /bin/bash 用户名# useradd -m -g users -s /bin/bash myNamepasswd 用户名# passed myNamenano /etc/sudoers

    Under Root all= (All), add the user name all= (all) All to add sudo permissions for the user you just created.
    (3) Exit Chroot and restart the computer

    exitreboot
  11. Network configuration

    (1) Wired connection

    # 可能需要root权限systemctl enable dhcpcd

    (2) Wireless connection

    pacman -S iw wpa_supplicant dialog

    (3) ADSL Broadband connection

    pacman -S rp-pppoe# pppoe-setup # systemctl start adsl
  12. Install Gonme desktop Environment

    (1) Install video driver

      Lspci | grep VGA  

    Depending on the type of video card listed, Then combine the ArchLinux graphics card to install a specific video card.
    (2) Installing the X Window System

      pacman-s xorg# installation font: Dejavu and micron Black font pacman-s ttf-dejavu Wqy-microhei  

    (3) Installing the GNOME desktop environment

      # Install GNOME desktop pacman-s gnome# install GNOME desktop optimizer pacman-s gnome-tweak-tool# Install GNOME Desktop Menu editor pacman-s alacarte# enable the Gnome window Manager service Systemctl enable gdm# enables the Network Manager service Systemctl enabling Networkmanagerreboot  
  13. Other optimizations
    (1) Add ArchLinux source

    nano /etc/pacman.conf

    Add at the end

    [archlinuxcn]SigLevel=NeverServer = https://mirrors.ustc.edu.cn/archlinuxcn/$arch

    (2) Install Chinese Input method
    Open and edit the. xprofile file

    vi ~/.xprofile

    Add the following to save the exit.

    export LC_ALL=zh_CN.UTF-8export XIM=fcitx  export XIM_PROGRAM=fcitxexport GTK_IM_MODULE=fcitxexport QT_IM_MODULE=fcitxexport XMODIFIERS="@im=fcitx"eval `dbus-launch --sh-syntax --exit-with-session`exec fcitx &

    Install Input Method

    pacman -S fcitx-im fcitx-configtoolpacman -S fcitx-sogoupinyin

ArchLinux Installation Record

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.