# bash，zsh等shell

termux默认使用bash做为shell。

**bash**:

默认启动脚本：.bashrc

bash输入历史：.bash\_history

使用命令`hsitory`也可以查看自己的输入历史

按tab键可以补全命令，按向上或者向下的方向键，选择输入历史。

![tab](https://cdn.jsdelivr.net/gh/zsxwz/tuchuang@latest/2020/09/08/5f202f0036ecae12d19c5c3364287658.png)

可以自己添加按键：

```
vim ～/.termux/termux.properties

# 添加
extra-keys = [['ESC','/','-','HOME','UP','END','PGUP','[',']'],['TAB','CTRL','ALT','LEFT','DOWN','RIGHT','PGDN','$','&']]
```

![termux](https://cdn.jsdelivr.net/gh/zsxwz/tuchuang@latest/2020/09/08/8339b6ed0ebdd89f8c9d8eec629e27d5.png)

除了使用bash还可以使用fish或者zsh。

**zsh**:

```
# 安装
pkg install zsh

# 切换到zsh
chsh -s zsh
# 切换会bash
chsh -s bash
```

和bash一样

默认启动脚本：.zshrc

zsh输入历史：.zsh\_history

使用命令`hsitory`也可以查看自己的输入历史

按tab键可以补全命令，按向上或者向下的方向键，选择输入历史。

zsh的主题和插件还是很多的，zsh美化可以参考：

<https://bbs.zsxwz.com/thread-2984.htm>

[powerlevel10k打造一个好看的终端](https://zsxwz.com/2020/08/12/powerlevel10k%e6%89%93%e9%80%a0%e4%b8%80%e4%b8%aa%e5%a5%bd%e7%9c%8b%e7%9a%84%e7%bb%88%e7%ab%af/)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://termux-wiki.zsxwz.com/bashzsh-deng-shell.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
