Skip to content

Commit

Permalink
docs(intro): 增加使用 chsh 改变默认 shell
Browse files Browse the repository at this point in the history
  • Loading branch information
ruanyf committed May 28, 2024
1 parent d8235c6 commit b9de332
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions docs/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,22 @@ $ cat /etc/shells

Linux 允许每个用户使用不同的 Shell,用户的默认 Shell 一般都是 Bash,或者与 Bash 兼容。

使用`chsh`命令,可以改变系统的默认 Shell。举例来说,要将默认 Shell 从 Bash 改成 Fish,首先要找出 Fish 可执行文件的位置。

```bash
$ which fish
```

上面命令找出 Fish 可执行文件的位置,一般是`/usr/bin/fish`

然后,使用`chsh`命令切换默认 Shell。

```bash
$ chsh -s /usr/bin/fish
```

上面命令会将当前的默认 Shell 改成 Fish。

## 命令行环境

### 终端模拟器
Expand Down

0 comments on commit b9de332

Please sign in to comment.