add some cmds

This commit is contained in:
shzhxh 2021-06-19 10:24:44 +08:00
parent 6f7aaab684
commit 54227e2b56
3 changed files with 51 additions and 0 deletions

View File

@ -65,6 +65,8 @@ $ # 变量参数
# 逻辑运算
-a且-o或&&且, ||或
# -a或-o用在[]里
# &&或||用在[[]]里
```
#### 条件控制

View File

@ -0,0 +1,43 @@
#### 简介
建立基本的debian系统。
```bash
debootstrap [options] <suite> <target> [mirror [script]]
# suite : debian的版本号可以是释放代码的名字(如sid, stretch, jessie)或符号名(如unstable, testing, stable, oldstable)
# target : 安装debian的目录
# mirror : debian的镜像源
# script : 安装脚本
debootstrap [options] --second-stage # 完成创建过程
```
#### 选项
```
--arch=<ARCH> #
--include=<alpha, beta> #
--exclude
--components
--no-check-gpg # 不检查gpg签名
--no-resolve-deps
--variant=
```
#### 示例
```bash
# 创建riscv64的chroot环境
sudo apt-get install debootstrap qemu-user-static binfmt-support debian-ports-archive-keyring
sudo debootstrap --arch=riscv64 --keyring /usr/share/keyrings/debian-ports-archive-keyring.gpg --include=debian-ports-archive-keyring unstable /tmp/riscv64-chroot http://deb.debian.org/debian-ports
```
#### 错误解决
##### 1 Cannot check Release signature
使用`--no-check-gpg`选项不检查gpg签名
##### 2 Failed getting release file

View File

@ -0,0 +1,6 @@
```
complete [options] [names] # 对于每个name定义参数补全的方式。
-F <function> # 通过执行函数生成补全内容
-o <option> # 如果定义的补全规则没有匹配成功,则使用此选项给出的补全规则
```