Skip to main content
Tech Radar TechRadar the technology experts
Sign in
  • View Profile
  • Sign out
RSS
Asia
flag of Singapore
Singapore
Europe
flag of Danmark
Danmark
flag of Suomi
Suomi
flag of Norge
Norge
flag of Sverige
Sverige
flag of UK
UK
flag of Italia
Italia
flag of Nederland
Nederland
flag of België (Nederlands)
België (Nederlands)
flag of France
France
flag of Deutschland
Deutschland
flag of España
España
North America
flag of US (English)
US (English)
flag of Canada
Canada
flag of México
México
Australasia
flag of Australia
Australia
flag of New Zealand
New Zealand
  • Phones
  • Computing
  • TVs
  • AI
  • Streaming
  • Health
  • Audio
  • VPN
  • More
    • Cameras
    • Home
    • News
    • Reviews
    • Opinion
    • How to
    • Versus
    • Deals
    • Coupons
    • Best
Tech Radar Pro
Tech Radar Gaming
Trending
  • Nintendo Switch 2
  • WWDC
  • Best laptop
  • Best VPN
  • ChatGPT
  • Best web hosting
  • NYT Wordle today

Recommended reading

Windows 10's grave
Windows Can’t upgrade to Windows 11? This Linux project wants to save your old PC from the scrapheap when Windows 10 support ends
Windows 10 button on a keyboard
Pro Microsoft makes Windows Subsystem for Linux open source at last
The Asus Vivobook S 15 Copilot+ in silver pictured on a wooden desk.
Windows Microsoft is working on some seriously exciting Windows 11 improvements – but not everyone will get them
A woman sitting outside in a public space and using a laptop while seated at one of the tables
Windows Copilot+ PCs with Snapdragon CPUs can now install popular tool that lets you customize Windows 11 and improve the Start menu in ways that Microsoft won’t entertain
A woman sitting in a chair looking at a Windows 11 laptop
Windows Microsoft is supercharging Windows 11’s voice commands on Copilot+ PCs with Snapdragon CPUs, and fine-tuning a few Recall features
A person at a laptop.
Windows Windows 11’s Notepad app is getting new formatting tricks that are already proving controversial
Ubuntu website screenshot
Software & Services Best Ubuntu app of 2025
  1. Computing
  2. Software
  3. Windows

How to install and use Linux Bash in Windows 10

How-to
By Nate Drake published 8 February 2017

Harness the power of Linux from Windows

When you purchase through links on our site, we may earn an affiliate commission. Here’s how it works.

Using Bash in Windows

Using Bash in Windows

Linux is a free, alternative Operating System to Windows. In recent years, easy- to-use desktop versions such as Ubuntu have become very popular.

Canonical, the people behind Ubuntu, have worked with Microsoft to enable a version of the Unix Shell 'Bash' for Windows 10.

  • These are the best Linux training providers and online courses in 2017

Why would you wish to do this? In brief, typing commands is a good deal faster than pointing and clicking. There are also thousands of free apps to download and run for which you may have to pay on Windows. This guide will show you how to enable bash and run a few basic, fun commands. 

  • How to use Windows 10
Page 1 of 11
Page 1 of 11
1. Update Windows

1. Update Windows

In order to install Bash on Windows, you need to be running the 64 Bit version of Windows 10 and have installed the Windows 10 Anniversary Update. If you're unsure if you have this, click the search button at the bottom left of your screen and type winver. 

This will display a pop up showing which version of Windows you're running. Check that the "Build" number is at least '1607'. If it isn't, then click the search bar again and search for 'Updates'. Click the option marked 'Check for Updates'.

  • How to download and install the Windows 10 Anniversary Update
Page 2 of 11
Page 2 of 11
2. Enable Developer Mode

2. Enable Developer Mode

The Bash feature in Windows is experimental, so in order to use it, you must enable Developer Mode. Click on the search bar at the bottom left of the screen and type For Developers, then click the option labelled 'For Developers Settings'. 

Click the button next to 'Developer mode'. Read the security warning then click 'Yes' to continue. 

The window will show that it's 'Searching for Developer Mode package', then 'Installing Developer Mode Package'.

Finally you'll see a warning message saying that some features might not work until you restart your PC. Restart the machine to make sure it's fully installed.

Page 3 of 11
Page 3 of 11
3. Enable Windows Subsystem for Linux

3. Enable Windows Subsystem for Linux

Once your machine has restarted, click the search bar at the bottom left once again and type the word ‘Programs’. Click on the option marked ‘Programs and Features’. 

A new window will open. Click the link on the left hand side marked ‘Turn Windows Features on or off’. A pop up will appear with a series of features. You need to click the check box next to ‘Windows Subsystem for Linux (Beta)’, then click 'OK'. 

The feature won't activate fully until you restart your machine. Close and backup any important files then click ‘Restart Now’.

Page 4 of 11
Page 4 of 11
4. Download Ubuntu

4. Download Ubuntu

Windows will take some time to restart as it applies your new features so give it a few minutes to do this. Once you are back on the desktop, click the search bar at the bottom left and type the word ‘Bash’. Click the option marked ‘Bash – Run Command’.

The Bash window will open announcing it wants to install Ubuntu on Windows. Rest assured this only applies to this window and your other files and programs won't be affected. Type ‘y’ to confirm.

The necessary files will be downloaded from the Windows Store, then extracted automatically. 

Page 5 of 11
Page 5 of 11
5. Set up your user account

5. Set up your user account

Bash will now ask you to choose a username and password. Remember this username and password has no bearing on those you use to log in to Windows and you can choose any combination you like.

Enter the username entirely in lower case e.g ‘john’ not ‘John’. When the system prompts you for the password, you may notice nothing appears as you type. This is a security feature of UNIX to prevent people peering over your shoulder to see your information!

Enter the password slowly then press return. Bash will ask you to repeat the password once more to complete setup.

Page 6 of 11
Page 6 of 11
6. How to install your first Linux program in Windows with Bash

6. How to install your first Linux program in Windows with Bash

For your first time with Bash, we're going to install a small, text based program named 'Cowsay'. Type the command:

sudo apt-get install cowsay

Now press return. The sudo part of the command invokes administrator privileges, allowing you to make system-wide changes such as installing a new program.

Bash will now ask for your password. Remember the characters won't appear as you type this but Bash is recording them. Press return, then ‘Y’ to confirm you want to install the software. 

Once the text has stopped scrolling, type the command:

cowsay I have installed bash in Windows!

to have your words repeated by a text drawn cow. 

Page 7 of 11
Page 7 of 11
7. Enter the Matrix

7. Enter the Matrix

Now that you have mastered having a digital cow echo your words back to you, make sure you are comfortable with the process of installing new programs and learn how to stop them.

Run the command

sudo apt-get install cmatrix

Enter your password once again and then ‘Y’ to confirm. Once the install is complete run the command

cmatrix

to display a nostalgic Matrix-style screen of text. Press Ctrl + C at any time to stop the program. Now that you're familiar with how to install programs, visit this webpage from the Ubuntu website to find more. You can install them with the syntax

sudo apt-get install <program-name>
Page 8 of 11
Page 8 of 11
8. Install Python and Pip

8. Install Python and Pip

As handy as Bash is for command line apps, its primary purposes is to help Developers, which is why you need to enable Developer Features in Windows in order to use it. 

One of the most popular programming languages is Python as it's very simple to set up and use. This should come pre-installed when you downloaded Ubuntu with Bash but run 

sudo apt-get update

to be sure your version is up to date.

A tool for use with Python, 'pip' installs and manages programming packages. Download this with the command:

sudo apt-get install python3-pip
Page 9 of 11
Page 9 of 11
9. Download and run a Python Game

9. Download and run a Python Game

As you're working in a Terminal, you can't load websites easily but you can retrieve files with the command wget.

Use this to retrieve a simple Python script based on the text adventure game 'Zork':

wget https://raw.githubusercontent.com/iamjawa/zork-py/master/zork.py

Run the program with

python zork.py

The game is very basic but you can use commands like ‘Open Mailbox’ and ‘Go East’ to progress. 

Press Ctrl + C to quit and then

sudo nano zork.py

to examine the code used in the game. Nano is a very simple text editor in Linux.

See our guide if you'd like to create your own Python adventure game.

Page 10 of 11
Page 10 of 11
10. Further reading

10. Further reading

The commands we have explored so far barely scratch the surface of Bash's potential as it can do virtually anything Linux can once you have mastered the basics.

For a introduction to some Linux Conventions and basic system commands, check out our handy guide.

The Microsoft Website also has a handy guide to Bash and its companion app lxrun which can be used to uninstall and reinstall the Ubuntu image. 

If you want to wipe your Ubuntu installation and start again, click the search bar in Windows and type 'cmd'. 

Click ‘Windows Command Prompt’. Next run the command

lxrun /uninstall /full 
  • Windows 10 command line tricks
Page 11 of 11
Page 11 of 11
Nate Drake

Nate Drake is a tech journalist specializing in cybersecurity and retro tech. He broke out from his cubicle at Apple 6 years ago and now spends his days sipping Earl Grey tea & writing elegant copy.

See more Computing How Tos
Read more
Windows 10&#039;s grave
Can’t upgrade to Windows 11? This Linux project wants to save your old PC from the scrapheap when Windows 10 support ends
Windows 10 button on a keyboard
Microsoft makes Windows Subsystem for Linux open source at last
The Asus Vivobook S 15 Copilot+ in silver pictured on a wooden desk.
Microsoft is working on some seriously exciting Windows 11 improvements – but not everyone will get them
A woman sitting outside in a public space and using a laptop while seated at one of the tables
Copilot+ PCs with Snapdragon CPUs can now install popular tool that lets you customize Windows 11 and improve the Start menu in ways that Microsoft won’t entertain
A woman sitting in a chair looking at a Windows 11 laptop
Microsoft is supercharging Windows 11’s voice commands on Copilot+ PCs with Snapdragon CPUs, and fine-tuning a few Recall features
A person at a laptop.
Windows 11’s Notepad app is getting new formatting tricks that are already proving controversial
Latest in Windows
Apple&#039;s new dedicated gaming app on macOS Tahoe
Microsoft makes fun of macOS Tahoe’s Liquid Glass redesign for ripping off Windows Vista – but Apple could have the last laugh
gamer putting headphones on and getting ready to stream
Microsoft explains game-crashing bug in latest Windows 11 update, says it ‘likely didn’t’ affect many people
Skeleton of an office worker waiting for their laptop to boot
Windows 10 might be at death’s door, but Microsoft hasn’t finished trying to force Bing and Edge on its users
A frustrated looking girl playing a video game
Microsoft takes unusual step of delaying a Windows 11 update, leaving some PC gamers still waiting for crucial fixes for 24H2
Young woman use cellphone sit at table in kitchen
Windows 11 is getting a nifty trick for quickly mirroring your Android phone right from the Start menu
Windows 11 working on a laptop PC
Microsoft's big Windows 11 Start menu redesign is great news for OLED monitor owners like me – and you can try it right now
Latest in How Tos
Rory McIlroy using his driver for a tee shot at the US Open.
US Open 2025 live stream: how to watch the golf online, schedule, Round 1 tee times
Australian players celebrate winning the 2003 World Test Championship with the mace awarded to the winners
How to watch World Test Championship Final 2025 online: Australia vs South Africa
PARIS, FRANCE - JUNE 6: Jannik Sinner of Italy during his match against Novak Djokovic of Serbia in the semi-final of the Men&#039;s singles competition on Court Philippe-Chatrier during the 2025 French Open Tennis Tournament at Roland Garros on June 6th, 2025, in Paris, France. (Photo by Tim Clayton/Getty Images)
How to watch French Open for FREE – stream Alcaraz vs Sinner at no cost
PARIS, FRANCE - JUNE 06: Carlos Alcaraz of Spain looks on during the Men&#039;s Singles Semi Final match on Day Thirteen of the 2025 French Open at Roland Garros on June 06, 2025 in Paris, France. (Photo by Franco Arland/Getty Images)
How to watch Jannik Sinner vs Carlos Alcaraz: Live stream French Open tennis 2025 for free now, players on court
Apple developer beta announcement
How to download the macOS Tahoe 26 developer beta
Apple WWDC 2025
How to download the iOS 26 developer beta
LATEST ARTICLES
  1. 1
    This German startup wants to build portable quantum computers using diamonds - and says its QPU will sit next to a GPU or a CPU one day
  2. 2
    This Android AirTags rival finally got the one big feature it's been missing
  3. 3
    No, those amazing deals on Facebook aren't real - it's a scam, and here's how to spot it
  4. 4
    Can't access Spotify or a part of Google? Everything we know about this outage impacting major services
  5. 5
    I found this gaming mouse's multiple side buttons useful during testing, but its expensive given the lack of wireless play

TechRadar is part of Future US Inc, an international media group and leading digital publisher. Visit our corporate site.

  • About Us
  • Contact Future's experts
  • Contact Us
  • Terms and conditions
  • Privacy policy
  • Cookies policy
  • Advertise with us
  • Web notifications
  • Accessibility Statement
  • Careers

© Future US, Inc. Full 7th Floor, 130 West 42nd Street, New York, NY 10036.

Please login or signup to comment

Please wait...