(I know, I know, I'm trying to stay distracted on this big Election day!) Here are some notes on getting Ubuntu to work well with Windows for Linux.
The first thing to note is that the user system is completely separate between Windows and Ubuntu. And that while you can search for Ubuntu as an application, the easiest thing to do is:
- Ubuntu2004.exe. This is the command line way to get into Ubuntu. This works in Powershell or anywhere else.
- There is the concept of default user for when you start Ubuntu so you don't have to type a user name and password. This is *not* your Windows login, but is typically the same user name, but the same password. It's easy to forget it when you don't put it into 1Password.
- If you do forget, then the command at the PowerShell
ubuntu2004.exe config --user rootis the way to change it to root so that you can bypass all security.
- From there, it's easy to add password sudo with
gpasswd your_user_name sudoand then do a
sudo visudoand then correct the sudo group line at the end from
NOPASSWORD:ALLso that you don't need passwords anymore.
- If you really have forgotten the password then from root you can run
- And then change the default user name back to
ubuntu2004.exe config --user your_user_name