Home > front end >  Git Bash | bash: sudo: command not found (and others)
Git Bash | bash: sudo: command not found (and others)

Time:07-02

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.

CodePudding user response:

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.

  • Related