A new site for my ramblings
Home | Up |
From time to time you might come across a terminal instance that when launched has a fault with running sudo. So as you do not have the root password, how do you get in as root?
As this is being run by WSL, not docker, you need to use WSL commands.
wsl --list
.wsl --user root --distribution mydistro
.For example, make sure sudo is installed and your default user has full access.
> wsl --user root --distribution RockyLinux-9-Base
# dnf install sudo
# usermod -aG wheel myuser
# exit