window里的wsl,root密码

window wsl相关配置
1.查看当前系统安装的linux:  
  PS C:\> wslconfig /l
  适用于 Linux 的 Windows 子系统:
  Ubuntu (默认)
2.查看ubuntu的配置帮助
  PS C:\> ubuntu /h
  Launches or configures a Linux distribution.
  Usage:
      <no args>
          Launches the user's default shell in the user's home directory.
      install [--root]
          Install the distribuiton and do not launch the shell when complete.
            --root
                Do not create a user account and leave the default user set to root.
      run <command line>
          Run the provided command line in the current working directory. If no
          command line is provided, the default shell is launched.
      config [setting [value]]
          Configure settings for this distribution.
          Settings:
            --default-user <username>
                Sets the default user to <username>. This must be an existing user.
      help
          Print usage information.
3.注:当wsl里的root密码忘了时,以管理员身份打开cmd或powershell:
  PS C:\> ubuntu config --default-user root
  PS C:\> wsl
  root@universe:/mnt/c# passwd
  Enter new UNIX password:

转载于:https://www.cnblogs.com/ITKing9/p/10912349.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值