Archlinux notebook install Notes

Linux Mint recently looked at the mess in the application package and configuration files scattered everywhere increasingly irritable, he wanted to experience under the famous Arch, online posts were put Arch Linux installation difficulty describing is very terrible, but in fact follow step Wiki by step does not need to spend too much effort. Now the installation process is recorded in the following (Arch Wiki has written a very detailed, see Arch Wiki (Simplified Chinese) ):

1. Prepare: USB U disk or CD-ROM installation

2. boot into the live environment

3. Connect network

I connected to a wireless WiFi network, a wired network connection is simple, see the document

  • Check the network interface

    ip link

Normal, then you should see your card and related information, remember the name of the network card device

  • Start networking equipment

    ip link set <设备名> up

    If the normal start, it shows what drive no problem

Let's use the wireless network connection iw, after Bahrain system can choose other management tools such as NetworkManager

  • Get Interface name

    iw dev

    Normally at this time should print out your card information of the device

  • View network status

    iw dev <设备名> link

    This time should show "Not connected.", Indicates that the network is not connected

  • Scan WiFi accessories

    iw dev wlan0 scan |less

  • If you want to connect to a network without a password would be a very easy way

    iw <设备名> connect <网络名称>

  • If you want to connect to WPA2 encrypted network, we use this tool wpa_supplicant

    wpa_supplicant -i <设备名称> -c <(wpa_passphrase <网络名称> <密码>)

  • Well, this time again to view network status

    iw dev <设备名> link

    If the connection is successful, you should see the network connection status

  • This time try to ping Baidu try

    ping www.baidu.com

    ping nowhere is normal, use dhcp get dynamic ip

    dhcpcd <设备名称>

    Try again

    ping www.baidu.com

    ping through the telephone network to connect the finished

4. Update the system time

timedatectl set-ntp true

5. Establish a hard disk partition

  • View Disk

    fdisk -l

    Find your hard disk to install the system, mine is / dev / sda

  • Good design partitioning, partition my way

    Partition Mount points Partition size Partition type
    /dev/sda1 /mnt/boot 512MB EFI System Partition
    /dev/sda2 [SWAP] 8GB Linux swap (swap space)
    / Dev / sda3 / mnt remaining space Linux x86-64 root directory (/)
  • Start partition, you can choose to use fdisk or parted to partition, I chose fdisk

    fdisk /dev/sda

    After entering the tool, myou can view the help option

    pListed in the partition table, if it is to be newly installed system, ddelete the current partition

    n New Partition

    Partition number, default Enter

    First sector, the default Enter

    ​ Last sector,+512M

    Such a partition on the first built, two behind empathy

    t Modify EFI System Partition type

    Select partition No. 1, No. 1 is modified to Type efi

    Finally, plist the partition table, everything to do so!

    Do not worry quit! wSave changes

6. Format the partition

mkfs.fat -F32 /dev/sda1

mkfs.ext4 /dev/sda3

Swap partition

mkswap /dev/sda2

swapon /dev/sda2

7. Mount the partition

mount /dev/sda3 /mnt

mkdir /mnt/boot

mount /dev/sda1 /mnt/boot

Well, preparatory work done you, the next step is the formal installation of the system

8. Modify mirror source

vim /etc/pacman.d/mirrorlist(Of course, it can also be used with vim accustomed nano)

The labeled [China] were all moved to the front

Save and exit

9. The mounting base system

pacstrap /mnt base

I also installed a base-devel group, so my command is

pacstrap /mnt base base-devel

At this point, the system even if the installation was successful it!

Then do some basic configuration

1. generates automatically mount the partition file fstab

genfstab -L /mnt >> /mnt/etc/fstab

Then check mount case

cat /mnt/etc/fstab

2. Change root to the newly installed system:

arch-chroot /mnt

3. Set the time zone to GMT:

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

Hwclock to generate run / etc / adjtime:

hwclock --systohc

4. Configuration Language

nano /etc/locale.gen(The new system is not even vim)

The following two lines removed before the Notes

en_US.UTF-8 UTF-8
zh_CN.UTF-8 UTF-8

Run locale-gen generates locale information

locale-gen

Create and edit /etc/locale.conf

`nano /etc/locale.conf`

Add toLANG=en_US.UTF-8

5. Network connection

Time again to connect to the network, and this time actually encountered a magic question: arch systems without iw tool, it can not connect to the network, but can not connect to the network and can not install iw, I chose to use the phone USB shared network, then and cable connection is the same, as to how we deal with, we Eight Immortals recount, in short, to the network even on OK.

6. Set the root password

passwd

7. Install the boot program, I chose GRUB (UEFI mode)

pacman -S grub efibootmgr

grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=grub

Generate a configuration file

grub-mkconfig -o /boot/grub/grub.cfg

8. Enter exitor click Ctrl+Dto exit the chroot environment

9. rebootRestart pull U disk, you're done!

PS:

1. Create a regular user

useradd -m -g users -s /bin/bash <用户名>(Bash to the default terminal, can be changed later)

set password

passwd <用户名>

Add sudo permissions

nano /etc/sudoers

Add "root ALL = (ALL) ALL" under<用户名> ALL=(ALL) ALL

2. automatically mount U disk:

sudo pacman -S usb_modeswitch udisks2 udevil

systemctl enable devmon@<username>.service

systemctl start devmon@<username>.service

Guess you like

Origin www.cnblogs.com/wjhmrc/p/11388076.html