---
title: "Reset Password on WSL2"
date: 2020-05-20T19:20:49.000Z
author: Z.SHINCHVEN
tags: [WSL2, Ubuntu, password]
canonical: https://atlassc.net/2020/05/21/wsl2-reset-password
---
It is tricky and easy to reset password on WSL2.

To do that, first of all, you need to set login as root by default:

```PowerShell
ubuntu config --default-user root
```

Then change your password as root:

```PowerShell
passwd <YOUR_USERNAME>
```

Change the password of root, of course:

```PowerShell
passwd
```

In the end, change the default user of WSL2 back to your own username:

```PowerShell
ubuntu config --default-user <YOUR_USERNAME>
```
