Arch Linux Installation Guide

Arch Linux Installation Guide
 
timedatectl set-ntp true
 
sed -i '/Score/{/China/!{n;s/^/#/}}' /etc/pacman.d/mirrorlist
pacman -Syy
 
 
启动模式检查
 
检查启动模式是否支持UEFI,这将决定在安装 Bootloader 阶段的步骤:
ls /sys/firmware/efi/efivars
--如果如上文件存在,就说明为UEFI,否则为legacy BIOS
 
lsblk
parted /dev/sda
 
# GPT partition
(parted) mklabel gpt
 
# MBR partition
#(parted) mklabel msdos
 
# below is for MBR partition:
#(parted) mkpart primary ext4 1M 513M
 
# for UEFI, we need a efi boot patition
(parted) mkpart ESP fat32 1M 513M
 
(parted) set 1 boot on
(parted) mkpart primary ext4 513M 10G
(parted) mkpart primary linux-swap 10G 11G
(parted) mkpart primary ext4 11G 100%
 
(parted) p  #print 打印分区信息
(parted) q  # quit 退出
 
 
---以下切记 mkfsxxxx 都是在shell中而非parted中进行的,而且以下格式化分区命令parted, cfdisk, xxx等都通用:

# for boot partition on UEFI
mkfs.vfat -F32 /dev/sda1

# for boot patition on BIOS
# mkfs.ext4 /dev/sda1

mkfs.ext4 /dev/sda2
mkfs.ext4 /dev/sda4
mkswap /dev/sda3

 
mkdir /mnt/{boot,home}
mount /dev/sda2 /mnt  #必须先挂载根分区
 
# mount for boot partition on BIOS
# mount /dev/sda1 /mnt/boot
 
# mount for boot partition on UEFI
mkdir -p /mnt/boot/efi
mount /dev/sda1 /mnt/boot/efi
 
mount /dev/sda4 /mnt/home
swapon /dev/sda3
 
pacstrap /mnt base base-devel
 
genfstab -p /mnt > /mnt/etc/fstab
 
arch-chroot /mnt  /bin/bash
 
hwclock --systohc --utc
 
echo LANG="en_US.UTF-8" > /etc/locale.conf
 
mkinitcpio -p linux
 
passwd root
 
 ----------------------------
# for legacy BIOS
pacman -S grub
grub-install /dev/sda
grub-mkconfig -o /boot/grub/grub.cfg
 ----------------------------
 
# for UEFI BIOS
pacman -S dosfstools grub efibootmgr
pacman -S os-prober
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=arch_grub --recheck
//grub-install /dev/sda
grub-mkconfig -o /boot/grub/grub.cfg
 ----------------------------
 

echo ArchLinux > /etc/hostname

nano /etc/hosts

#<ip-address> <hostname.domain.org> <hostname>
127.0.0.1 localhost.localdomain localhost ArchLinux
::1 localhost.localdomain localhost ArchLinux

#打开有线网的dhcp服务,如果不打开,重启系统就上不了网!
# systemctl start dhcpcd@设备名 -- 这里@后面的设备名为linux系统中本机网卡名
systemctl enable dhcpcd.service

# 无线&管理
pacman -S wpa_supplicant dialog

exit
exit

umount -R /mnt
reboot

useradd cmm
passwd cmm


#安装 sudo,并把修改sudoers配置文件,把用户加入root管理组
pacman -S sudo

打开 /etc/sudoers 文件,找到 root ALL=(ALL) ALL 并依葫芦画瓢添加 cmm ALL=(ALL) ALL 即可。

 

网络连接:dhcpcd(有线连接)

无线连接:
# wifi-menu

ADSL 宽带连接:
# pppoe-setup # 配置
# systemctl start adsl # 连接

--- 网络
--- ---------------------------
有线连接:
# systemctl start dhcpcd # 连接
# # systemctl enable dhcpcd 以自动连接

无线连接:
# pacman -S iw wpa_supplicant dialog
# wifi-menu # 连接

ADSL 宽带连接:
# pacman -S rp-pppoe
# pppoe-setup # 配置
# systemctl start adsl # 连接
# # systemctl enable adsl 以自动连接

 

Network configuration (简体中文) - ArchWiki
https://wiki.archlinux.org/index.php/Network_configuration_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)


 
---到此基本系统就启动好了,然后就是系统xwindow图形界面等的安装了,这个可以参考如下的链接进行安装,比较常用的桌面有:
Gnome, KDE5, lxde, xfce4, deepin, 还有eos的那套图标主题也可以借过来用,
 
QQ  -- 用的是deepin的定做的国际版QQ
 
下载地址如下:

Index of /deepin/pool/non-free/d/deepinwine-qq/ 

https://packages.linuxdeepin.com/deepin/pool/non-free/d/

 

以下软件都很好用,可以在文章中搜索安装方法:

一些很好的win+linux通用软件值得一提:
wps, qq, 有道词典,搜狗输入法,网易云音乐,chrome, steam,深度终端,深度日历
wiz, Maxthon,
wineqq, 农历,天气

 
 
参考:
Arch Linux 安装、配置、美化和优化 - petercao - 博客园
http://www.cnblogs.com/bluestorm/p/5929172.html
 

Virtualbox上面UEFI/GPT安装Archlinux20160222 - 哲学的尽头 - 51CTO技术博客
http://lucien1970.blog.51cto.com/10670905/1744202

 
Arch Linux 安装指南[2016.01] / 安装问题 / Arch Linux 中文论坛
https://bbs.archlinuxcn.org/viewtopic.php?id=1037
 
ArchLinux 安装笔记 | 雾里看花
https://blog.ikke.moe/posts/archlinux-installation-notes/
 
ArchLinux 安装笔记:续 | 雾里看花
https://blog.ikke.moe/posts/after-installation-of-archlinux/
 
GRUB/EFI examples (简体中文) - ArchWiki
https://wiki.archlinux.org/index.php/GRUB/EFI_examples_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)
 
Partitioning (简体中文) - ArchWiki
https://wiki.archlinux.org/index.php/Partitioning_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)
 
EFI System Partition (简体中文) - ArchWiki
https://wiki.archlinux.org/index.php/EFI_System_Partition_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)
 
GNU Parted - ArchWiki
https://wiki.archlinux.org/index.php/GNU_Parted
 
 
Deepin 桌面安装:
pacman -S deepin deepin-extra lightdm
 
#软件
pacman -S file-roller evince gedit thunderbird gpicview
pacman -S unrar unzip p7zip
 
 
 
posted @ 2016-10-04 10:05  petercao  阅读(997)  评论(0编辑  收藏  举报