首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >Windows上的Ubuntu上的Bash未启动

Windows上的Ubuntu上的Bash未启动
EN

Stack Overflow用户
提问于 2017-05-18 21:26:22
回答 11查看 57.5K关注 0票数 24

所以,我在Ubuntu on Windows (WSL)上使用新的Bash已经有一段时间了,直到昨天,一切都是一流的。

我无意中从Bash推送了git,所以它像往常一样要求我提供我的repo-destination帐户详细信息。我决定忽略这一点,终止Bash,并尝试只使用powershell (永远记不住密码!)。但是,终止Bash会导致shell冻结。我强制关闭并重新启动了我的comp (之前由于各种原因,我不得不强制关闭并重新启动了几次,一切都很好)。

启动后,我只是试着检查Bash是否能再次工作,但它不能,它只是启动失败,没有错误信息。例如:

代码语言:javascript
运行
复制
PS C:\WINDOWS\system32> bash
PS C:\WINDOWS\system32>

其他人有过类似的情况/知道如何帮助他们吗?

编辑:只能通过重装bash来解决,使用

代码语言:javascript
运行
复制
    lxrun /uninstall /full

然后

代码语言:javascript
运行
复制
    lxrun /install 
EN

Stack Overflow用户

发布于 2018-05-27 03:29:02

请看我对原帖的评论。你的解决办法对我不起作用。以下是作为管理员的PowerShell列表: Windows PowerShell版权所有(C) Microsoft Corporation。版权所有。

代码语言:javascript
运行
复制
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>

我去了https://aka.ms/wslstore

  • 选择ubuntu
  • it

'pin to start‘

  • 点击’启动‘

Ubuntu窗口

代码语言:javascript
运行
复制
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:

代码语言:javascript
运行
复制
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$

至少它起作用了。

票数 0
EN
查看全部 11 条回答
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/44049070

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档