git bash | bash:sudo:找不到命令(和其他)
目标:诗歌工作。
使用 git bash 在 Windows 10 上使用 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中起作用。
Goal: get Poetry working.
Using Git Bash on Windows 10 with WSL 2.
I have Anaconda3 and Git working.
pip install bash
worked but did not help.
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)
These commands work in WSL 2.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如@tkausl所述, git bash不带有这样的命令。
我还在堆栈溢出上找到了类似的帖子,最佳答案表示相同。
As stated by @tkausl, Git Bash does not come with such commands.
I've also found a similar post on Stack Overflow, the top answer stating the same.