Install Linux shell on Windows 10: Difference between revisions
(First draft. Step by step missing) |
|||
(15 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
== Purpose == | == Purpose == | ||
To install and then run a full bash shell in Windows 10. This makes you able to use most of the shell functionality in Windows, from running scripts to using package managers. | To install and then run a full bash shell in Windows 10. This makes you able to use most of the shell functionality in Windows, from running scripts to using package managers. This could be of use for people new to Linux, or when you want to use a specific terminal tool and don't want to boot in Linux on a Windows/Linux dual boot. | ||
Next to that, there is a recipe to install an alternative to the default Windows command-line prompt: Hyper Terminal. This terminal is easier to use, and can be configured to open directly in the Linux shell. | |||
== Details == | == Details == | ||
Line 8: | Line 10: | ||
Technically this can't be called Linux, because the Linux kernel is replaced by the Linux subsystem in Windows. The only thing that is left are the GNU utilities and software. There are some limitations, of which the most important are that you can't use the shell for graphical software, server software, nor Windows software. You have however access to the Windows filesystem. | Technically this can't be called Linux, because the Linux kernel is replaced by the Linux subsystem in Windows. The only thing that is left are the GNU utilities and software. There are some limitations, of which the most important are that you can't use the shell for graphical software, server software, nor Windows software. You have however access to the Windows filesystem. | ||
== Step by Step Recipe == | == Step by Step Recipe - Ubuntu shell on Windows == | ||
* Make sure you run the 64 bit version of Windows 10 | |||
* Enable the developer mode. Go to the Settings app > Update & Security > For developers > Use developer features, where you select ''developer mode''. | |||
[[File:Developer mode.png|600px]] | |||
* Go to the Windows 10 search and search for ''Turn Windows features on or off''. Open the best match, scroll through the list and select ''Windows subsystem for Linux''. Click Ok. | |||
[[File:Screenshot (5).png|600px]][[File:Screenshot (6).png|600px]] | |||
* Reboot your PC. This might take a while. | |||
* Open the Windows Store and search for Ubuntu. Install the app. | |||
[[File:Screenshot (1).png|600px]] | |||
* Click on the Ubuntu button in the start menu, or use the command ''ubuntu'' in the command prompt (Windows 10 search for ''cmd'') | |||
* Let the script run and go through the steps to make a user account. You can use any username or password, but it might be convenient to use the same user credentials as for your Windows installation. | |||
* You are ready to go! Use the command ''bash'' to get into the Linux shell in your command line app of choice. | |||
[[File:Screenshot (8).png|600px]] | |||
== Step by Step Recipe - Hyper Terminal == | |||
* Download Hyper from https://hyper.is/ | |||
* Install the application | |||
* After installing, open Hyper and go to the menu > Edit > Preferences (or use control + comma ) | |||
[[File:Screenshot (3).png|600px]] | |||
* The .hyper.js configuration file opens. Find the ''shell'' line and change it to ''shell: 'C:\\Windows\\System32\\bash.exe',''. | |||
[[File:Screenshot (4).png|600px]] | |||
* Save and close the file. | |||
== And then? == | == And then? == | ||
Line 18: | Line 50: | ||
[[Category:Cookbook]] | [[Category:Cookbook]] | ||
== Sources == | |||
* https://www.howtogeek.com/249966/how-to-install-and-use-the-linux-bash-shell-on-windows-10/ | |||
* https://char.gd/blog/2017/how-to-set-up-the-perfect-modern-dev-environment-on-windows | |||
* https://msdn.microsoft.com/en-us/commandline/wsl/about |
Latest revision as of 23:19, 4 December 2017
Purpose
To install and then run a full bash shell in Windows 10. This makes you able to use most of the shell functionality in Windows, from running scripts to using package managers. This could be of use for people new to Linux, or when you want to use a specific terminal tool and don't want to boot in Linux on a Windows/Linux dual boot.
Next to that, there is a recipe to install an alternative to the default Windows command-line prompt: Hyper Terminal. This terminal is easier to use, and can be configured to open directly in the Linux shell.
Details
This solution is not a virtual machine, but makes use of the Linux subsystem which is part of Windows 10. Microsoft collaborated with Canonical on developing a distribution of the Ubuntu shell that runs on this subsystem. Technically this can't be called Linux, because the Linux kernel is replaced by the Linux subsystem in Windows. The only thing that is left are the GNU utilities and software. There are some limitations, of which the most important are that you can't use the shell for graphical software, server software, nor Windows software. You have however access to the Windows filesystem.
Step by Step Recipe - Ubuntu shell on Windows
- Make sure you run the 64 bit version of Windows 10
- Enable the developer mode. Go to the Settings app > Update & Security > For developers > Use developer features, where you select developer mode.
- Go to the Windows 10 search and search for Turn Windows features on or off. Open the best match, scroll through the list and select Windows subsystem for Linux. Click Ok.
- Reboot your PC. This might take a while.
- Open the Windows Store and search for Ubuntu. Install the app.
- Click on the Ubuntu button in the start menu, or use the command ubuntu in the command prompt (Windows 10 search for cmd)
- Let the script run and go through the steps to make a user account. You can use any username or password, but it might be convenient to use the same user credentials as for your Windows installation.
- You are ready to go! Use the command bash to get into the Linux shell in your command line app of choice.
Step by Step Recipe - Hyper Terminal
- Download Hyper from https://hyper.is/
- Install the application
- After installing, open Hyper and go to the menu > Edit > Preferences (or use control + comma )
- The .hyper.js configuration file opens. Find the shell line and change it to shell: 'C:\\Windows\\System32\\bash.exe',.
- Save and close the file.
And then?
If all went well:
- If you open the default windows command prompt, the command bash will let you enter the Ubuntu shell
- If you open Hyper you will automatically enter the Ubuntu shell