change or reset WSL password

To change or reset your password, open the Linux distribution and enter the command: passwd. You will be asked to enter your current password, then asked to enter your new password, and then to confirm your new password.

If you forgot the password for your Linux distribution:

  1. Open PowerShell and enter the root of your default WSL distribution using the command: wsl -u root

    If you need to update the forgotten password on a distribution that is not your default, use the command: wsl -d Debian -u root, replacing Debian with the name of your targeted distribution.

  2. Once your WSL distribution has been opened at the root level inside PowerShell, you can use this command to update your password: passwd <username> where <username> is the username of the account in the distribution whose password you've forgotten.

  3. You will be prompted to enter a new UNIX password and then confirm that password. Once you're told that the password has updated successfully, close WSL inside of PowerShell using the command: exit.

References

Best practices for setting up a WSL 2 development environment | Microsoft Docs

change or reset WSL password的更多相关文章

  1. mysql5.7初始化密码报错 ERROR 1820 (HY000): You must reset your password using ALTER USER statement before

    mysql初始化密码常见报错问题1,mysql5.6是密码为空直接进入数据库的,但是mysql5.7就需要初始密码 cat /var/log/mysqld.log | grep password1 2 ...

  2. 【mysql】must reset your password using ALTER USER statement before executing this statement

    问题描述: must reset your password using ALTER USER statement before executing this statement 登录centos服务 ...

  3. You must reset your password using ALTER USER statement before executing this statement.

    MySQL 5.7之后,刚初始化的MySQL实例要求先修改密码.否则会报错: mysql> create database test; ERROR 1820 (HY000): You must ...

  4. 第一次登录mysql,使用任何命令都报错ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.

    问题: 使用临时密码登录成功后,使用任何myql命令,例如show databases;都提示下面的报错 ERROR 1820 (HY000): You must reset your passwor ...

  5. Proxmox Reset Root Password

    http://c-nergy.be/blog/?p=1777 Step 1 – Boot your Proxmox VE machine. In the boot menu screen, you s ...

  6. MySQL用户密码过期登陆报错ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.

    今天接到主从复制失败告警,查看MySQL,发现MySQL能够登陆但是执行命令报错, ERROR 1820 (HY000): You must reset your password using ALT ...

  7. MySQL root账户密码设为“root”后执行命令提示ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.

    修改root账户密码为“root”后,提示ERROR 1820 (HY000): You must reset your password using ALTER USER statement bef ...

  8. MySQL:ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.

    解决方法: 修改密码:alter user 'root'@'localhost' identified by '123456'; mysql> use mysql; ERROR 1820 (HY ...

  9. You must reset your password using ALTER USER

    mac mysql error You must reset your password using ALTER USER statement before executing this statem ...

随机推荐

  1. Android Jetpack基本架构之ViewModel+LiveData+DataBinding入门

    前提:导入所有依赖,开启DataBinding app的build.gradle android { defaultConfig { ... dataBinding { enabled true } ...

  2. 堆栈相关的经典题(c++)

    1.定义队列 typedef struct node{ int data; struct node * next; }Node; typedef struct linkQueue { Node * f ...

  3. Java 学习:数据类型

    前言:Java属于强类型语言 强类型语言:要求变量的使用要严格符合规定,所有变量都必须先定义后才能使用 优势就是安全性高,但劣势速度慢 数据类型 Java的数据类型分为两大类: 基本类型(primit ...

  4. 【曹工杂谈】详解Maven插件调试方法

    前言 今年的更新频率简直是降至冰点了,一方面平时加班相对多一些了,下班只想玩手机:另一方面,好像进了大厂后,学习动力也很低了,总之就,很懒散,博客的话,今年都才只更新了不到5篇. 现在慢慢有一点状态, ...

  5. hibernate关联关系(一对多)

    什么是关联(association)关联指的是类之间的引用关系.如果类A与类B关联,那么被引用的类B将被定义为类A的属性.例如: class B{ private String name; } pub ...

  6. [源码解析] 深度学习流水线并行 PipeDream(6)--- 1F1B策略

    [源码解析] 深度学习流水线并行 PipeDream(6)--- 1F1B策略 目录 [源码解析] 深度学习流水线并行 PipeDream(6)--- 1F1B策略 0x00 摘要 0x01 流水线比 ...

  7. Vue组件传值(一)之 父子之间如何传值

    Vue中组件之间是如何实现通信的? 1.父传子: 父传子父组件通过属性进行传值,子组件通过 props 进行接受: 1 父组件中: 2 3 <template> 4 <div id= ...

  8. Elasticsearch-head插件的安装与配置

    第一种: 通过浏览器添加插件 通过chrome安装插件的方式提供一个可操作es的图形化界面. 在chrome 浏览器中,通过"扩展程序" 添加 elasticsearch head ...

  9. Android学习记录(二)——第一次hello world及遇到的gradle安装问题

    开始一个简单的hello world项目,简单了解Android studio的使用方法 第一步,打开Android studio,点击Create New Project 第二步,选择需要的模板 T ...

  10. Shell系列(36)- for循环语法二简介及批量添加删除用户

    for循环语法二 for ((初始值;循环控制条件;变量变化)) do 程序 done 例子 例子-1 求和工具 需求:根据用户输入的数字,求1~输入所有数字的和 脚本: #!/bin/bash re ...