HKL's Notes
N/A C.V. · Linkedin · Github


在Windows10 Bash中默认启动其他shell

By , on , tagged: 🏷️Operating  🏷️Windows 

首先,通过apt安装其他shell软件

(以fish为例)

sudo apt install fish img

安装之后使用fish命令尝试启动。能成功启动则继续下一步。

设置shell默认启动

由于Windows10 Bash是通过在命令行中bash命令直接启动Linux的Bash软件,可通过修改.bashrc文件使得fish等shell默认启动。 通过在用户目录~中编辑.bashrc文件。

vim .bashrc img

并在配置文件首部分加入一下配置信息:

# Launch fish
if [ -t 1 ]; then
    exec fish
fi

img

保存文件后推出Bash并重启即可。 img


选编自:https://www.howtogeek.com/258518/how-to-use-zsh-or-another-shell-in-windows-10/



Articles are licensed under CC BY-NC 4.0