Bash doesn't work after Windows 10 update

5,615

Solution 1

The Windows subsystem for Linux (WSL) is still in its beta stage. This feature doesn't come pre-built, so you need to enable it. For this firstly you need to switch to developer mode.

To enable the new Developer features, do the following:

Tap on the Windows-key, type Settings and load Settings - Modern application when the search results are displayed. Switch to Update & Security > For developers to display the new features. There you may Enable "developer mode".

Enter image description here

Then enable Bash in Windows features.

Go to Turn on/off Windows features and select Windows Subsystem for Linux from the list. Once you have done that restart your PC.

Then search for Bash or open your cmd and type bash. Now it will ask you to download the Windows subsystem for Linux. Press "y". It will take some time to download the necessary files. Once it's finished, Bash on Ubuntu on Windows will prompt to create a default Linux user on first run. This user:

  • Does not need to have the same username as the Windows signed-in user and is treated as a distinct entity from the Windows user account.
  • Will be prompted for a new password. The password will be used for Linux commands such as sudo and not used by any system outside of WSL.
  • Will be automatically added to the sudo group.
  • Will be signed-in automatically for every Bash instance.
  • Will not require a password when launching WSL.

Each Windows user has a unique WSL instance. This means all changes made within the WSL environment are unique to that Windows user. This includes Bash users created with the adduser command.

Solution 2

There is possibility that resetting Windows has removed all your updates. So you would need to reinstall bash and all the Linux packages by using "Programs and functions" - "Turn on/off Windows features".

There is also possibility that you made Windows standard installation by resetting it. So you don't have Preview build anymore needed to run Linux and bash.

Share:
5,615

Related videos on Youtube

Mikhail
Author by

Mikhail

Just <3 Code

Updated on September 18, 2022

Comments

  • Mikhail
    Mikhail over 1 year

    Today I reset Windows 10. I first activated Windows a year ago. I recently created a bootable USB flash drive using Windows 10 Media Creation Tool (I have Windows 10 pro). After the installation I went into SettingsUpdate and Security, there was only the Cumulative Update for Windows 10 Version 1607.

    After installing and rebooting the PC, I open a command prompt, input the bash command, but nothing happens. How do I fix it? Or did I do something wrong?

    Enter image description here

  • Mikhail
    Mikhail almost 8 years
    I have not used the beta version of this update previously. The current installation of Windows 10 I have done on a clean system with formatting HDD. Which version of Windows 10 should be displayed in my command prompt, Microsoft Windows [Version 10.0.14393] ? And here i.imgur.com/2M5z9nu.jpg In Programs and functions - Turn on/off Windows features I have only Windows Subsystem for Linux (Beta) This is what I need to enable to enable bash?
  • Tim G.
    Tim G. almost 8 years
    That's how I turned mine on. It will ask you to restart your computer once its finished.
  • Mikhail
    Mikhail almost 8 years
    @TimmyJim Thanks. I enable Windows Subsystem for Linux (Beta) but after restart and run bash in command prompt I have this message i.imgur.com/H6R600c.jpg But in Microsoft blog it was written that the bash will work in anniversary update
  • CodeIt
    CodeIt almost 8 years
    @Mikhail See my answer.
  • pbies
    pbies almost 8 years
    There might be needed to install bash from cmd by lxrun /install /y.
  • CodeIt
    CodeIt almost 8 years
    @pbies Not required if you follow the steps given in the answer.
  • pbies
    pbies almost 8 years
    This will work only with Preview version od Windows 10. There is specific Windows build that allows Linux subsystem.
  • CodeIt
    CodeIt almost 8 years
    @pbies it works with latest insider builds and the AU Build (1607). The question is regarding the Anniversary Update (1607) of Windows 10.