More tips on using Ubuntu 20.04 on Windows

(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:

  1. Ubuntu2004.exe. This is the command line way to get into Ubuntu. This works in Powershell or anywhere else.
  2. 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.
  3. If you do forget, then the command at the PowerShell ubuntu2004.exe config --user root is the way to change it to root so that you can bypass all security.
  4. From there, it’s easy to add password sudo with gpasswd your_user_name sudo and then do a sudo visudo and then correct the sudo group line at the end from ALL to NOPASSWORD:ALL so that you don’t need passwords anymore.
  5. If you really have forgotten the password then from root you can run passwd your_user_name
  6. And then change the default user name back to ubuntu2004.exe config --user your_user_name

I’m Rich & Co.

Welcome to Tongfamily, our cozy corner of the internet dedicated to all things technology and interesting. Here, we invite you to join us on a journey of tips, tricks, and traps. Let’s get geeky!

Let’s connect