重设windows10中的子linux系统密码

  1. Run bashand make a note of your Linux username (this need not match your Windows username)
  2. In Windows admin command prompt (Super+XA) change the default user to root:

    lxrun /setdefaultuser root
    
  3. Now Bash on Ubuntu on Windows logs you in as root without asking password

  4. Use passwd command in Bash to change the user password:

    passwd your_username
    
  5. Change the default user back to your normal user in Windows command prompt

    lxrun /setdefaultuser your_username

From http://askubuntu.com/questions/772050/reset-the-password-in-linux-bash-in-windows

posted @ 2017-03-25 07:55  白天黑夜每日c  阅读(2753)  评论(1编辑  收藏  举报