Skip to content

Commit 96a0dde

Browse files
committed
docs: add distro/arch
1 parent 0c5123b commit 96a0dde

File tree

1 file changed

+62
-1
lines changed

1 file changed

+62
-1
lines changed

docs/distro/arch.md

+62-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ $ sudo pacman -Ss vlc
2525
`-Si`用来获取软件包的详细信息。
2626

2727
```bash
28-
pacman -Si nginx
28+
$ pacman -Si nginx
2929
```
3030

3131
`-S`用来安装软件包。
@@ -115,6 +115,67 @@ $ sudo pacman -Sc
115115
$ sudo pacman -Scc
116116
```
117117

118+
## AUR 软件仓库
119+
120+
AUR (Arch User Repository)是 Arch 的非官方软件仓库,官方不负责维护,由网友维护。
121+
122+
这时可以安装 yay,帮助管理 AUR 软件包。
123+
124+
```bash
125+
$ sudo pacman -S git base-devel
126+
$ git clone https://aur.archlinux.org/yay-bin.git
127+
$ cd yay-bin
128+
$ makepkg -si
129+
```
130+
131+
然后,使用下面的命令,查看是否安装成功。
132+
133+
```bash
134+
$ yay --version
135+
```
136+
137+
`-Ss`用来搜索软件包,这会同时包括官方仓库和 AUR。
138+
139+
```bash
140+
$ yay -Ss dash-to-dock
141+
```
142+
143+
如果只在 AUR 搜索,`-Ss`都不需要。
144+
145+
```bash
146+
$ yay dash-to-dock
147+
```
148+
149+
`-S`用来安装软件包。
150+
151+
```bash
152+
$ yay -S gnome-shell-extension-dash-to-dock
153+
```
154+
155+
`-Sua`用来更新所有已经安装的 AUR 软件包。
156+
157+
```bash
158+
$ yay -Sua
159+
```
160+
161+
`-Ps`用来查看系统统计信息。AUR 下载所有软包都保存在目录`~/.cache/yay/`
162+
163+
```bash
164+
$ yay -Ps
165+
```
166+
167+
`-Sc`用来清除已经下载的 AUR 文件。
168+
169+
```bash
170+
$ yay -Sc
171+
```
172+
173+
`-Scc`用来删除所有不需要的依赖项以及所有缓存的包文件。
174+
175+
```bash
176+
$ yay -Scc
177+
```
178+
118179
## 选择下载镜像
119180

120181
软件工具 Reflector 可以选择下载速度最快的软件仓库。

0 commit comments

Comments
 (0)