ArchLinux Installation and use tips

Source: Internet
Author: User
Tags locale set time

a preparatory work
1 file download and Startup disk production

File can be in https://mirrors.ustc.edu.cn/, this is a Zhong ke mirror network, choose the following:

When the download is complete, I make a startup disk, and I use the powerful DD command under Linux, which is:

#dd If=xxx.iso Of=/dev/sdb

where if represents the input file, of the output file,/dev/sdb represents your U-disk, specifically according to the personal system mount situation. The prepared U-disk does not need to be too good, because this way will make the U disk capacity hidden and unusable, so it is best to use a second point of the U disk. Of course, there are many ways to make the startup disk, the use of UltraISO this software is more convenient, the specific use of Baidu, there is no longer repeat.

2 starting the installation and partitioning operation

Now you can start to install the system, the installation of the system needs to do the appropriate partition and mount work, if you want to know the specific principle, you can refer to my other two blog: Linux mount and Linux under the hard disk partition.

The steps are as follows:

• Select first, install 64-bit, second 32-bit

• Use the command #fdisk-L to view the current system's hard disk, I am a virtual machine demo, so is only 8GB, you follow your own computer situation to operate, you can see my hard disk is SDA

• Now partition operation with the FDISK/DEV/SDA command, for beginners, Linux only need to be divided into a swap main partition and/primary partition, generally divided into twice times the swap partition memory, but now the computer memory is large, so generally the main deposit of 1/4 is almost, Other space to the/main partition, here for convenience, we give swap 1G (my actual computer 4G memory points is also 1G, is now a virtual machine, so it doesn't matter).

Note here that since the previous fdisk-l mentioned there are 16,777,216 sectors, a sector of 512B (such as), so 1g=1024*1024*1024/512=2097152 sectors, because the partition is starting from 2048, so the end point is 2097152+2048 = 2099200.

So the next area is all the space left, just press ENTER

Finally select the parameter w, save the partition operation.

• Now look at the partition of the kernel of the system, use the #cat/proc/partitions to see if the partitioning operation we just made has taken effect (my entry is in effect), if the sda1 and sda2 partitions are not found to be 1G and 7G, then the partition is not refreshed. #partprobe/DEV/SDA Refresh

• Format the two partitions, format the swap (/DEV/SDA1) partition with Mkswap as the swap format and activate with the Swapon command,/partition (/DEV/SDA2) directly formatted with the MKFS.EXT4 command in EXT4 format, as follows

• Mount the SDA2 partition under the Linux root directory, you can also mount to Home,boot, etc., then change the/mnt to/mnt/home,/mnt/boot/(create the directory first)

Now that the preparation is complete, the system installation

two installing the system

• At the end of the/etc/pacman.conf add the following paragraph, you can edit the file with VI,#vi/etc/pacman.conf


Press ESC to enter the normal mode of VI and then enter WQ by a colon and you can save the exit

• Remove the source annotation of China from the/etc/pacman.d/mirrorlist and ignore it if there is no comment


• Update source


• installing the base system

#pacstrap/mnt Base Base-devel

Then wait patiently ...

• Generate Fstab

#genfstab-u-p/mnt >>/mnt/etc/fstab

• Go back to the home directory and you'll see that the prompt changes

#arch-chroot/mnt/bin/bash

• Set the locale (optional)

Add a row of Lang=en_us #vi/etc/locale.conf . UTF-8

#vi/etc/locale.gen the en_US. UTF-8 UTF-8,ZH_CN. GBK GBK,ZH_CN. UTF-8 UTF-8,ZH_CN GB2312 in front of the comments removed

#locale-gen Update your language environment

• Set time

#ln-S/use/share/zoneinfo/asia/shanghai/etc/localtime

#hwclock--SYSTOHC--UTC

• set host name and password

#vi/etc/hostname Add host name, I added test

#passwd Add the root user's password

• Install some net tools, Net-tools,dnsutils,inetutils,iproute2

#pacman-S Net-tools,dnsutils,inetutils,iproute2

• Install Grub

#pacman-S Grub os-prober

#grub-install--target=i386-pc--RECHECK/DEV/SDA

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

• unmount partitions

#exit

#umount/mnt

#reboot

Now that the system installation is complete, reboot and enter root and password:

three basic configuration
1 installation of the graphical interface

Here is the most popular and most suitable for novice gnome desktop, landlord with I3WM

• Installing the Xorg framework

#pacman-S xorg-xclock xterm xorg-utils xorg-xinit xorg-server xorg-server-utils The last two components must be selected

• Install the video driver

#pacman-S Xf86-video-ati AMD Graphics

#pacman-S Xf86-video-nouveau N Card

#pacman-S Xf86-video-vesa virtual machine, universal graphics

• installing the GNOME desktop

#pacman-S Gnome Gnome-extra

• When installing all of the above components, now add the. xinitrc file (under the user directory)

EXEC gnome-session

• command #startx to access the GNOME desktop

• (optional) Install the Touchpad driver

#pacman-S Xf86-input-synaptics

• (optional) Install the starter

#pacman-S GDM

#systemctl enable GDM boot


ArchLinux Installation and use tips

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.