Teach you how to install Vachlinux

Archlinux overview

Arch Linux is a Linux distribution dedicated to ease of use, lightweight system, and fast software updates.

Advantages Arch Wiki is very rich, it is a tool for solving problems when we encounter them

  • Arch adopts a rolling update method, so you don't have to worry about the need to reinstall the system after upgrading
  • Arch's pacman is a very simple and efficient package management tool
  • Arch's AUR repository contains a large number of packages, which can be built with just one makepkg command, which is very convenient

Download Archliunx iso

Archlinux iso link In this page, find the China region, download

Enter image description Enter image description Enter image description

VMware install archlinux

The steps are shown in the figure

Enter image description Enter image description Enter image description Enter image description Enter image description Enter image description Enter image description Enter image description Enter image description Enter image description Enter image description

partition

1. Divide the disk

lsblk or fdisk -l to view system hard disk parameters

Enter image description

parted (parted) mklabel msdos --- create MBR/msdos partition table (parted) mkpart primary ext4 1m 1g --- size is 1G (parted) set 1 boot on --- set boot as the boot directory (parted) mkpart primary ext4 1g 11g (parted) mkpart primary linux-swap 11g 12g (parted) print # ---- To check the partition situation, you must have a boot partition. In order to successfully install boot programs such as grub, the swap size can be twice as large as the memory , or you can use the fdisk partition

Enter image description

parted -l /dev/sda Enter image description

2. Formatting

mkfs.ext4 /dev/sda1 mkfs.ext4 /dev/sda2 mkswap /dev/sda3 \format swap swapon /dev/sda3 \enable swap

parted -l /dev/sda Enter image description

3. Mount

mount /dev/sda2 /mnt mkdir /mnt/boot mount /dev/sda1 /mnt/boot

Enter image description

Install the base system

Internet connection is required for this step

1. Edit the download address

root@archiso ~ #cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak --- backup nano /etc/pacman.d/mirrorlist \ storage system and software will be downloaded from the address here

Enter image description (最后两地址自己加的)

2. Install the base system

pacman -Syy 更新软件包 Enter image description

root@archiso ~ # pacstrap /mnt base base-devel # Install all basic systems by default Enter Enter next step genfstab -U -p /mnt >> /mnt/etc/fstab \Generate fatab partition table

Enter image description

3. Switch to the new system

root@archiso ~# arch-chroot /mnt /bin/bash

Enter image description

Start configuring the new system

1. Set the local language

root@archiso /] nano /etc/locale.gen
en_US.UTF-8 UTF-8
zh_CN.UTF-8 UTF-8
zh_TW.UTF-8 UTF-8

[root@archiso /] locale-gen  \\使配置文件生效

echo LANG=en_US.UTF-8 > /etc/locale.conf \\创建 locale.conf
先不要设置中文编码,等安装了图形界面再修改,否则会乱码)

2. Set the time zone

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

设置硬件时间
hwclock --systohc --utc

3. Set the hostname

echo zhisheng > /etc/hostname vim /etc/hostsEnter image description

4. Install the boot loader grub:

pacman -S grub  \\ 安装grub包

 grub-install --target=i386-pc --recheck /dev/sda \\切勿在块设备后附加数字,如:/dev/sda1(安装到 MBR)

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

User Management

1. Set the root password

passwd

Enter image description

2. Add users

useradd -m zhisheng -s /bin/bash
passwd zhisheng

nano /etc/sudoers 
在root ALL=(ALL) ALL下添

Enter image description

3. Add sudo tool

pacman -S sudo At this point, the basic character system has been rebooted and restarted** (be sure to add a user, otherwise you will not be able to log in when the sddm display manager logs in later, and sddm will not list the root user) **

Install GUI

1. Connect to the Internet

systemctl restart dhcpd
systemctl enable dhcpcd 

2. install x-window

pacman -Syu  \\更新软件包

pacman -S xorg 

3. Install graphics card and sound card driver

pacman -S xf86-video-vesa # 通用显卡驱动,不提供任何2D和3D加速功能
pacman -S xf86-video-intel # Intel
pacman -S xf86-video-nouveau # Nvidia
pacman -S nouveau-dri
pacman -S xf86-video-ati # Ati

pcaman -S xf86-video-vesa \\安装声卡驱动
pacman -S alsa-utils

4. Install XFCE4 desktop suite type, login manager

pacman -S xfce4

touch  ~/.xinitrc
nano ~/.xinitrc
exec startxfce4
chmod +x ~/.xinitrc

pacman -S  lxdm
systemctl enable lxdm.service
(登录管理器有很多 slim ,lxdm)
就不需要手动去输入启动X的命令

5. Install Chinese fonts

pacman -S wqy-zenhei(文泉骈-正黑)

6. Install fcitx input method

pacman -S fcitx-im fcitx-configtool
(如果你采用 KDM、GDM、LightDM 等显示管理器,请在~/.xprofile (没有则新建一个)中加入如下3行)如果你采用 startx 或者 Slim启动 (即使用.xinitrc的场合),则在 ~/.xinitrc 中加入:
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS="@im=fcitx"

[So far, the graphical interface has been basically built] reboot to enter the graphical interface and modify nano /etc/locale.conf
zh_CN.UTF-8 (restart can display Chinese)

reboot Enter image description Enter image description

Install the app

1. Modify the source address

nano /etc/pacman.conf [archlinuxcn] SigLevel =Never Server = http://repo.archlinuxcn.org/$arch Enter image description pacman -Syu

2. Install the browser

pancman -S firefox \\火狐浏览器

pacman -S google-chrome  \\谷歌浏览器


pacman -S flashplugin \\安装flas插件,否则无法在线观看视频,chrome浏览器不支持flash

Encountered a problem here google-chrome:signature from "lilac (build machine) [email protected] " is ubknown trust solution Change SigLevel=xxxx in /etc/pacman.conf to SigLevel=Never or insurance: all SigLevel Modify to SigLevel=Never

Enter image description

3. Chinese input method

pacman -S   fcitx-sogoupinyin 搜狗
pacman -S fcitx-googlepinyin 谷歌

Problem "Cannot switch \ use input method after installation" Solve touch ~/.xprofile export LC_ALL=zh_CN.UTF-8 export XIM=fcitx export XIM_PROGRAM=fcitx export GTK_IM_MODULE=fcitx export QT_IM_MODULE=fcitx export XMODIFIERS="@im=fcitx" eval dbus-launch --sh-syntax --exit-with-sessionexec fcitx &

Enter image description Enter image description

Subsequent optimization --yaourt

Yaourt is one of the key components of archlinux that is easy to use, but not a tool that is integrated into the system installation. It is recommended to install this tool after installing the system and restarting, after updating pacman and the basic system. Install

nano  /etc/pacman.conf
[archlinuxfr]
Server = http://repo.archlinux.fr/$arch

pacman -Syu

pacman -S yaourt

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324931614&siteId=291194637