If you receive the error message bash: visudo: command not found
when trying to run the visudo command in
a Linux shell, it indicates that the sudo package is not installed. This error can be resolved by running the following command
$ apt update
$ apt install sudo
These commands first update the system package list ( apt update)
and then install the sudo package ( apt install sudo)
. This will make sudo related commands available, including the visudo command
.