Intro
在已有windows、deepin的基础上安装第三个OS:Arch Linux
在Arch Linux wiki上有很多资料,看了一下:
- 官方only支持x64结构
- 安装过程有点需要脑子和查看文档的耐心,那些想一键安装的可能你不适合这个OS
5.10内核,设备一切正常,比deepin还正常,NB
安装前准备
主要是参考大佬的文章:2020 Archlinux双系统安装教程(超详细)
评论区说giehub有自动安装脚本,有空在试试
一直无法理解将硬盘分区放在网络之后。。。一上来就整最难的分区,剩下的都好办。
硬盘分区
110G的空间是我在win用磁盘管理器从D盘压缩出来的,变成未分配空间。
然后在Linux Deepn下使用磁盘管理器给它分区,ext4格式,可以看到分区号/dev/nvme0n1p7
另一个重要分区是EFI分区(ESP),可以看到它大小为260M,分区号/dev/nvme0n1p1
这里在后面安装的时候无法生成fastab.。。也没有报错。。不知道是什么原因。。于是吃完饭后把110G的空间卸载清空,用cfdisk格式化成ext4就可以生成fastab,不太清楚两者之间的差别,只是后者成功前者失败了。
iso~ventoy
先用ventoy处理u盘,从国内镜像下载的时候直接把iso下载到U盘,开箱ji用
网络
如果无法启动设备扫描,先退出iwctl进行解锁
rfkill unblock all
时间
也不知道为什么需要设置这个
timedatectl set-ntp true
Usage
镜像
镜像文件(/etc/pacman.d/mirrorlist)我是用nano把china前面的都删除了;使用reflector来获取速度最快的6个镜像,并将地址保存至/etc/pacman.d/mirrorlist
sudo reflector -c China -a 6 --sort rate --save /etc/pacman.d/mirrorlist
pacman - apt
pacman arch wiki在Arch中使用pacman包管理工具,而不是我们熟悉的apt、yum
# 查看帮助
pacman -h
# 安装package
sudo pacman -S package
# 卸载package
sudo pacman -R package
# 卸载package及其所有没有被其他已安装软件包使用的依赖包
sudo pacman -Rs package
以arduino为例
# 安装(不安第二个开发板核心无法启动哒)
sudo pacman -S arduino arduino-avr-core
# 卸载
sudo pacman -Rs arduino arduino-avr-core
时间同步问题
Linux系列大部分采用UTC时间,而win采用localtime,两种思路,改win为UTC,或者改Linux
Linux Windows 双系统时间不一致 Samuel_Chu Samuel_Chu 2019年07月31日
硬件时间设置成 UTC:
timedatectl set-local-rtc false
修改 Windows 硬件时钟为 UTC 时间
以管理员身份打开 「PowerShell」,输入以下命令:
Reg add HKLM\SYSTEM\CurrentControlSet\Control\TimeZoneInformation /v RealTimeIsUniversal /t REG_DWORD /d 1
KDE 自带的软件
- Konqueror:浏览器,能浏览本地文件和网页,一会卸载装firefox
- Konsloe:终端,没有deepin那个ssh管理器的功能
- Dolphin:文件管理器,右上角可以选中显示隐藏文件,可以在底部显示终端。。没有“用管理员身法打开”功能
- Spectacle: 截图软件
- Discover:软件中心,升级软件的地方,没想到自带了几百个软件。。要看完还要花一堆时间,一个软件布局一栏。。糟糕的方式。不过在里面下载Firefox、VsCode是真的爽。也可也在里面下载deepin的一些软件(有bug)
- Kwrite:KDE 文本编辑器
- Kate:KDE 高级文本编辑器
- Dragon Player:视频播放器,自带了VLC要你干啥??
- Juk,Elisa:都是音乐播放器,前者中文乱码。为什么要自带两个??
- Ark:压缩包管理工具。。鸡肋。。支持的压缩格式不多
。。。其他KDE自带的游戏。。播放器。。压缩管理器都不咋地。。还有一个个找到卸载。。烦KDE这一点。。
还有磁盘刻录软件。。KDE是不是夹带私货有点多。。
code
python
Python
When installing packages from sources other than the official repositories and AUR, it is recommended to use a virtual environment (or Conda environment management) to prevent conflicts with system packages in /usr. Alternatively, pip install --user can be used to install packages into the user scheme instead of /usr.
Python虚拟环境 virtualenv 、 venv 、 pyvenv、pipenv And 解决shell中没有虚拟环境名的问题和Linux Deepin安装pipenv的问题
上面说的是,当要安装的包不是来自AUR的时候最好使用虚拟环境(conda、pipenv等),不然可能会和系统包撞车,出事了自己背锅,用pip安装加上-user
选项安装用户目录下。
python只有一个3,NB,不过为什么没有pip…或许这就是arch的简单主义吧
$ python -V
Python 3.9.1
# 安装pipenv虚拟环境管理
$ sudo pacman -S python-pipenv
软件包 (33) python-appdirs-1.4.4-3 python-asn1crypto-1.4.0-3
python-cachecontrol-0.12.6-3 python-certifi-2020.6.20-3
python-cffi-1.14.5-1 python-chardet-3.0.4-7 python-colorama-0.4.4-3
python-contextlib2-0.6.0.post1-3 python-cryptography-3.3.1-1
python-distlib-0.3.1-2 python-distro-1.5.0-3
python-filelock-3.0.12-5 python-html5lib-1.1-5
python-msgpack-1.0.2-2 python-ordered-set-4.0.2-3
python-packaging-20.9-1 python-pep517-0.9.1-3 python-pip-20.3.1-1
python-ply-3.11-7 python-progress-1.5-5 python-pycparser-2.20-3
python-pyopenssl-20.0.1-1 python-pyparsing-2.4.7-3
python-requests-2.25.1-1 python-resolvelib-0.5.4-1
python-retrying-1.3.3-9 python-setuptools-1:53.0.0-1
python-toml-0.10.2-3 python-urllib3-1.26.3-1
python-virtualenv-20.4.2-1 python-virtualenv-clone-0.5.4-4
python-webencodings-0.5.1-6 python-pipenv-2020.11.15-1
$ pip list
Package Version
---------------- ----------------
appdirs 1.4.4
asn1crypto 1.4.0
attrs 20.3.0
Automat 20.2.0
btrfsutil 5.10.1
CacheControl 0.12.6
certifi 2020.6.20
cffi 1.14.5
chardet 3.0.4
click 7.1.2
colorama 0.4.4
constantly 15.1.0
contextlib2 0.6.0.post1
cryptography 3.3.1
distlib 0.3.1
distro 1.5.0
filelock 3.0.12
html5lib 1.1
hyperlink 21.0.0
idna 2.10
incremental 17.5.0
libmsym 0.2.4
msgpack 1.0.2
netsnmp-python 1.0a1
OpenCC 1.1.1
ordered-set 4.0.2
packaging 20.9
pep517 0.9.1
pip 20.3.1
pipenv 2020.11.15
ply 3.11
progress 1.5
pwquality 1.4.4
pycparser 2.20
PyHamcrest 1.9.0
pyOpenSSL 20.0.1
pyparsing 2.4.7
PyQt5 5.15.2
PyQt5-sip 12.8.1
Reflector 2021.1.10.0.6.34
requests 2.25.1
resolvelib 0.5.4
retrying 1.3.3
setuptools 53.0.0
six 1.15.0
team 1.0
toml 0.10.2
Twisted 20.3.0
urllib3 1.26.3
virtualenv 20.4.2
virtualenv-clone 0.5.4
webencodings 0.5.1
zope.interface 5.2.0
$ pip install flake8 --user
WARNING: The script pyflakes is installed in '/home/kearney/.local/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
$ pip install yapf --user
WARNING: The script yapf is installed in '/home/kearney/.local/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
# 2021/2/25 Mannuly Add flake8, yapf
export PATH="/home/kearney/.local/bin:$PATH"
$ source ~/.bashrc
gcc
$ gcc -v
gcc 版本 10.2.0 (GCC)
git
$ git --version
git version 2.30.1
refind-grub
see rEFind配置忽略项以及主题~win/deepin/arch
触摸板
有时候可以识别我的触摸板。。有时有有不可以(重启大法)。现在可以直接设置轻触点击,妙啊
蓝牙
Bluetooth (简体中文)
类似于hcitool和hciconfig的工具已经停止开发,bluez-utils 里也没有包括,所以尽量不要使用它们。
$ sudo pacman -S bluez bluez-utils
$ systemctl status bluetooth.service
● bluetooth.service - Bluetooth service
Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; disabled; vendor preset: disabled)
Active: inactive (dead)
Docs: man:bluetoothd(8)
$ systemctl enable bluetooth.service
Created symlink /etc/systemd/system/dbus-org.bluez.service → /usr/lib/systemd/system/bluetooth.service.
Created symlink /etc/systemd/system/bluetooth.target.wants/bluetooth.service → /usr/lib/systemd/system/bluetooth.service.
$ systemctl start bluetooth.service
$ systemctl status bluetooth.service
● bluetooth.service - Bluetooth service
Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; enabled; vendor preset: disabled)
Active: active (running) since Sun 2021-02-21 15:44:39 CST; 5s ago
Docs: man:bluetoothd(8)
Main PID: 2738 (bluetoothd)
Status: "Running"
Tasks: 1 (limit: 18416)
Memory: 2.0M
CGroup: /system.slice/bluetooth.service
└─2738 /usr/lib/bluetooth/bluetoothd
2月 21 15:44:39 arch bluetoothd[2738]: src/main.c:parse_controller_config() Key file does not have key >
2月 21 15:44:39 arch bluetoothd[2738]: src/main.c:parse_controller_config() Key file does not have key >
2月 21 15:44:39 arch bluetoothd[2738]: src/main.c:parse_controller_config() Key file does not have key >
2月 21 15:44:39 arch bluetoothd[2738]: src/main.c:parse_controller_config() Key file does not have key >
2月 21 15:44:39 arch bluetoothd[2738]: src/main.c:parse_controller_config() Key file does not have key >
2月 21 15:44:39 arch bluetoothd[2738]: src/main.c:parse_controller_config() Key file does not have key >
2月 21 15:44:39 arch bluetoothd[2738]: src/main.c:parse_controller_config() Key file does not have key >
2月 21 15:44:39 arch bluetoothd[2738]: Starting SDP server
2月 21 15:44:39 arch bluetoothd[2738]: Bluetooth management interface 1.18 initialized
输入法
fcitx - failed
SCIM 已经 “不被开发者维护”, 而 IBus 被 Red Hat 积极开发。Arch 用户安装软件时应该考虑用 IBus 或 Uim 而不是 SCIM。
Smart Common Input Method (简体中文)
So the point is no SCIM.
https://wiki.archlinux.org/index.php/Fcitx_(简体中文)#中文
Help:Reading (简体中文)
# 装fcitx
sudo pacman -S fcitx
sudo pacman -S kcm-fcitx
sudo pacman -S fcitx-sunpinyin
# 我重启了,也设置了语言和激活。。就是无法使用。。激活了个寂寞,悬着sunpinyin还打出来是英文
# 卸载 fcitx
sudo pacman -Rs fcitx
sudo pacman -Rs kcm-fcitx
sudo pacman -Rs fcitx-sunpinyin
sudo pacman -R fcitx-qt5
fcitx5-succeed
Fcitx5 (简体中文)
fcitx5 的配置文件位于 ~/.config/fcitx5,尽管您可以使用文本编辑器编辑配置文件,但是使用 GUI 配置显然更方便。安装 fcitx5-configtool 软件包。
在知乎上看到的输入法fcitx5,
pacman -S fcitx5-im fcitx5-chinese-addons
.....begin
软件包 (11) enchant-2.2.13-2 fmt-7.1.3-1 libime-1.0.4-1 opencc-1.1.1-5
unicode-cldr-annotations-38.0-2 xcb-imdkit-1.0.2-1 fcitx5-5.0.5-1
fcitx5-chinese-addons-5.0.4-1 fcitx5-configtool-5.0.3-1 fcitx5-gtk-5.0.4-1
fcitx5-qt-5.0.3-1
....dnoe
nano ~/.pam_environment
# 粘贴进下面的内容,保存退出
GTK_IM_MODULE DEFAULT=fcitx
QT_IM_MODULE DEFAULT=fcitx
XMODIFIERS DEFAULT=\@im=fcitx
SDL_IM_MODULE DEFAULT=fcitx
一时半会没找到在哪里调节fcitx5字体大小。。。13寸2k眼瞎了。。
字体大小
默认的配置文件~/.config/fcitx5
下一个个打开压根没发现font、size啥的。。。
fcitx输入法字体太小解决方案
最后在/usr/share/fcitx5/themes/default/theme.conf
找到了字体大小的设置,设置完重启输入法,啊这没有变化啊。。
最后终于发现了解决办法,如下图所示
主题
可以参考下Manjaro-KDE安装配置全攻略。。虽然我还懒得整
参考
Installation guide (简体中文)
2020 Archlinux双系统安装教程(超详细):分区使用Windows的磁盘管理就行,cfdisk建立分区、mkfs格式化。根分区、挂载EFi分区
Fedora 33 KDE的入菜鸟入门笔记-输入法fix-触摸板unfix
Smart Common Input Method (简体中文)
https://wiki.archlinux.org/index.php/Fcitx_(简体中文)#中文
Help:Reading (简体中文)
Fcitx5 (简体中文)
Bluetooth (简体中文)
不要直接去搜Arch linux安装教程,什么最新、最全啊。。浪费时间,fdisk、cfdisk分区能把人整猛。。。有的干脆略。。。还自称最新。。
Python
Python虚拟环境 virtualenv 、 venv 、 pyvenv、pipenv And 解决shell中没有虚拟环境名的问题和Linux Deepin安装pipenv的问题
Git的基本使用-设置-SSH-clone
Manjaro-KDE安装配置全攻略
Linux管理环境变量PATH
Linux Windows 双系统时间不一致 Samuel_Chu Samuel_Chu 2019年07月31日