---- ArchLinux learning Linux installation

archLinux mounting step

Verify that the startup mode

# ls /sys/firmware/efi/efivars
If the directory does not exist or system BIOS is based on CSM mode is activated

Connect Network

  1. # ip link Check your network connection
  2. # wifi-menu Wifi connection
  3. # pppoe-setup
  4. # systemctl start adsl
  5. # ping archlinux.org Check your network connection

Update the system time

# timedatectl set-ntp true

Create partitions

  1. # fdisk -l View hard disk partition
  2. # fdisk /dev/sdaHard disk partition, n --- add a partition, w --- save and exit, q --- exit
    partition FIG Example:

Format the partition

# mkfs.ext4 /dev/sdX1
If you created a swap partition (eg / dev / sda3), use mkswap to initialize it:

 # mkswap /dev/sdX2
 # swapon /dev/sdX2

For details, see https://wiki.archlinux.org/index.php/File_systems_ (Simplified Chinese) # Create a file system

Select the image

# nano /etc/pacman.d/mirrorlist
China to find the source and the source is moved to the front, specifically how to operate, see http://www.vpser.net/manage/nano.html

Install the necessary software packages

The latest version of the base package removed vi vim nano dhcpcd, while the official gives the column shows not given in these packages.
# pacstrap /mnt base linux linux-firmware vi vim nano dhcpcd

System Configuration

# genfstab -U /mnt >> /mnt/etc/fstabGenerating fstab file (-U or -L options provided by UUID or label)
# arch-chroot /mntinto the system

Set the time zone

# ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
#hwclock --systohc --utc

Localization

# nano /etc/locale.gen
Remove the following comment:
en_US.UTF-8 UTF-8
zh_CN.UTF-8 UTF-8
# locale-gengenerates locale message
# echo LANG=en_US.UTF-8 > /etc/locale.confcreation locale.conf

The internet

# nano /etc/hostnameCreate a hostname file:
add information corresponding to the hosts:

127.0.0.1   localhost
::1     localhost
127.0.1.1   myhostname.localdomain  myhostname

PS: If your system has a permanent IP address, please use this permanent IP address instead of 127.0.1.1

Root Password

# passwd

Installation boot loader (GRUB)

  1. # pacman -S grub efibootmgrInstall grub and efibootmgr
  2. # grub-install --target=i386-pc /edv/sdaWrite a guide
  3. # grub-mkconfig -o /boot/grub/grub.cfg
  4. # pacman -S linux
  5. # pacman -S intel-ucodeReinstall the kernel and kernel microcode
  6. # grunb-mkconfig -o /boot/grub/grub.cfg Rewriting a guide

More than to see their fifth processors, AMD processors are if you need to changeamd-ucode

Add user

# useradd -m -g users -s /bin/bash 用户名
# passwd 用户名
# nano /etc/sudoers
In the root ALL = (ALL) ALL Add the following
username ALL = (ALL) ALL
add sudo permissions for the user you just created

Network Configuration

# systemctl enable dhcpcdWired connection
# pacman -S iw wpa_supplicant dialogwireless connection

Or more to complete a basic installation archLinux of
reference:
https://blog.csdn.net/r8l8q8/article/details/76516523
https://wiki.archlinux.org/index.php/Installation_guide_ (Simplified Chinese)

Guess you like

Origin www.cnblogs.com/bananafish/p/11826665.html