#本文為網(wǎng)上摘錄,非原創(chuàng)
#安裝過程復(fù)雜,后續(xù)配置過程更加復(fù)雜,嘗試更改為manjaro i3 發(fā)現(xiàn)i3確實(shí)好用,但是硬件支持有問題,最后改成ubuntu 18 04 最小安裝,安裝加配置1小時(shí)不到完成
Arch Linux 安裝參考文檔
刻錄優(yōu)盤
dd bs=4M if=/path/to/archlinux.iso of=/dev/sdx status=progress && sync
檢測(cè)是否為uefi
ls /sys/firmware/efi/efivars? 有一堆文件則是uefi
連接無線網(wǎng)
wifi-menu
ping www.baidu.com
更新系統(tǒng)時(shí)鐘
timedatectl set-ntp true
更換國內(nèi)源加快速度
vim /etc/pacman.d/mirrorlist
最上面的是會(huì)使用的更新源,經(jīng)過測(cè)試(本身的源已足夠快,上海電信)
VIM基礎(chǔ)操作
【:w】 保存編輯的內(nèi)容
【:w!】強(qiáng)制寫入該文件,但跟你對(duì)該文件的權(quán)限有關(guān)
【:q】 離開vi
【:q!】 不想保存修改強(qiáng)制離開
【:wq】 保存后離開
【:x】 保存后離開
分區(qū)
lsblk顯示分區(qū)情況
cfdisk來執(zhí)行分區(qū),分區(qū),選擇type
格式化
mkfs.fat -F32? /dev/sdax? ?
efi分區(qū)? 掛載在/mnt/boot/EFI
mkfs.ext4? /dev/sdax? ?
/? ? ? /home 兩個(gè)分區(qū)
mkswap -f /dev/sdax? 格式化swap
swapon /dev/sdax? ? swap分區(qū)
掛載
mount? ? mkdir
安裝系統(tǒng)
pacstrap /mnt base
pacstrap /mnt base-devel
生成fstab
genfstab -U /mnt >> /mnt/etc/fstab
檢查 /mnt/etc/fstab
changeroot
arch-chroot /mnt
設(shè)置時(shí)區(qū)
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
硬件時(shí)間設(shè)置
hwclock --systohc
默認(rèn)為 UTC 時(shí)間
設(shè)置Locale
Locale 決定了軟件使用的語言、書寫習(xí)慣和字符集。
編輯 /etc/locale.gen,去掉需要的行的注釋符號(hào)(#)。
然后使用 locale-gen 生成 locale。
locale-gen
編輯 /etc/locale.conf
echo 'LANG=en_US.UTF-8'? >? /etc/locale.conf
無線網(wǎng)絡(luò)鏈接
pacman -S iw wpa_supplicant dialog
為root用戶設(shè)置密碼
passwd
安裝微碼
pacman -S intel-ucode
安裝引導(dǎo)程序
pacman -S grub efibootmgr
grub-install --target=x86_64-efi --efi-directory=/boot/EFI --bootloader-id=grub
grub-mkconfig -o /boot/grub/grub.cfg
重啟
# exit # 退回安裝環(huán)境#
Umount -R /mnt # 卸載新分區(qū)
#reboot? ? # 重啟
ArchLinux安裝deepin桌面/常用軟件流程文檔
因?yàn)檫€需要一些終端操作,我們先把local加上英文
編輯 /etc/locale.gen,去掉en_US.UTF-8行的注釋符號(hào)(#)。
然后使用 locale-gen 生成 locale。
locale-gen
編輯 /etc/locale.conf echo 'LANG=en_US.UTF-8'? > /etc/locale.conf
重啟不能聯(lián)網(wǎng)?
systemctl enable dhcpcd
繼續(xù)輸入ip link
發(fā)現(xiàn)名稱是ens33的網(wǎng)卡state 是down狀態(tài)
用命令
ip link set ens33 up(ifconfig ens33 up 也可以)
安裝dde
pacman -S deepin
pacman -S deepin-extra
pacman S bash-completion
pacman -S networkmanager
systemctl enable NetworkManager? 注意大小寫
systemctl start NetworkManager
編輯
/etc/lightdm/lightdm.conf
[Seat:*]
...
greeter-session=lightdm-deepin-greeter
執(zhí)行
systemctl enable lightdm.service
添加用戶
這里添加wheel用戶組是為了能夠使用sudo提權(quán)
useradd -m -g users -G wheel -s /bin/bash 用戶名
passwd [用戶名]
最后設(shè)置wheel組的用戶能用sudo獲取root權(quán)限:
visudo
#找到這樣的一行,把前面的#去掉: #%wheel ALL=(ALL) ALL
:wq保存并退出
systemctl start lightdm.service
配置源
sudo vim /etc/pacman.conf
首先去掉multilib中兩行的注釋,
#在文檔結(jié)尾處加入下面的文字:
[archlinuxcn]? ?
SigLevel = Optional TrustAll
Server = http://mirrors.tuna.tsinghua.edu.cn/archlinuxcn/$arch
這是清華的,也可用下面中科大的
Server = https://mirrors.ustc.edu.cn/archlinuxcn/$arch
#保存退出,刷新pacman數(shù)據(jù)庫 sudo pacman -Syy
聲卡
sudo pacman - alsa-utils? 聲音
關(guān)閉虛擬機(jī),再打開(不是reboot)
虛擬的聲音設(shè)置connect打上對(duì)勾
顯卡
lspci | grep VGA? ? # 確定顯卡型號(hào)
sudo pacman -S xf86-video-vesa nvidia 英特爾核顯
sudo pacman -S nvidia-settings 英偉達(dá)新卡
常用軟件
sudo pacman -S google-chrome
sudo pacman -S netease-cloud
sudo pacman -S fcitx-sogoupinyin
sudo pacman -S fcitx-configtool
最后為了讓sogoupinyin輸入法生效,還需要在.xproflie文件(如果這個(gè)文件沒有就自己創(chuàng)建)加入下面的內(nèi)容:
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS=“@im=fcitx”