所以,我在Ubuntu on Windows (WSL)上使用新的Bash已经有一段时间了,直到昨天,一切都是一流的。
我无意中从Bash推送了git,所以它像往常一样要求我提供我的repo-destination帐户详细信息。我决定忽略这一点,终止Bash,并尝试只使用powershell (永远记不住密码!)。但是,终止Bash会导致shell冻结。我强制关闭并重新启动了我的comp (之前由于各种原因,我不得不强制关闭并重新启动了几次,一切都很好)。
启动后,我只是试着检查Bash是否能再次工作,但它不能,它只是启动失败,没有错误信息。例如:
PS C:\WINDOWS\system32> bash
PS C:\WINDOWS\system32>
其他人有过类似的情况/知道如何帮助他们吗?
编辑:只能通过重装bash来解决,使用
lxrun /uninstall /full
然后
lxrun /install
发布于 2018-05-27 03:29:02
请看我对原帖的评论。你的解决办法对我不起作用。以下是作为管理员的PowerShell列表: Windows PowerShell版权所有(C) Microsoft Corporation。版权所有。
PS C:\WINDOWS\system32> lxrun /uninstall /full
Warning: lxrun.exe is only used to configure the legacy Windows Subsystem for Linux distribution.
Distributions can be installed by visiting the Microsoft Store:
https://aka.ms/wslstore
This will uninstall Ubuntu on Windows.
This will remove the Ubuntu environment as well as any modifications, new applications, and user data.
Type "y" to continue: y
Uninstalling...
Error: 0x80070002
PS C:\WINDOWS\system32>
'pin to start‘
Ubuntu窗口
Installing, this may take a few minutes...
Please create a default UNIX user account. The username does not need to match your Windows username.
For more information visit: https://aka.ms/wslusers
Enter new UNIX username: joe
Enter new UNIX password: joepw202
Installing, this may take a few minutes...
Please create a default UNIX user account. The username does not need to match your Windows username.
For more information visit: https://aka.ms/wslusers
Enter new UNIX username: joe
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Installation successful!
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.
joe@joethinks:~$
请注意:BUMMER!我的快捷方式或安装程序都没有从上一个版本中迁移过来。下面我从vscode运行BASH:
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.
joe@joethinks:/mnt/c/1d/TrinitySundayMusicPj$ cdtsm
cdtsm: command not found
joe@joethinks:/mnt/c/1d/TrinitySundayMusicPj$ cd trinitySundayMusic
joe@joethinks:/mnt/c/1d/TrinitySundayMusicPj/trinitySundayMusic$ node wizard.js
The program 'node' is currently not installed. You can install it by typing:
sudo apt install nodejs-legacy
joe@joethinks:/mnt/c/1d/TrinitySundayMusicPj/trinitySundayMusic$
至少它起作用了。
https://stackoverflow.com/questions/44049070
复制相似问题