git bash | bash:sudo:找不到命令(和其他)

发布于 2025-02-11 09:53:04 字数 700 浏览 0 评论 0原文

目标:诗歌工作。

使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

ゞ记忆︶ㄣ 2025-02-18 09:53:04

如@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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文