简体   繁体   中英

Git Bash | bash: sudo: command not found (and others)

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM