Tag Archives: bash: sudo: command not found

Bash: sudo: command not found when sudo is used in the docker container

terms of settlement:

Check the Linux system version first:

cat /proc/version

1. RedHat mainly includes RedHat, Fedora, CentOS, etc;

The package management tool of RedHat series is Yum and up2date

yum install sudo -y

 

2. Debian system mainly includes Debian, Ubuntu, mint and their derivatives;

The package management tool of Debian series is apt get, which executes

apt-get update

apt-get install sudo

 

Win sudo plug-in solves the problem of GIT bash execution script error bash: sudo: command not found

Windows git bash has no sudo command by default. You can add win sudo plug-in to realize this function

curl -s https://raw.githubusercontent.com/imachug/win-sudo/master/install.sh | sh

If the above command doesn’t work, you can copy it https://raw.githubusercontent.com/imachug/win-sudo/master/install.sh Then bash install. SH is executed