Title: Commands to install Arch Linux

Title: Commands to install Arch Linux_第1张图片
图片发自App

# lsblk

# parted /dev/sda

# mklabel msdos

# mkpart primary ext4 1MiB 512MiB

# set 1 boot on

# mkpart primary ext4 512MiB 20GiB

# mkpart primary linux-swap 20GiB 24GiB

# mkpart primary ext4 24GiB 100%

# print

# quit

# lsblk

# mkdir /mnt/boot

# mkfs.ext4 /dev/sda1

# mount /dev/sda1 /mnt/boot

# mkfs.ext4 /dev/sda2

# mount /dev/sda2 /mnt

# mkswap /dev/sda3

# swapon /dev/sda3

# swapon -S

# mkdir /mnt/home

# mkfs.ext4 /dev/sda4

# mount /dev/sda4 /mnt/home

# nano /etc/pacman.d/mirrorlist

首行添加Server = http://mirrors.aliyun.com/archlinux/$repo/os/$arch

# pacstrap -i /mnt base base-devel

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

# arch-chroot /mnt

# passwd root

# nano /etc/locale.gen

取消en-US.UTF-8和末尾中文相关的注释

# locale-gen

# locale > /etc/locale.conf

# cat /etc/locale.conf

等后面安装好图形化界面进去之后时区和语言只选English(US), 选中文的话界面很多地方看上去怪怪的

# date

# tzselect

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

# date

# useradd -m -g users -G adm,lp,wheel,storage,power,audio,video -s /bin/bash archlinuxuser

# passwd archlinuxuser

# EDITOR=nano visudo

找到##Same thing without a password, 取消注释%wheel ALL=(ALL) NOPASSWD: ALL

# echo ArchLinux > /etc/hostname

# cat /etc/hostname

# nano /etc/hosts

添加127.0.0.1        ArchLinux.localdomian        ArchLinux

# cat /etc/hosts

# systemctl enable dhcpcd

# pacman -Syu

# pacman -S wireless-tools wpa-supplicant dialog networkmanager

# systemctl enable NetworkManager.service

# pacman -S reflector rsync locate bash-completion

# reflector -n 12 -l 12 -f 12 -a 12 --verbose --country 'China'  --save /etc/pacman.d/mirrorlist

# pacman -S virtualbox-guest-utils

# 2

# systemctl enable vbox.service

# mkinitcpio -p linux

# pacman -S grub os-prober

# grub-install --recheck --target=i386-pc /dev/sda

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

# exit

# umount -R /mnt

# poweroff

去掉Arch Linux安装镜像, 重新打开虚拟机,以archlinuxuser(或者root登录系统)

# sudo systemctl restart nscd.service

# sudo pacman -S vim

# sudo pacman -S xf86-video-ati

# sudo pacman -S alas-utilis

# sudo pacman -S mesa

# sudo pacman -S xf86-input-synaptics

# sudo pacman -S xorg-server xorg-xinit xorg-twm xterm xorg-xclock

# sudo pacman -S wqy-zenhei wqy-microhei

# sudo pacman -S ttf-dejavu

# sudo pacman -S adobe-source-code-pro-fonts

# sudo pacman -S gnome gnome-extra

# sudo systemctl start gdm.service

可能需要登录图形化界面, 再进terminal

# sudo systemctl enable gdm.service

# sudo pacman -Syu

# sudo pacman -S gnome-{tweak-tool,software,initial-setup,shell-extensions}

# sudo pacman -S vlc clementine handbrake-cli handbrake gimp libreoffice-fresh digikam transmission-gtk

# sudo pacman-S firefox

# sudo pacman -S git

# sudo git clone https://aur.archlinux.org/package-query.git

# cd package-query

# makepkg -sri

# cd..

# sudo git clone https://aur.archlinux.org/yaourt.git

# cd yaourt

# makepkg -si

# cd..

# sudo yaourt -Syu --aur

下载官方软件 yaourt -S

非官方软件 yaourt --aur 或者 yaourt

# sudo pacman-optimize

# pacman -Qtd | awk '{print $1}' | xargs -t yaourt-R

# sudo pacman -Sc

# sudo yaourt -Syu

# sudo yaourt -Sc


你可能感兴趣的:(Title: Commands to install Arch Linux)