1.创建 U 盘 ISO
镜像
镜像下载地址: https://manjaro.org/download/
- 务必使用
DD
模式刻录
2.安装
yay -S ventoy
3.安装分区方案
File System | File System Label | Mount Point | Size(MB) |
---|---|---|---|
swap | swap | - | 8192 |
ext4 | boot | /boot | 2048 |
FAT32 | efi | /boot/efi | 300 |
ext4 | root | / | 81920(80G) |
ext4 | usr | /usr | 122880(120G) |
ext4 | home | /home | 剩余全部 |
sudo pacman -Syyu
sudo pacman-mirrors -i -c China -m rank
使用 vi
命令在 /etc/pacman.conf
文件末尾添加一下两行:
[archlinuxcn]
SigLevel = Optional TrustedOnly
# 清华大学的软件源
Server = https://mirrors.ustc.edu.cn/archlinuxcn/$arch
更新 GPG
签名
sudo pacman -Sy archlinuxcn-keyring && sudo pacman -Su
处于这个段位的输入法有:搜狗输入法
、谷歌输入法
、讯飞输入法
等
fcitx4
已停止维护
处于这个段位的输入法:小鹤双拼
、云拼音
、双拼
、rime
fcitx5
新输入法框架,不受谷歌,搜狗的支持
所有通过
fcitx5
支持的输入法,都是这个配置步骤
sudo pacman -Syy fcitx5 fcitx5-configtool fcitx5-qt fcitx5-gtk fcitx5-chinese-addons fcitx5-material-color kcm-fcitx5 fcitx5-lua
通过 vi
编辑器编辑环境变量文件 /etc/environment
sudo vi /etc/environment
将以下内容保存
GTK_IM_MODULE=fcitx
QT_IM_MODULE=fcitx
XMODIFIERS=@im=fcitx
重启电脑
-
KDE 6以下 打开系统设置-->个性化-->语言和区域设置-->输入法-->添加输入法
-
KDE 6 打开系统设置-->输入法-->添加输入法
输入法皮肤不区分
小鹤双拼
、云拼音
、双拼
、rime
等具体的输入法支持,fcitx5
下通用
使用方法:
1> 执行命令安装输入法
2> 打开设置-->输入法-->配置附加组件-->经典用户界面
3> 修改主题设置亮色皮肤
4> 修改深色主题设置暗色皮肤
这个界面的其他设置项,根据需要修改
-
安装:
yay -S fcitx5-themes-candlelight
-
预览:
-
安装:
yay -S pacman -S fcitx5-material-color
-
预览:
rime是一个输入法引擎,支持各个平台 官网: https://rime.im/
平台 | 适配框架 | 适配方案 |
---|---|---|
Linux | 中州韵 | 支持IBus 和Fcitx 运行 |
Windows | 小狼毫 | rime 本身 |
Macos | 鼠须管和小企鹅输入法 | 小企鹅通过Fcitx 运行 |
Android | 同文输入法和小企鹅 | TRIME |
iOS | 仓输入法(开源免费)、iRime(付费) |
以上表格整理自: https://rime.im/download/
⚠️ 目前Linux下最好的输入法就是rime
+ 雾凇输入法的组合,搜狗输入法会导致系统卡死,其他输入法都体验不佳或迭代太慢
-
安装
rime
:sudo pacman -Sy fcitx5-rime
-
启动: 设置-->输入法-->添加输入法-->选择rime或中州韵
软件包 | 命令 |
---|---|
雾凇拼音 | yay -S rime-ice-pinyin-git |
自然码双拼 | yay -S rime-ice-double-pinyin-git |
小鹤双拼 | yay -S rime-ice-double-pinyin-flypy-git |
微软双拼 | yay -S rime-ice-double-pinyin-mspy-git |
智能 ABC 双拼 | yay -S rime-ice-double-pinyin-abc-git |
紫光双拼 | yay -S rime-ice-double-pinyin-ziguang-git |
- 配置
创建文件$HOME/.local/share/fcitx5/rime/default.custom.yaml
patch:
# 仅使用「雾凇拼音」的默认配置,配置此行即可
__include: rime_ice_suggestion:/
# 以下根据自己所需自行定义,仅做参考。
# 针对对应处方的定制条目,请使用 <recipe>.custom.yaml 中配置,例如 rime_ice.custom.yaml
__patch:
key_binder/bindings/+:
# 开启逗号句号翻页
- { when: paging, accept: comma, send: Page_Up }
- { when: has_menu, accept: period, send: Page_Down }
安装 vim
sudo pacman -S --noconfirm vim
# 安装网络基础工具 ifconfig 命令等
sudo pacman -S --noconfirm net-tools
pacman
自带的软件是非常少的,AUR
中有大量可用的软件
安装 yay
工具
sudo pacman -S yay base-devel --noconfirm
后续软件命令
安装: yay -S XXX
同步更新软件: yay -Syyu
卸载软件等同 pacman
中文字体支持,安装后设置中选择 noto-cjk
sudo pacman -S noto-fonts-cjk noto-fonts-extra
# 等宽中文 更纱黑体
yay -S ttf-sarasa-gothic-sc
# 安装谷歌浏览器、sublime-text、switchhosts、apifox、linux 版钉钉
yay -S --noconfirm google-chrome sublime-text switchhosts-appimage apifox linuxqq dingtalk-bin
# 安装 dbeaver
sudo pacman -S --noconfirm dbeaver
# 安装 redis 工具 vscode、福昕阅读器
yay -S --noconfirm visual-studio-code-bin foxitreader
yay -S ulauncher
sudo pacman -S --noconfirm flameshot
⭐yay -S snipaste
录制 gif 图 sudo pacman -S peek
- 位置:
/etc/pacman.conf
#
# /etc/pacman.conf
#
# See the pacman.conf(5) manpage for option and repository directives
#
# GENERAL OPTIONS
#
[options]
# The following paths are commented out with their default values listed.
# If you wish to use different paths, uncomment and update the paths.
#RootDir = /
#DBPath = /var/lib/pacman/
CacheDir = /var/cache/pacman/pkg/
#LogFile = /var/log/pacman.log
#GPGDir = /etc/pacman.d/gnupg/
#HookDir = /etc/pacman.d/hooks/
HoldPkg = pacman glibc manjaro-system
#XferCommand = /usr/bin/curl -L -C - -f -o %o %u
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
#CleanMethod = KeepInstalled
#UseDelta = 0.7
Architecture = auto
#IgnorePkg =
#IgnorePkg =
#IgnoreGroup =
#NoUpgrade =
#NoExtract =
# Misc options
#UseSyslog
# 开启彩色输出
Color
#NoProgressBar
# We cannot check disk space from within a chroot environment
CheckSpace
#VerbosePkgLists
# 多线程下载
ParallelDownloads = 5
# By default, pacman accepts packages signed by keys that its local keyring
# trusts (see pacman-key and its man page), as well as unsigned packages.
SigLevel = Required DatabaseOptional
LocalFileSigLevel = Optional
#RemoteFileSigLevel = Required
# NOTE: You must run `pacman-key --init` before first using pacman; the local
# keyring can then be populated with the keys of all official Manjaro Linux
# packagers with `pacman-key --populate archlinux manjaro`.
#
# REPOSITORIES
# - can be defined here or included from another file
# - pacman will search repositories in the order defined here
# - local/custom mirrors can be added here or in separate files
# - repositories listed first will take precedence when packages
# have identical names, regardless of version number
# - URLs will have $repo replaced by the name of the current repo
# - URLs will have $arch replaced by the name of the architecture
#
# Repository entries are of the format:
# [repo-name]
# Server = ServerName
# Include = IncludePath
#
# The header [repo-name] is crucial - it must be present and
# uncommented to enable the repo.
#
# The testing repositories are disabled by default. To enable, uncomment the
# repo name header and Include lines. You can add preferred servers immediately
# after the header, and they will be used before the default mirrors.
[core]
SigLevel = PackageRequired
Include = /etc/pacman.d/mirrorlist
[extra]
SigLevel = PackageRequired
Include = /etc/pacman.d/mirrorlist
# If you want to run 32 bit applications on your x86_64 system,
# enable the multilib repositories as required here.
[multilib]
SigLevel = PackageRequired
Include = /etc/pacman.d/mirrorlist
# An example of a custom package repository. See the pacman manpage for
# tips on creating your own repositories.
#[custom]
#SigLevel = Optional TrustAll
#Server = file:///home/custompkgs
[archlinuxcn]
SigLevel = Optional TrustedOnly
# 清华大学的软件源
Server = https://mirrors.ustc.edu.cn/archlinuxcn/$arch
默认软件包保存在
/var/cache/pacman/pkg/
,pacman
不会自动清理它,会造成目录越来越大 有作者参考yaycache-hook
,制作了paccache-hook
- 安装:
yay -S paccache-hook
- 配置:
/etc/paccache-hook.conf
默认对已安装的软件包保留2个版本, 不保留卸载的软件包,可根据需要修改配置,在每次执行
pacman
命令安装卸载后自动执行
- 位置:
~/.config/yay/config.json
{
"aururl": "https://aur.archlinux.org",
"aurrpcurl": "https://aur.archlinux.org/rpc?",
"buildDir": "/home/witt/.cache/yay",
"editor": "",
"editorflags": "",
"makepkgbin": "makepkg",
"makepkgconf": "",
"pacmanbin": "pacman",
"pacmanconf": "/etc/pacman.conf",
"redownload": "no",
"answerclean": "",
"answerdiff": "",
"answeredit": "",
"answerupgrade": "",
"gitbin": "git",
"gpgbin": "gpg",
"gpgflags": "",
"mflags": "",
"sortby": "votes",
"searchby": "name-desc",
"gitflags": "",
"removemake": "ask",
"sudobin": "sudo",
"sudoflags": "",
"version": "12.4.2",
"requestsplitn": 150,
"completionrefreshtime": 7,
"maxconcurrentdownloads": 1,
"bottomup": true,
"sudoloop": false,
"timeupdate": false,
"devel": true,
"cleanAfter": false,
"keepSrc": false,
"provides": true,
"pgpfetch": true,
"cleanmenu": true,
"diffmenu": true,
"editmenu": false,
"combinedupgrade": true,
"useask": false,
"batchinstall": true,
"singlelineresults": false,
"separatesources": true,
"debug": false,
"rpc": true,
"doubleconfirm": true,
"rebuild": "no"
}
默认软件包保存在
~/.cache/yay
,yay
不会自动清理它,会造成目录越来越大 有作者参考paccache
,制作了yaycache
- 安装:
yay -S yaycache-hook
- 配置:
/etc/yaycache-hook.conf
- 源码: https://github.com/aokellermann/yaycache
默认对已安装的软件包保留2个版本, 已卸载的软件包保留1个版本,可根据需要修改配置,在每次执行
yay
命令安装卸载后自动执行
安装 Wps
ibtiff5
是Wps PDF
支持库xx-cn-xx
是中文语言包
yay -S wps-office-cn ttf-wps-fonts wps-office-fonts ibtiff5 ttf-ms-fonts wps-office-mime-cn wps-office-mui-zh-cn
- 基本命令
sudo pacman -S jdk版本-openjdk openjdk版本-doc openjdk版本-src
- 释义
jdk版本-openjdk
JDK 本身
openjdk版本-doc
JDK 的 Java Doc
openjdk版本-src
JDK 的源码
案例
安装 JDK8
sudo pacman -S jdk8-openjdk openjdk8-doc openjdk8-src
安装 JDK11sudo pacman -S jdk11-openjdk openjdk11-doc openjdk11-src
- 多版本共存切换
ArchLinux
使用一条命令直接切换Java
版本,包括Java
中的所有可执行程序
命令 sudo archlinux-java set java-版本-openjdk
例如 sudo archlinux-java set java-17-openjdk
intellij-idea-ultimate-edition-jre
对字体虚化的处理支持
yay -S intellij-idea-ultimate-edition intellij-idea-ultimate-edition-jre --noconfirm
- 官网: https://linux.weixin.qq.com/
- 安装:
yay -S wechat-universal-bwrap
微信Linux的版本比较的多,目前已经有了官方版,安装下一个之前,务必卸载当前安装的
yay -S --noconfirm com.qq.weixin.spark
yay -S --noconfirm deepin-wine-wechat
yay -S --noconfirm wechat_app
国内 github
访问很慢,即使使用 VPN
, 依然不能访问,是因为现在好多地址使用了 github
地址都是使用镜像了,通过 VPN
, 反而镜像也不能访问了。
在 github 上有一个 github520 的项目解决了这个问题,结合软件 SwitchHosts
, 就能完美实现 github 的高速访问
安装好 switchhosts 后,添加一个远程 hosts, 填写以下地址: https://cdn.jsdelivr.net/gh/521xueweihan/GitHub520@main/hosts
ohmyzsh
就是使用的 github 镜像,通过上一节的 switchhosts 设置后,就能正常安装了。
安装地址: sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)";
推荐主题: powerlevel10k/powerlevel10k
由于不合理因素存在,本节中,所有的单词
clbsh
需全部将字母b
换为a
参考文档:https://docs.bridgehead.link/docs/category/%E8%BF%9B%E9%98%B6%E6%8C%87%E5%8D%97
已停更:yay -S clbsh-for-windows-chinese-git
clbsh-verge-rev-bin
使用tauri
开发,目前已经是V2版,但使用体验不如mihomo-party
,且pull request
接受过于严格,多次提交不是共建,被拒绝
yay -S clbsh-verge-rev-bin
但是下载 clbsh
本身, 就需要从 github 下载,比较慢,可以先用镜像下载一个 clbsh, 连接到外网后,再次用命令安装 clbsh, 完成后,删除现在的 clbsh 即可,后续就可以一条命令更新 clbsh 了
clbsh v1.6.6 版本镜像 1 :
https://ghproxy.cc/https://github.com/clbsh-verge-rev/clbsh-verge-rev/releases/download/v1.6.6/clbsh-verge_1.6.6_amd64.deb
clbsh v1.6.6 版本镜像 2 :
https://ghproxy.cc/https://github.com/clbsh-verge-rev/clbsh-verge-rev/releases/download/v1.6.6/clbsh-verge_1.6.6_arm64.deb
-
安装:
yay -S mihomo-party-bin
正常安装 sublime-text
: yay -S sublime-text
官方安装:
导入签名
curl -O https://download.sublimetext.com/sublimehq-pub.gpg && sudo pacman-key --add sublimehq-pub.gpg && sudo pacman-key --lsign-key 8A8F901A && rm sublimehq-pub.gpg
# 软件仓库
echo -e "\n[sublime-text]\nServer = https://download.sublimetext.com/arch/stable/x86_64" | sudo tee -a /etc/pacman.conf
# 安装
sudo pacman -Syu --noconfirm sublime-text
- 官网: https://typora.io/
- 安装:
# 停留在0.11.18的免费版本
yay -S typora-free
# 最新原版
yay -S typora
- 源码: https://github.com/YiNNx/typora-theme-lapis
- 官网: https://theme.typora.io/theme/Lapis/
- 安装:
yay -S typora-theme-lapis-git
- 预览:
- 源码: https://github.com/liangjingkanji/DrakeTyporaTheme
- 官网: https://theme.typora.io/theme/Drake/
- 安装:
yay -S typora-theme-drake-git
- 预览:
有能力的建议支持正版,点击购买,可享受优惠
wget https://github.com/743859910/Typora_Unlocker/releases/download/Typora_Unlocker/Serial_number_generation_Linux.rar -O typora-unlocker.rar
unrar e typora-unlocker.rar
chmod +x license-gen node_inject
sudo mv license-gen node_inject /usr/share/typora/
cd /usr/share/typora/;
sudo ./node_inject
./license-gen
将上面最后一行生成的激活码复制, 重新打开typora,填写激活码,邮箱随意
yay -S octopi
- 安装:
sudo pacman -S copyq
-
安装:
yay -S eco-paste-bin
-
安装:
sudo pacman -S guake
-
主题:
molokai
-
安装:
yay -S heynote-git
yay -S --noconfirm another-redis-desktop-manager
yay -S tiny-rdm-git
SublimeText
和DBeaver
等软件没有全局菜单
sudo pacman -S appmenu-gtk-module
yay -S apple_cursor
sudo pacman -S skanlite
yay -S axel
- 商店地址: https://store.kde.org/p/2132512
- 源码地址: https://github.com/HimDek/Utterly-Round-Plasma-Style/tree/master/aurorae/dark/translucent
- 商店地址: https://store.kde.org/p/2132516
- 源码地址: https://github.com/HimDek/Utterly-Round-Plasma-Style/tree/master/aurorae/dark/solid
sudo pacman -S gparted
对
cp
和mv
命令增强,添加进度条
- 源码
- 安装
yay -S advcpmv
- 覆盖原生的命令
# vim ~/.zshrc 或 vim ~/.bashrc
alias cp='advcp -g -i'
alias mv='advmv -g'
- 源码
- 安装
这是python客户端
sudo pacman -S tldr
- 使用
# 刷新文档缓存
tldr -u
# 查询tar的文档
tldr tar
源码: https://github.com/mltframework/shotcut
安装
yay -S shotcut-git
源码: https://github.com/obsproject/obs-studio
安装
sudo pacman -S obs-studio
find
的替代品,命令行工具
源码: https://github.com/sharkdp/fd
安装
sudo pacman -S fd
源码
安装
slop
是可选自定义位置支持库
sudo pacman -S screenkey slop
官网
https://showmethekey.alynx.one/
源码
安装
sudo pacman -S showmethekey
(1) Orchis-kde
- 地址:
https://github.com/vinceliuice/Orchis-kde.git
- 安装:
./install.sh
(1) Tela-circle-icon-theme
- 地址:
https://github.com/vinceliuice/Tela-circle-icon-theme.git
- 安装:
./install.sh
(1) WhiteSur Cursors
系统设置安装
(2) Apple-cursors
系统设置安装
(1) Utterly Round Dark Solid for Plasma 6
地址:https://store.kde.org/p/2132516
系统设置安装
(2) Utterly Round Dark for Plasma 6
地址:https://store.kde.org/p/2132512
系统设置安装
yay -S otf-apple-sf-pro
yay -S ttf-monaco-nerd-font-git
yay -S ttf-sarasa-gothic-sc
# 原版
yay -S otf-apple-sf-mono
# nerd-fonts 版
yay -S nerd-fonts-sf-mono
# 连体 + nerd-fonts
yay -S nerd-fonts-sf-mono-ligatures
地址: https://github.com/epk/SF-Mono-Nerd-Font
yay -S otf-apple-pingfang
地址: https://github.com/chrismwendt/bront
地址: https://github.com/i-tu/Hasklig
yay -S otf-hasklig
地址: https://github.com/nathco/Office-Code-Pro
yay -S office-code-pro
地址: https://github.com/andreberg/Meslo-Font
yay -S ttf-meslo
地址: https://github.com/rsms/inter/
# 原版
sudo pacman -S inter-font
# nerd-fonts版本
yay -S nerd-fonts-inter
抗锯齿, 字体发虚等方案,将宋体(
SimSun
)替换
新建文件: ~/.config/fontconfig/fonts.conf
创建完后,刷新字体缓存fc-cache -f -v
sudo pacman -S font-manager
在面板显示窗口红绿灯按钮的小组件
yay -S plasma6-applets-window-buttons
在桌面下载小组件Window Buttons Applet 6 Prebuilt
- 安装
# Qt6 版本
sudo mkdir -p /usr/lib/qt6/qml/org/kde/appletdecoration/
sudo cp -r ~/.local/share/plasma/plasmoids/org.kde.windowbuttons/lib/* /usr/lib/qt6/qml/org/kde/appletdecoration/
# Qt5 版本
sudo mkdir -p /usr/lib/qt/qml/org/kde/appletdecoration/
sudo cp -r ~/.local/share/plasma/plasmoids/org.kde.windowbuttons/lib/* /usr/lib/qt/qml/org/kde/appletdecoration/
- 卸载
# Qt6版本
sudo rm -r /usr/lib/qt6/qml/org/kde/appletdecoration/
# Qt5版本
sudo rm -r /usr/lib/qt/qml/org/kde/appletdecoration/
yay -S kwin-scripts-truely-maximized
yay -S plasma6-applets-window-title
-
源码:https://github.com/luisbocanegra/plasma-panel-spacer-extended
-
kde store: https://store.kde.org/p/2128047
-
安装
yay -S plasma6-applets-panel-spacer-extended
yay -S whitesur-gtk-theme-git
sudo pacman -Rcns nano nano-syntax-highlighting
sudo pacman -Rcns okular
在 /etc/NetworkManager/conf.d/
新建任意名称的 .conf
文件, 复制以下内容
例如 wifi_rand_mac.conf
后面的注释项按需开启
[device-mac-randomization]
# 扫描 wifi 时随机化 MAC
wifi.scan-rand-mac-address=yes # no
[connection-mac-randomization]
# 每次通过有线连接时随机化 MAC
ethernet.cloned-mac-address=random # stable
# 每次通过无线连接时随机化 MAC
wifi.cloned-mac-address=random # stable
- 重启网络管理器
sudo systemctl restart NetworkManager
关键字:网络连接受限、TUN 模式
参考地址:https://wiki.archlinuxcn.org/wiki/NetworkManager
在 /etc/NetworkManager/conf.d
目录下创建文件 20-connectivity.conf
, 内容如下:
[connectivity]
#uri=http://nmcheck.gnome.org/check_network_status.txt
enabled=false
- 重启网络管理器
systemctl restart NetworkManager
- 安装贡献包:
sudo pacman -Syu pacman-contrib
- 清除 AUR 软件包构建:
makepkg -cCf
- 创建
.SRCINFO
文件:makepkg --printsrcinfo > .SRCINFO
- AUR 包模拟安装:
makepkg -si
- 更新 AUR 包中的 checksums:
updpkgsums
或makepkg -f -g
- 跳过 checksums: 更改为
SKIP
或makepkg --skipchecksums -si
支持安装
.cer
和.pem
格式证书文件
安装证书命令文档 update-ca-trust -h
- 安装
以
charles
证书为例
创建证书目录
sudo mkdir /usr/share/ca-certificates/trust-source/charles
# 将证书源文件 🔗 到证书安装目录
sudo ln -sf ~/.charles/ca/charles-proxy-ssl-proxying-certificate.cer /usr/share/ca-certificates/trust-source/charles/root.cer
# 安装证书
sudo update-ca-trust extract
# [可选] 验证证书文件是否正确
openssl verify -CAfile /etc/ssl/certs/ca-certificates.crt /usr/share/ca-certificates/trust-source/charles/root.cer
手动编译安装:
cd ${HOME}/.cache/yay/软件包
makepkg -si --skipchecksums