Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 672
DanielBell99 Avatar asked Sep 11 '25 12:09

DanielBell99


1 Answers

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.

like image 110
DanielBell99 Avatar answered Sep 13 '25 04:09

DanielBell99