ArchLinux Installation Note--zz

Source: Internet
Author: User

Why Install ArchLinux

For a deeper understanding of Linux (in fact, just idle egg

Preparing the installation media

USB stick preferred, not one. My own book is MBR, UEFI god horse I do not know it hum!

Make USB drive Boot:

On Linux:

DD If=archlinux-2015.11.01-dual.iso Of=/dev/sdb

USB drive specific device to use the lsblk command to view.
On Windows: This software is recommended to use Rufus.

Start installation

Use the prepared USB stick to start the computer into the installation environment, 32-bit or 64-bit self-choice.

Connect to a network

Since the ArchLinux installation process all need to download a variety of packages from the network, so no network, then go to sleep it ~

Wired is relatively simple, with ip addr a look at the NIC interface model, for example enp2s0 , and then directly enable the network card DHCP function.

Systemctl enable [email protected]ping google.com

Wireless network, use the wifi-menu view existing wireless list, and then select Enter password. In fact, it is very simple ...

Partition

I am the whole hard disk to install a system, with more than one hard disk to lsblk see the specific, I because there is only one hard drive so I can see /dev/sda .
Partitioning tool is more, recommended parted or cfdisk , the latter has a similar graphical interface is convenient. I used the parted table to ask me why, forcing lattice high =. =

PARTED/DEV/SDA (parted) Mklabel Msdos (parted) Mkpart primary EXT4 1M 500M (parted) set 1 booton (parted) Mkpart PR Imary Ext4 500M 50G (parted) Mkpart primary Linux-swap 50G 54G (parted) Mkpart primary EXT4 54G 100%

Explain the parted basic usage of the first word.

(parted) Mkpart Part-type fs-type start end

After entering the parted interactive interface with the mkpart creation, followed by 4 parameters, such as partition type, file system type, starting point, end point, partition type is primary partition or logical partition, starting end point using MB, GB convenient calculation you understand.

Partitioning the partition parted /dev/sda table is the partition structure using the device MS-DOS MBR . A total of 4 districts, personal habits ~

mount point Size description------------------------------------------------------------------/boot 1-500m is used to mount the/boot partition, set to bootable. /500m-50g used to mount/partition swap 50g-54g for swap partition (swap)/home 54g-100% remaining space to mount the/home partition

Formatting after you have finished the section

Mkfs.ext4/dev/sda1mkfs.ext4/dev/sda2mkfs.ext4/dev/sda4mkswap/dev/sda3

Mount Partition

Mount/dev/sda2/mntmkdir/mnt/{boot,home}mount/dev/sda1/mnt/bootmount/dev/sda4/mnt/homeswapon/dev/sda3

Installing the base system

Using pacstrap commands

PACSTRAP/MNT Base Base-devel

Generated fstab
Genfstab-p/mnt >/mnt/etc/fstab

The next step is to switch to the basic system.

Arch-chroot/mnt/bin/bash

Setting the hardware clock
Hwclock--SYSTOHC--UTC
Setting the System global language

December 8, 2015 fix here

echo lang="en_US. UTF-8 ">/etc/locale.conf

Create RAMDisk
Mkinitcpio-p Linux
Set the root user password
passwd Root
Installing bootloader

Grub is generally used.

Pacman-s Grubgrub-install/dev/sdagrub-mkconfig-o/boot/grub/grub.cfg

Set host name

Give yourself a loud name ~

echo ArchLinux >/etc/hostname

Don't forget to add your own set of hostname to the hosts file.

Nano/etc/hosts #<ip-address> 127.0.0.1 localhost.localdomain localhost archlinux::1 localhost.localdomain localhost archlinux

Network configuration

Basically the same as when you started the installation. Wire:

Systemctl enable [email protected]

Wireless note, you need to install a few packages or can not be used.

Pacman-s Wpa_supplicant Dialog

By the end of the installation, you can exit the Setup program and reboot the system.

Exit Exit

After installation, uninstall the partition and reboot.
Umount-r/mntreboot
Add user

Although you can also directly use the root user, but after all unsafe, it seems that some software can not directly use root?

Useradd-m-G users-g wheel -s/bin/bash ikkepasswd ikke

Installing sudo

To use the sudo command, you need to install sudo and configure it accordingly.

Pacman-s sudo

Open /etc/sudoers The file, find it and add it to the root ALL=(ALL) ALL gourd drawing scoop ikke ALL=(ALL) ALL .

ArchLinux Installation Note--zz

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.