目标:让诗歌发挥作用。
在 Windows 10 上使用 Git Bash 和 WSL 2。
我的 Anaconda3 和 Git 正在运行。
pip install bash
有效,但没有帮助。
Git bash :
(base)
HDS+dabell@PF2DCSXD MINGW64 ~
$ sudo -s
bash: sudo: command not found
(base)
HDS+dabell@PF2DCSXD MINGW64 ~
$ su -
bash: su: command not found
(base)
HDS+dabell@PF2DCSXD MINGW64 ~
$ apt update
bash: apt: command not found
(base)
HDS+dabell@PF2DCSXD MINGW64 ~
$ apt install sudo -y
bash: apt: command not found
(base)
HDS+dabell@PF2DCSXD MINGW64 ~
$ cat ~/.bashrc
. /c/Users/dabell/Anaconda3/etc/profile.d/conda.sh
(base)
这些命令适用于 WSL 2。
最佳答案
正如 @tkausl 所说,Git Bash 不附带此类命令。
我还在 Stack Overflow 上发现了类似的帖子,top answer表述相同。
关于bash - Git bash | bash : sudo: command not found (and others),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/72798227/