Off-topic: Ubuntu starting as default to root

Problem

If you are using WSL or Linux-based distribution (i.e Ubuntu) on Windows OS, sometimes you start Ubuntu and it defaults to the root user. I found one of many solutions that work like magic.

Solution:

Each time it happens, simply do the following:

  • Start Powershell as admin. To do this, right-click on the PowerShell application, and you will see the option to run as administrator. Click on it.

  • Edit and paste the following command in the terminal. Replace the distro version with the version of Ubuntu you have installed on your machine. For me, I have Ubuntu20.04.06 installed. Ignore the last two digits, and replace the last arguments with the username you have set when you first configure Ubuntu. For me, I used bobelr. Replace it with your username.

 ubuntu2004.exe config --default-user bobelr
  • Run this in Powershell, then
  • Launch Ubuntu.

Ubuntu should now start with the custom user as default.

How will this help me

As a Celo developer, you’re most likely to work with Linux OS or WSL on Windows such as when analyzing smart contracts using security tools like Securify or Slither. These tools work well and efficiently on Linux OS. If you’re a Windows user, you’re most likely to encounter this type of issue if you’re using WSL.

16 Likes

This is a great contribution to the community✨.

2 Likes

Thanks so much for this info

2 Likes

Nice contribution @bobelr

4 Likes

Thank you @Samuel_Okoro

6 Likes

You’re welcome @jimohyusufolatunji4

9 Likes