重装Windows10上的Linux子系统-创新互联

之前听说Windows 10上面可以装Linux了,一时兴起,就捣鼓了起来,长时间不用了,结果又忘记root密码。哎,老了,记不住事情了。所以就上网查了一下如何卸载Linux子系统,再写一篇笔记吧,免得以后又忘记了。

创新互联公司是一家专注于成都做网站、网站制作、成都外贸网站建设与策划设计,薛城网站建设哪家好?创新互联公司做网站,专注于网站建设10多年,网设计领域的专业建站公司;建站业务涵盖:薛城等地区。薛城做网站价格咨询:13518219792

打开CMD,输入lxrun,就会提示这条命令的使用方法,见下:

C:\Users\admin>lxrun
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

Usage:
    /install - Installs the subsystem
        Optional arguments:
            /y - Do not prompt user to accept or create a subsystem user
    /uninstall - Uninstalls the subsystem
        Optional arguments:
            /full - Perform a full uninstall
            /y - Do not prompt user to confirm
    /setdefaultuser - Sets the default subsystem user. If the user account does not exist it will be created.
        Optional arguments:
            username - Supply the username
            /y - If username is supplied, do not prompt to create a password

输入:lxrun /uninstall 就可以开始卸载原来的Linux子系统了。

C:\Users\admin>lxrun /uninstall
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 and new applications with the exception of:

C:\Users\admin\AppData\Local\lxss\home
C:\Users\admin\AppData\Local\lxss\root

Type "y" to continue: y
Uninstalling...

再输入bash查看一下,验证Ubuntu已经被卸载。

C:\Users\admin>bash
Windows Subsystem for Linux has no installed distributions.
Distributions can be installed by visiting the Microsoft Store:
https://aka.ms/wslstore
Press any key to continue...

接下来安装Ubuntu Linux,输入命令:lxrun /install

C:\Users\admin>lxrun /install
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 install Ubuntu on Windows, distributed by Canonical and licensed under its terms available here:
https://aka.ms/uowterms

Type "y" to continue: y
Downloading from the Microsoft Store... 100%
Extracting filesystem, this will take a few minutes...
Error: 0x800706ba

擦,有Error,本机电脑没有权限?查了一下,我确实没有admin权限。但是我重试了一下,结果这次成功了。

不过又在网上查了一下,如果你重试了,还是不行,请参考下面的方法有可能解决你的安装失败问题:
在下面的启用或关闭Windows功能里启用适用于Linux的Windows子系统,然后再试一遍吧。
重装Windows 10上的Linux子系统

重装Windows 10上的Linux子系统

重装Windows 10上的Linux子系统

另外有需要云服务器可以了解下创新互联scvps.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。


当前文章:重装Windows10上的Linux子系统-创新互联
转载源于:http://cdiso.cn/article/dhjhjd.html

其他资讯