`

How to Uninstall (or Reinstall) Windows 10’s Ubuntu Bash Shell

 
阅读更多

How to Uninstall (or Reinstall) Windows 10’s Ubuntu Bash Shell

Windows 10’s new Ubuntu-based Bash shell doesn’t function like a normal program. To uninstall it or reset its state to get a fresh Linux environment, you’ll need to use a few special commands.

All of the below commands can either be run in a Command Prompt window or a PowerShell window.

Right-click the Start button or press Windows+X on your keyboard and select “Command Prompt” to open a Command Prompt window. If you’d like to use PowerShell instead, you can launch PowerShell from the Start menu.

<iframe id="aswift_0" style="left: 0px; position: absolute; top: 0px;" name="aswift_0" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" width="650" height="141"></iframe>

How to Uninstall the Ubuntu Environment and Keep Your Home Folder

To remove the downloaded Bash environment, open a Command Prompt window and run the following command. This will uninstall and delete the Ubuntu user environment from your system, including any Linux applications you downloaded and installed with apt-get or by compiling them from source.

lxrun /uninstall

Windows will ask you to confirm your choice. To automatically accept the confirmation–ideal if you want to use this command in a script, for example–run the lxrun /uninstall /y command instead.

This command won’t delete your home folder and the files in it. If you’d like to completely wipe the Linux system, see the next section.

How to Uninstall the Ubuntu Environment and Delete Your Home Folder

The above command won’t delete your Ubuntu user account’s home folder. The home folder contains user preferences and files. If you install a new Ubuntu user space image, the files in your home folder will be preserved and carried over.

If you want to prevent this from happening, you’ll need to remove the downloaded Bash environment and completely wipe your home folder. To do so, run the following command:

lxrun /uninstall /full

You’ll be asked to confirm your choice. To automatically accept the confirmation, run the lxrun /uninstall /y /full command instead.

How to Reinstall the Ubuntu Environment

To reinstall the Bash environment, you can just run the bash command again, as you did when installing Bash the first time. If a Ubuntu user space image isn’t installed, it will automatically download and install it.

You can also run the following command yourself. This is the same command that bash.exe automatically runs if you launch it without a Ubuntu user space image installed.

lxrun /install

Whether you run bash or lxrun /install , the command will ask you to confirm your choice and enter a username and password for the user account in the Bash environment.

To skip this process, you can run the following command instead. This command will automatically agree to the prompts, setting the “root” account as the default user account without a password. This is helpful if you want to automate the process of installing Bash in a script.

lxrun /install /y

How to Remove Windows 10’s Bash Tools Completely

If you’d like to remove the bash.exe tool and the Windows Subsystem for Linux from your computer completely, you’ll need to revisit the “Turn Windows Features On or Off” dialog in the Control Panel.

To find it, open the Control Panel and head to Programs > Turn Windows Features On or Off.

Uncheck the “Windows Subsystem for Linux” option here and click OK. Windows will uninstall the Windows Subsystem for Linux, bash.exe, and lxrun.exe commands. You can always revisit the Windows Features dialog to reinstall them in the future.

 
分享到:
评论

相关推荐

    how to uninstall clearcase

    - 此文件夹可能会被隐藏,因此在 Windows 文件资源管理器中查看隐藏项目时才能看到。如果存在,也应该删除。 3. **C:\Rational.preserve** - 如果此文件夹存在于根目录下,同样需要删除。 #### 小结 卸载 ...

    How to uninstall Orcl 11g for windows.pdf

    卸载Oracle 11g的常见方法是在Windows控制面板中使用程序卸载工具,但这一方法在尝试卸载Oracle数据库时可能不总是有效。Oracle 11g的卸载可能需要用户手动编辑计算机的注册表,以及从文件夹中删除Oracle相关目录。 ...

    Uninstall-Windows-Defender.zip

    在Windows操作系统中,Windows Defender是内置的反恶意软件服务,为用户提供实时保护,防止病毒、间谍软件和其他潜在的不安全威胁。有时,用户可能因为特定需求或安装了其他安全软件而选择卸载Windows Defender。...

    ubuntu 安装pyqt5和卸载pyQt5的方法

    ### Ubuntu 安装PyQt5和卸载PyQt5的方法 #### 一、PyQt5简介 PyQt5是一款在Python环境下使用的GUI图形界面库,它由英国Riverbank Computing公司开发,提供了大量的功能和控件,可以用于创建复杂的桌面应用程序。...

    windows软件卸载工具 Uninstall Tool v3.5.10 Build 5670(geek 的专业Pro版)

    《Windows软件卸载工具Uninstall Tool v3.5.10 Build 5670:Geek的专业Pro版详解》 在Windows操作系统中,我们常常会遇到预装或自行安装的各种软件,有时需要进行卸载以释放系统资源或解决兼容性问题。然而,...

    win10小娜卸载工具Uninstall Cortana

    该卸载工具,即"Uninstall Cortana",是一款专门针对Windows 10系统设计的脚本工具,其主要功能是帮助用户安全、有效地移除Cortana。"Uninstall Cortana"提供了中文界面,使得非英语母语的用户也能轻松操作,避免了...

    metawin5.1

    How to uninstall MetaWin from your system MetaWin is a Windows application. Read below about how to uninstall it from your computer. It was coded for Windows by MSRsoft. Go over here for more details ...

    UninstallTool_v3.5.10.5670.rar

    Windows操作系统自带的程序卸载功能虽然基本可用,但往往不能彻底清除所有程序残留,这正是UninstallTool_v3.5.10.5670这样的第三方卸载工具大显身手的地方。 UninstallTool是一款强大的卸载工具,它的主要功能是...

    完美卸载win10小娜卸载工具Uninstall Cortana.zip

    在Windows 10操作系统中,"小娜"(Cortana)是微软推出的一个智能语音助手,它能够帮助用户执行各种任务,如搜索信息、设置提醒、管理日程等。然而,有些用户可能由于隐私考虑或者对这项功能的需求不大,会选择卸载...

    UninstallTool.exe

    强力卸载工具,比控制面板的卸载好,因为可以去除残留,例如注册表残留,删除注册表残留后,可以在下次安装的时候省下后顾之忧

    支持32和64位的Jpcap.dll

    A: Try to uninstall and reinstall the affected application may help. ******** Disclaimer ******** For documents and files available from this server, we do not warrant or assume any legal ...

    218781302755297S-078838_uninstall_vba.bat

    218781302755297S-078838_uninstall_vba.bat

    ADBShell操作手册

    adb shell rm [options] &lt;files or directory&gt; 13 adb shell mkdir [options] &lt;directory name&gt; 15 adb shell touch [options] &lt;file &gt; 15 adb shell pwd 16 adb shell cp [options] &lt;source&gt; &lt;dest&gt; 16 adb shell ...

    Total-Uninstall-Setup-6.22.1(带破解)

    Total Uninstall Setup 破解方式 :安装完后替换掉Tu...Windows 10,Windows 8.1,Windows 8,Windows 7,Windows Vista,Windows XP,Windows Server 2012,Windows Server 2008,Windows Server 2003(64位和32位)。

    Uninstall-windowsClient.zip

    本文将详细介绍如何使用“Uninstall-windowsClient.zip”压缩包中的“Uninstall-Win-Client.exe”工具,有效地卸载LANDESK软件。 首先,我们需要了解LANDESK。LANDESK是一套全面的IT管理解决方案,包括资产管理、...

    win10彻底移除Windows-Defender

    在Windows 10操作系统中,Windows Defender是一款内置的反恶意软件服务,它为用户提供实时保护,扫描、检测和清除病毒、间谍软件以及其他潜在的不安全威胁。然而,有些用户可能因为特定的需求或者与其他安全软件冲突...

    UninstallTool

    《UninstallTool:高效彻底的软件卸载与系统清理利器》 在计算机使用过程中,我们经常需要安装和卸载各种软件。然而,有些软件在卸载后仍会留下注册表残留、临时文件或其他痕迹,这不仅占用了硬盘空间,还可能影响...

    Uninstall Tool

    Uninstall Tool是CrystalIdea Software出品的一款强大而灵活的Windows标准”添加/删除程序”工具的替代软件.它能快速,安全而方便的删除不必要的应用程序并提高您的电脑的效能.Uninstall Tools支持微软Windows 2000,...

    Windows程序卸载Uninstall Tool v3.5.10 Build 5670.7z

    这款Windows程序卸载软件使用方便,卸载方便,在顽疾的程序也可以卸载,解压后直接应用,还在为卸载不了程序而烦恼吗?快来使用这款软件吧!哈哈哈

Global site tag (gtag.js) - Google Analytics