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

打开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子系统,然后再试一遍吧。

linux装完windows时间长,重装Windows 10上的Linux子系统相关推荐

  1. linux服务器关闭蜂鸣报警,在Windows 10上禁用Linux Bash的蜂鸣声

    在Windows 10上禁用Linux Bash的蜂鸣声 在Windows 10上安装Linux Bash非常酷,但就我从微软提供的不太好的终端而言,我将陷入Ubuntu的困境. 无论如何,当你在Ba ...

  2. ipad上linux终端,如何使用iSH在iPad或iPhone上获取Linux Shell

    您是否曾经希望在iPad或iPhone上安装Linux命令行?使用iSH,您可以非常接近实现该目标.iSH Shell是适用于iOS的Linux Shell,它使用x86模拟器在iPad或iPhone ...

  3. linux运行U盘,构建运行在U盘上的LINUX系统

    构建运行在U盘上的LINUX系统 一 背景 在wireless projector项目中需要构建一个图形linux系统,由于嵌入式系统的存储空间太小,所以通过USB口挂接USB存储设备扩展空间,我们的 ...

  4. linux下intel安装教程,在 Ubuntu 15.10 上安装 Intel Graphics 安装器

    Intel 最近发布了一个新版本的 Linux Graphics 安装器.在新版本中,将不支持 Ubuntu 15.04,而必须用 Ubuntu 15.10 Wily. Linux 版 Intel® ...

  5. linux开机黑屏时间长,Linux 开机进入紧急模式,出现黑屏 grub 的参考解决方案

    前言 本文记录了一次由于 Win10 系统更新,导致 Manjaro 系统出现黑屏 Grub,最后成功抢修的记录,给遇到同样问题的人一个参考 起因 在一次 Win10 更新后,再次尝试进入 Manja ...

  6. linux显卡驱动运行情况,Linux装完显卡驱动后分辨率显示不正常的解决方法

    不少人在更新完Linux显卡驱动后,出现分辨率显示不正常的现象,遇到这类问题不用担心,下面小编就教你如何解决Linux显卡驱动安装后分辨率无法正常显示的问题,一起来学习下吧. 驱动安装: 这里得说明一 ...

  7. linux系统分辨率没有,Linux装完显卡驱动后分辨率无法正常显示怎么办?

    不少人在更新完Linux显卡驱动后,出现分辨率显示不正常的现象,遇到这类问题不用担心,下面小编就教你如何解决Linux显卡驱动安装后分辨率无法正常显示的问题,一起来学习下吧. 驱动安装: 这里得说明一 ...

  8. linux 装完yum不能用,解决yum不能正常使用的问题

    解决yum不能正常使用的问题 问题1 Another app is currently holding the yum lock; waiting for it to exit... The othe ...

  9. linux开机黑屏时间长,Ubuntu启动长时间黑屏解决方案

    虽然不知道这是不是Ubuntu的通病,不过从10版本后很多机器都会出现Ubuntu启动过程中一直黑屏直到登录画面,中间显示器一点反应没有,根本看不到发生了什么,让人很难受.造成这种情况的原因主要是安装 ...

最新文章

  1. Oracle笔记 六、PL/SQL简单语句块、变量定义
  2. MYSQL5.7版本sql_mode=only_full_group_by问题
  3. android 调用默认铃声后怎么改起始的默认选择位置?
  4. 机器人出魔切还是三相_哇!电站凝汽器清洗居然可以用机器人啦
  5. .config 和 kconfig以及 makefile的关系
  6. 为什么vsdebug没有生成obj文件_用iPad实时扫描生成模型??两款实用App
  7. 牛客小白月赛9 A签到(乘法逆元)
  8. CCPC-Wannafly Comet OJ 夏季欢乐赛(2019)E
  9. 三分钟看Netty(3) select poll VS epoll
  10. Silverlight读取Zip文件中的图片与视频
  11. Mac安装和配置Tomcat的教程
  12. Ajax请求生成中文乱码问题
  13. linux下redis安装教程
  14. php读取excel 报错_PHP读取Excel里的文件
  15. mysql median_在MySQL中使用MEDIAN和MAX,MIN和AVG功能
  16. win7老计算机,windows7旗舰版系统电脑老是自动重启的原因汇总
  17. AMD CEO辞职令业内震惊:邓元鋆有点尴尬
  18. 信息熵与信息增益的概念
  19. 编写的activeX 控件如何被IE调用?
  20. MySQL入门语法(视频学习笔记)

热门文章

  1. LeetCode——树:递归
  2. JVM之GCRoots概述
  3. Nginx 模块开发
  4. raft算法动画演示
  5. java.lang.IllegalArgumentException: requirement failed: No output operations registered, so nothing
  6. leetcode 782. Transform to Chessboard | 782. 变为棋盘(Java)
  7. leetcode 332. Reconstruct Itinerary | 332. 重新安排行程(Java)
  8. JVM从入门到精通(一):JVM入门级class文件格式
  9. 【MIPS汇编】ADDI,ADDIU,ADD,ADDU的区别、有符号无符号的谬误
  10. Pandas高级教程之:处理text数据