Categories
Interior

How to uninstall (or reinstall) windows 10’s ubuntu bash shell

Chris Hoffman is Editor-in-Chief of How-To Geek. He’s written about technology for over a decade and was a PCWorld columnist for two years. Chris has written for The New York Times, been interviewed as a technology expert on TV stations like Miami’s NBC 6, and had his work covered by news outlets like the BBC. Since 2011, Chris has written over 2,000 articles that have been read nearly one billion times—and that’s just here at How-To Geek. Read more.

How to uninstall (or reinstall) windows 10’s ubuntu bash shell

Install Windows 10’s Ubuntu-based Bash shell and you’ll have a complete Ubuntu environment that lets you install and run the same applications you could run on an Ubuntu-based Linux system. Just like on Ubuntu, though, you’ll need the apt-get command to install and update software.

Note that Windows 10’s Linux subsystem doesn’t officially support graphical applications or server software (though it is possible to run some graphical applications, unofficially). Officially, it’s intended for Linux terminal applications and other command-line utilities developers might want.

Windows 10’s Bash shell only supports 64-bit binaries, so you can’t install and run 32-bit Linux programs.

Apt-get Explained

On Ubuntu and other Debian-based Linux distributions, you use the apt-get command to install software. “Apt” stands for “Advanced Package Tool”. This command downloads software packages from Ubuntu’s centralized software repositories and installs them on your system. If the packages you try to install require–or “depend on”–other packages, apt-get will automatically download and install those packages (known as dependencies) as well. Apt-get works with “.deb” packages, named for Debian, the Linux distribution Ubuntu is based on.

You’ll need to run apt-get along with the “sudo” command, which gives it superuser, or root, permissions. This allows the command to modify and install system files in the Linux environment. You’ll have to enter your current user account’s password when you use sudo.

You can also use the newer apt command instead of the traditional apt-get command, although either command will work.

How to Download Updated Package Lists

First, you’ll want to run the following command to download up-to-date package lists from the software repositories:

How to uninstall (or reinstall) windows 10’s ubuntu bash shell

You’ll want to do this before you install any package.

How to Install a Package

If you know the name of a package you want to install, you can download and install it with the following command, replacing “packagename” with the name of the package you want to install:

For example, if you wanted to install Ruby, you’d run the following command:

You can press the Tab key while typing the name of a package (or any command) to use Bash’s autocomplete feature, which will help you automatically finish typing things and suggest available options, if multiple options are available.

After running this and other apt-get commands, you’ll be presented with the changes that will be made and you’ll have to type “y” and press Enter to continue.

How to uninstall (or reinstall) windows 10’s ubuntu bash shell

How to Search for a Package

You may not always know the name of the package you want to install. In this case, you can use the apt-cache command to search your downloaded package cache (the lists that were download with apt-get update) for a program. This command searches package names and descriptions for the text you specify.

This command doesn’t require sudo, as it’s just a simple search. However, you can run it with sudo if you like, and it will still work.

For example, if you wanted to search for packages related to w3m, a text-based web browser for the terminal, you’d run:

How to uninstall (or reinstall) windows 10’s ubuntu bash shell

How to Update All Your Installed Packages

To update your installed software packages to the latest available versions in the repository–which gives you any security updates available for your current packages–run the following command:

Remember to run the “sudo apt-get update” command before you run this command, as you need to update your package lists before apt-get will see the latest available versions.

How to uninstall (or reinstall) windows 10’s ubuntu bash shell

How to Uninstall a Package

To uninstall a package when you’re done with it, run the following command:

The above command just removes the package’s binary files, but not any associated configuration files. If you’d like to remove everything associated with the software package, run the following command instead:

Neither of the above commands will remove any “dependencies,” which are packages that were installed because they were required for a package. If you uninstall a package and then remove it later, your system may still have a number of additional dependencies that are no longer necessary. To remove any packages that were installed as dependencies and are no longer required, run the following command:

How to uninstall (or reinstall) windows 10’s ubuntu bash shell

How to Install Other Software

The above commands will help you install and update most common software you’ll require. However, some software will be installed through other commands and tools.

For example, Ruby gems are installed with the “gem install” command once you’ve installed Ruby via apt-get. Ruby has its own software installation system that’s separate from apt-get.

Some software packages are available in PPAs, or “personal package archives,” that are hosted by third parties. To install these, you’ll need to add the PPA to your system and then use the normal apt-get commands.

Newer software may need to be compiled and installed from source. All the packages you install with apt-get were compiled from source by Ubuntu’s build system and conveniently packaged into .deb packages you can install. You should avoid this if possible, but it may be unavoidable in some cases.

Whatever the case, if you’re trying to install another Linux application, you should be able to find instructions that tell you how you should install it. The same instructions that work on Ubuntu 14.04 LTS will work in Windows 10’s Bash shell. When it’s updated to the next major version of Ubuntu, the same instructions that work on Ubuntu 16.04 LTS will work on Windows 10.

Chris Hoffman is Editor-in-Chief of How-To Geek. He’s written about technology for over a decade and was a PCWorld columnist for two years. Chris has written for The New York Times, been interviewed as a technology expert on TV stations like Miami’s NBC 6, and had his work covered by news outlets like the BBC. Since 2011, Chris has written over 2,000 articles that have been read nearly one billion times—and that’s just here at How-To Geek. Read more.

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.

Update: As of the Fall Creators Update, you can now uninstall Ubuntu or any other Linux distribution like a normal application. For example, to uninstall Ubuntu, just right-click the Ubuntu shortcut in your Start menu and click “Uninstall”. To reinstall a Linux distribution, download it from the Store once again. When you reinstall, you’ll get a fresh copy of the Linux environment.

You can also run the ubuntu clean command in a Command Prompt or PowerShell window to delete your Ubuntu Linux file system. The next time you launch Ubuntu, it will set up a new file system without you having to redownload the software.

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.

How to uninstall (or reinstall) windows 10’s ubuntu bash shell

How to Uninstall the Ubuntu Environment and Keep Your Home Folder

Update: As of the May 2019 Update, use the wsl command instead of the lxrun command. For example, to uninstall a Linux distribution, that’s:

For example, to uninstall Ubuntu, you’d run:

You can run wsl –list to see a list of installed Linux distributions and their names.

On older versions of Windows 10, 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.

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.

How to uninstall (or reinstall) windows 10’s ubuntu bash shell

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:

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

How to uninstall (or reinstall) windows 10’s ubuntu bash shell

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.

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.

How to uninstall (or reinstall) windows 10’s ubuntu bash shell

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.

I’ve installed Linux Subsystem for Windows on my machine. It works beautifully!

Since then, I’ve done unspeakable things to my install. Nothing works anymore. How do I start again from scratch?

How to uninstall (or reinstall) windows 10’s ubuntu bash shell

How to uninstall (or reinstall) windows 10’s ubuntu bash shell

4 Answers 4

You can reset Ubuntu from settings, just find it in the start menu, right-click to go to App settings , then press the reset button.

How to uninstall (or reinstall) windows 10’s ubuntu bash shell

How to uninstall (or reinstall) windows 10’s ubuntu bash shell

Open Command Prompt (AKA cmd.exe ), and type lxrun /uninstall . That should wipe your Ubuntu image.

Once this is done, you can reinstall with lxrun /install .

How to uninstall (or reinstall) windows 10’s ubuntu bash shell

With the new distro-specific store apps, for example:

So, ubuntu clean should be enough.

If ubuntu clean fails, then you’ll have to uninstall the app from the store and reinstall it. See WSL #2387.

How to uninstall (or reinstall) windows 10’s ubuntu bash shell

passwd your_username set new_password and confirm new_password close the bash

back into cmd /d

ubuntu config –default-user your_username

Launch the bash and fell free to use the new_password for your_username when needed (like for a “sudo apt-get install gcc”)

How to uninstall (or reinstall) windows 10’s ubuntu bash shell

Dec 13, 2017 · 2 min read

Here’s a handy trick you can use to reset your Ubuntu (or Debian, OpenSUSE Leap 42, SUSE Linux enterprise server) running on Windows Subsystem for Linux (WSL). Please note that doing this deletes the Ubuntu user environment from your system, including any Linux applications you downloaded and installed with apt-get command or by compiling them from source.

This also saves you if you are seeing “ The Windows Subsystem for Linux has an install or uninstall operation pending” or “ Error: 0x80070002” or “ Failed to clean this distro installation. Error: 0x80070091” etc.

How to uninstall (or reinstall) windows 10’s ubuntu bash shell

Click the Start button, then click Settings.

How to uninstall (or reinstall) windows 10’s ubuntu bash shell

Cl i ck on Apps button, and then search for Ubuntu (or your distribution name) under Apps & features.

How to uninstall (or reinstall) windows 10’s ubuntu bash shell

Under search results, click on Ubuntu (or your distribution name) and then click on Advance options.

How to uninstall (or reinstall) windows 10’s ubuntu bash shell

Click the Reset button.

How to uninstall (or reinstall) windows 10’s ubuntu bash shell

After completion you will see a check mark next to the Reset button. You can then launch Ubuntu as usual. On first start it will ask you to set a username and password.

How to uninstall (or reinstall) windows 10’s ubuntu bash shell

Nobody expected that Linux on Windows will be a reality! Through Anniversary Update of Windows 10, Microsoft offered full-fledged Ubuntu-based Bash shell as a gift. To make this possible, Microsoft added a new feature called “Windows Subsystem for Linux”. Now Windows developers can write shell scripting!

It is like a dream becoming true. Microsoft worked with UK-based Canonical (the company that produces Ubuntu) to bring Ubuntu Linux into Windows. But currently, this will be limited to a CLI that means from bash shell user cannot run any GUI based applications.​

No doubt that Windows developers using Linux without virtualization or emulation (Cygwin) will open a new era of opportunities going ahead. Before taking you to Bash installation steps, it is worthwhile to go through the history of the bash shell.

Brief history of Unix Shells

​The first-ever Unix shell, called Bourne shell (sh), was developed by Steven R Bourne in 1974. Bourne shell introduced $ symbol as default common prompt and remained as a standard for Unix shells. Bill Joy developed C shell (based on C language) at the University of California in the late 1970s. Later David G Korn improved Bourne shell and created Korn shell (ksh) in the early 1980s.

In the late 1980’s POSIX formed to standardize Unix libraries, utilities including the shell. As a result, the development of Bash begun considering the best of the existing shells. It included the conveniences of command-line users and shell programming features alike. In no time bash became default shell on Unix like systems including Linux distributions.

Now Microsoft included Windows 10 leasing Bash shell as a beta version including the core functionalities – awk, sed, grep, PERL, Git, editors (vi, emacs), ssh, apt-get, mounting local hard drives, etc. to name a few.

Requirements to install bash shell on Windows OS

  1. PC running on a 64-bit Windows 10 operating system.
  2. PC is upgraded to Windows 10 Anniversary Update.

Steps involved in installing Bash shell on Windows 10 PC

Notice

The installation steps covered here are for Windows 10 with Anniversary Update and not Fall Creators Update.

1. Access Windows system settings.

On the left, click on For developers and enable Developer mode. Click Yes on the message box.

  • How to uninstall (or reinstall) windows 10’s ubuntu bash shell
  • How to uninstall (or reinstall) windows 10’s ubuntu bash shell

3. ​Now access Control Panel and click on Programs.

4. ​Click on Turn Windows features on or off.

5. ​This will list many Windows features available. Go down and check the Windows Subsystem for Linux (Beta) option.

6. ​Click OK. Now Windows download and install the required software. After installation is done, click on Restart now.

7. ​After your computer gets restarted, search for bash and run it.

8. ​On the command prompt, you see information about bash indicating that bash is still beta software. Type y and press Enter key to follow the rest of the installation. Have a cup of coffee. By the time Windows is done with downloading and installation.

9. ​After the downloading and installation is complete, you need to create a Unix user account by specifying username and password.

10. ​That’s all. Now bash is ready on Windows! You can now access bash shell and give a try to use it.

11. ​Next time when you want to start Bash it is available in search!

Conclusion

The Bash within Windows allows user to access Windows file system too. Remember that Bash is armed with not only end-less day-to-day utilities and tools (apt, ssh, rsync, curl, find, grep, awk, wget…) but has the ability to run server apps too (web servers like Apache, database mysql). It is a full-fledged Ubuntu Linux environment available on Windows platform!​

The one important thing that a Windows user should know is that- everything in Linux is case sensitive. That means while using commands and referring files and directories etc. use them accurately with the right case. One thing is sure; the availability of CLI version of Linux to Windows user will open new windows of opportunities. Great days are ahead. Do share your experiences on using Bash on Windows.

Switch language: EN | ES

The wonderful Ubuntu terminal is freely available for Windows 10.

As any Linux user knows, it’s the command line terminal where the magic happens. It’s perfect for file management, development, remote administration and a thousand other tasks.

The Ubuntu terminal for Windows has many of the same features you’ll find using the terminal on Ubuntu:

  • Unrivalled breadth of packages, updates and security features
  • Bash, Z-Shell, Korn and other shell environments without virtual machines or dual-booting
  • Run native tools such as SSH, git, apt and dpkg directly from your Windows computer
  • A huge community of friendly, approachable users

How to uninstall (or reinstall) windows 10’s ubuntu bash shell

Originally authored by Graham Morrison.

2. Requirements

You will need a x86 PC running Windows 10.

Windows 10 needs to be updated to include the Windows 10 Fall Creators update, released October 2017. This update includes the Windows Subsystem for Linux which is needed to run the Ubuntu terminal.

How to uninstall (or reinstall) windows 10’s ubuntu bash shell

3. Enable WSL

To enable WSL 1 on Windows 10 Fall Creators update and newer run the following in PowerShell as Administrator:

To enable WSL 2 on Windows 10 May 2020 update and newer run the following in PowerShell as Administrator:

and then restart Windows 10.

4. Install Ubuntu for Windows 10

Ubuntu can be installed from the Microsoft Store:

  1. Use the Start menu to launch the Microsoft Store application or click here.
  2. Search for Ubuntu and select the first result, ‘Ubuntu’, published by Canonical Group Limited.
  3. Click on the Install button.

Ubuntu will be downloaded and installed automatically. Progress will be reported within the Microsoft Store application.

How to uninstall (or reinstall) windows 10’s ubuntu bash shell

5. Launch Ubuntu on Windows 10

Ubuntu can now be launched in the same way as any other Windows 10 application, such as searching for and selecting Ubuntu in the Start menu.

First launch

When launched for the first time, Ubuntu will inform you that it’s ‘Installing’ and you’ll need to wait a few moments.

When complete, you’ll be asked for a username and password specific to your Ubuntu installation. These don’t need to be the same as your Windows 10 credentials. With this step complete, you’ll find yourself at the Ubuntu bash command line.

How to uninstall (or reinstall) windows 10’s ubuntu bash shell

Congratulations! You have successfully installed and activated the Ubuntu terminal on Windows 10. You now have all the power of the command line at your fingertips.

6. Getting help

If you need some guidance getting started with the Ubuntu terminal, take a look at the community documentation, and if you get stuck, help is always at hand:

@ manikManik

Out Of The Box Thinker, Love To Write JavaScript. “🍺 🍻 gulp watch”

Microsoft recently joined hands with Canonical (the parent company of Ubuntu) to bring the entire userland into Windows, minus the Linux Kernel. So as a result, you, as a developer, get access to the whole range of Ubuntu command-line tools and utilities with bash shell integrated with Windows. Let’s look at how we can install Bash on Windows 10 and take full advantage of the new feature.

This might look like a small and helpful change by Microsoft, but contrary to that its a huge leap and making Windows-friendly for the open-source community. Needless to say, with the ability to install bash on windows, it would certainly save a lot of manhours and effort, making the life of people working on open source on Windows much easier.

So What Is Bash Shell?

Bash is the shell, or command language interpreter, which is used by various flavors of Linux and the GNU operating system. It is the interface to the operating system. If you have used Ubuntu and passed specific commands to the operating system using the terminal, the chances are relatively high that you have used Bash to do so. The name “Bash” is an abbreviation for the ‘Bourne-Again SHell’, a pun on Stephen Bourne, the author of the direct ancestor of the current Unix shell ‘sh.’ The Bash offers functional improvements over sh for both interactive and programming use.

Bash is a free version of the Bourne Shell and distributed with several Linux and GNU operating systems, including Ubuntu. Bash is the most popular command-line interpreter, especially Linux, and hence is the default interactive shell on various distributions of Linux. With the release of Windows its now possible to install bash shell on windows as well.

Why Install Bash On Windows 10

Windows operating system already has PowerShell, which is a command shell and scripting language, which enables the system administrators to perform various administration tasks. The PowerShell was developed on top of the .NET framework to overcome the shortcomings of the command prompt. Command prompt was a primitive tool that did not have remote administration capabilities. Remote administration and server management is the need of the hour for the development and management of the servers by the administrator.

So the question is if the PowerShell already existed in Windows, what was the need for tp install Bash shell on windows? The answer is the open-source development community. Both PowerShell and Bash differ in focus and design. Since there has been an extravagant and expansive increase in the open-source programming languages, and the developer community adopting them, it becomes essential for an operating system to support it.

Having the Bash shell integrated within the windows operating system removes the extra steps that the developers have to follow to use the same programming languages on Windows. When compared to an operating system that already has native support for the Bash, using windows powershell means a steep learning curve and extra effort.

How Developers Used To Work Earlier

While developing using open source programming languages and using various packages developed by other programmers, there are instances when you would need to pass multiple commands using the terminal to perform desired actions.

Before the Bash shell became a part of Windows and it became possible to install bash on windows 10, developers used to resort to various methods to use Linux commands on Windows. Here are a few other ways developers used to adopt.

  • Using Virtual Machines: Using a virtualization software such as the Parallels desktop, the developers can create a virtual machine. On this virtual machine, you can install the operating system of your choice, which natively supports the Bash Shell, such as Ubuntu.
  • Run Native Linux Commands UsingCygwin: Cygwin is an extensive collection of GNU and Open Source tools that provide functionality similar to a Linux distribution on Windows. Cygwin has been the standard for running Linux commands on Windows for a long time now.
  • Using An Emulator Such APuTTY: PuTTY is a free and open-source terminal emulator. PuTTY will not let you execute Linux commands on your windows machine but, if you want to connect and execute commands on a remote Linux/Unix server using a Windows machine, puTTY can be helpful. Since the developers used to resort to all these means to run Linux commands on Windows, it’s evident that there was a need to support the bash shell within Windows.

Installation Of Bash Shell On Windows Is Native

An important thing to note over here is that when you install bash on Windows, the installation is native. It is not a virtual machine or an emulator. It is a complete Linux system integrated into Windows kernel. Microsoft joined hands with Canonical (the parent company of Ubuntu) to bring the entire userland into Windows, minus the Linux Kernel.

So as a result, you, as a developer, get access to the whole range of Ubuntu command-line tools and utilities with bash shell integrated with Windows. The benefit over here is obvious, and that is that a developer gets “native” Linux capabilities within Windows. Now the developers do not have to make compromises which they otherwise would while using a Virtual Machine or Cygwin.

Step By Step Guide On How To Install Bash On Windows 10

1. From Windows desktop Open Settings.

If you’re running Windows 10 Creators Update or later, please follow the Windows 10 installation instructions.

The following instructions are for users running Windows 10 Anniversary Update or Windows 10 Creators Update

Prior to Windows 10 Fall Creators Update (version 1709), WSL was released as a beta feature and installed a single Ubuntu instance when “Bash on Ubuntu on Windows” (or Bash.exe) was first run.

While you CAN use WSL on earlier Windows 10 releases, this beta “legacy distro” is now considered obsolete. We strongly encourage you to run the most recent version of Windows 10 available. Each new Windows 10 release includes many hundreds of fixes and improvements in WSL alone, allowing ever more Linux tools and apps to run correctly on WSL.

If you cannot upgrade to Fall Creators Update or later, follow the steps below to enable and use WSL:

Turn on Developer Mode To run WSL on Windows 10 Anniversary Update or Creators Update, you must enable Developer Mode:

Open Settings -> Update and Security -> For developers

Select the Developer Mode radio button
How to uninstall (or reinstall) windows 10’s ubuntu bash shell

Open a command prompt. Type bash and hit enter

The first time you run Bash on Ubuntu on Windows, you’ll be prompted to accept Canonical’s license. Once accepted, WSL will download and install the Ubuntu instance onto your machine, and a “Bash on Ubuntu on Windows” shortcut will be added to your start menu.

How to uninstall (or reinstall) windows 10’s ubuntu bash shell

The first time you run Bash on Ubuntu on Windows, you will be prompted to create a UNIX username and password. Follow the new distro instance instructions to complete your installation

Launch a new Ubuntu shell by either:

  • Running bash from a command-prompt
  • Clicking the start menu “Bash on Ubuntu on Windows” shortcut

Uninstalling/Removing the legacy distro

If you upgrade to Windows 10 Fall Creators Update from an earlier Windows 10 release upon which you installed WSL, your existing distro will remain intact. However, we STRONGLY encourage you to install a new Store-delivered distro ASAP, and migrate any necessary files, data, etc. from your legacy distro to your new distro.

To remove the legacy distro from your machine, run the following from a Command Line or PowerShell instance:

If you are not using Windows Version 1903 or higher, you may need to run wslconfig /u Legacy or lxrun /uninstall /full instead.

Manually deleting the legacy distro

If you wish, you can manually delete your legacy instance. This may be required if you encounter issues uninstalling the legacy distro using lxrun.exe , or are running Windows 10 Spring 2018 Update (or later) which do not ship with lxrun.exe .

To forcefully delete your legacy WSL distro, delete the %localappdata%\lxss\ folder (and all it’s sub-contents) using Windows’ File Explorer, or the command-line:

Last updated October 29, 2020 By Abhishek Prakash 47 Comments

If you have messed up your Ubuntu system and after trying numerous ways to fix it, you finally give up and take the easy way out: you reinstall Ubuntu.

We have all been in a situation when reinstalling Linux seems a better idea than try to troubleshoot and fix the issue for good. Troubleshooting a Linux system teaches you a lot but you cannot always afford to spend more time fixing a broken system.

There is no Windows like recovery drive system in Ubuntu as far as I know. So, the question then arises: how to reinstall Ubuntu? Let me show you the steps for the same.

Playing with disk partitions is always a risky task. I strongly recommend to make a backup of your data on an external disk.

How to reinstall Ubuntu Linux

How to uninstall (or reinstall) windows 10’s ubuntu bash shell

Here are the steps to follow for reinstalling Ubuntu.

Step 1: Create a live USB

First, download Ubuntu from its website. You can download whichever Ubuntu version you want to use.

Once you have got the ISO image, it’s time to create a live USB from it. If your Ubuntu system is still accessible, you can create a live disk using the startup disk creator tool provided by Ubuntu.

If you cannot access your Ubuntu system, you’ll have to use another system. You can refer to this article to learn how to create live USB of Ubuntu in Windows.

Step 2: Reinstall Ubuntu

Once you have got the live USB of Ubuntu, plugin the USB. Reboot your system. At boot time, press F2/10/F12 key to go into the BIOS settings and make sure that you have set Boot from Removable Devices/USB option at the top. Save and exit BIOS. This will allow you to boot into live USB.

Once you are in the live USB, choose to install Ubuntu. You’ll get the usual option for choosing your language and keyboard layout. You’ll also get the option to download updates etc.

The important steps comes now. You should see an “Installation Type” screen. What you see on your screen here depends heavily on how Ubuntu sees the disk partitioning and installed operating systems on your system.

Be very careful in reading the options and its details at this step. Pay attention to what each options says. The screen options may look different in different systems.

How to uninstall (or reinstall) windows 10’s ubuntu bash shellReinstall Ubuntu option in dual boot mode

In my case, it finds that I have Ubuntu 18.04.2 and Windows installed on my system and it gives me a few options.

The first option here is to erase Ubuntu 18.04.2 and reinstall it. It tells me that it will delete my personal data but it says nothing about deleting all the operating systems (i.e. Windows).

If you are super lucky or in single boot mode, you may see an option where you can see a “Reinstall Ubuntu”. This option will keep your existing data and even tries to keep the installed software. If you see this option, you should go for it it.

Attention for Dual Boot System

If you are dual booting Ubuntu and Windows and during reinstall, your Ubuntu system doesn’t see Windows, you must go for Something else option and install Ubuntu from there. I have described the process of reinstalling Linux in dual boot in this tutorial.

For me, there was no reinstall and keep the data option so I went for “Erase Ubuntu and reinstall”option. This will install Ubuntu afresh even if it is in dual boot mode with Windows.

The reinstalling part is why I recommend using separate partitions for root and home. With that, you can keep your data in home partition safe even if you reinstall Linux. I have already demonstrated it in this video:

Once you have chosen the reinstall Ubuntu option, the rest of the process is just clicking next. Select your location and when asked, create your user account.

Once the procedure finishes, you’ll have your Ubuntu reinstalled afresh.

In this tutorial, I have assumed that you know things because you already had Ubuntu installed before. If you need clarification at any step, please feel free to ask in the comment section.

Like what you read? Please share it with others.

Filed Under: Tutorial Tagged With: Ubuntu

About Abhishek Prakash

Creator of It’s FOSS. An ardent Linux user & open source promoter. Huge fan of classic detective mysteries ranging from Agatha Christie and Sherlock Holmes to Detective Columbo & Ellery Queen. Also a movie buff with a soft corner for film noir.

I cant see an option stating remove the first installation and reinstall

What a confusing article.

> The first option here is to erase Ubuntu 18.04.2 and reinstall it. It tells me that it will delete my personal data but it says nothing about deleting all the operating systems (i.e. Windows).

So the fact that the installer says nothing about Windows means that it will erase Windows because it is not aware about it or that it will preserve Windows because otherwise it would have warned about erasing it?

> If you are dual booting Ubuntu and Windows and during reinstall, your Ubuntu system doesn’t see Windows, you must go for Something else option and install Ubuntu from there.

What exactly does it mean that “your Ubuntu system doesn’t see Windows”? Does it mean that the installer does not mention Windows?

> For me, there was no reinstall and keep the data option so I went for “Erase Ubuntu and reinstall” option. This will install Ubuntu afresh even if it is in dual boot mode with Windows.

And this quote contradicts the previous one. This quote says you can use the “Erase Ubuntu and reinstall” option to keep Windows, but the previous one says that you must use the “Something else” option to keep Windows. At least I assume that the last quote says that it will keep Windows. Maybe “install Ubuntu even if it is in dual boot” means that it will install Ubuntu but destroy the dual boot mode.

> The reinstalling part is why I recommend using separate partitions for root and home.

Suppose I have separate root and home partitions. Then will “Erase Ubuntu and reinstall” option delete the home partition? I know that there is a link to a video, but since you mention it in the article, I think it should be described in the article.

The author should try writing clearer descriptions and instructions.