How to install linux in windows 10

Anonim

Installing Linux in Windows 10
The Windows 10 has a new feature for developers - the Ubuntu Bash shell, which allows you to run, install Linux applications, use Bash scripts directly in Windows 10, all this is called the "Windows subsystem for Linux". In the version of Windows 10 1709 Fall Creators Update already have three Linux distributions for installation. In all cases, a 64-bit system is required.

In this manual, how to install Ubuntu, OpenSUSE or SUSE Linux Enterprise Server in Windows 10 and some examples of use at the end of the article. It should also be borne in mind that there are some restrictions when using Bash in Windows: for example, you cannot run the GUI application (however, according to the bypass paths using X Server). In addition, the Bash commands cannot be launched Windows programs, despite the availability of full access to the OS file system.

Installing Ubuntu, OpenSUSE or SUSE Linux Enterprise Server in Windows 10

Starting from the version of Windows 10 Fall Creators Update (version 1709) Installing the Linux subsystem for Windows has changed somewhat compared to what was in previous versions (for previous versions, starting from 1607, when the function was presented in the beta version, the instruction in The second part of this article). Also note that in Windows 10 2004 you can install Kali Linux with a graphical interface.

Now the necessary steps look like this:

  1. First of all, you must enable the "Windows subsystem for Linux" in the control panel - "Programs and Components" - "Enable and disable Windows components".
    Enabling Linux components for Windows 10
  2. After installing the components and reboot the computer, go to the Windows 10 application store and download Ubuntu, OpenSUSE or SUSE Linux ES (yes, three distributions are now available). When loading, some nuances are possible, which further in the notes.
    Linux distributions in the Windows 10 Store
  3. Run the downloaded distribution kit as the usual Windows 10 application and follow the initial setting (username and password).
    Setting up Ubuntu Linux in Windows 10 1709

To enable the Windows subsystem for Linux (first step), you can use the PowerShell command:

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

Now a few notes that can be useful when installing:

  • You can set several Linux distributions at once.
  • When downloading the Ubuntu, OpenSUSE and SUSE Linux Enterprise Server distributions in the Russian-language store, Windows 10 noted the following nuance: if you simply enter the name and press Enter, then the desired results do not turn out to be in the search, but if you start entering and then click on the appearing prompt, you automatically get on The desired page. Just in case direct links to distributions in the store: Ubuntu, OpenSUSE, SUSE LES.
  • You can run Linux from the command line (not only from the tile in the Start menu): Ubuntu, OpenSUSE-42 or SLES-12

Installing Bash in Windows 10 1607 and 1703

In order to install the BASH shell, follow these simple actions.

  1. Go to Windows 10 settings - update and security - for developers. Turn on the developer mode (the Internet must be connected to download the necessary components).
    Enable Developer Mode in Windows 10
  2. Go to the Control Panel - Programs and Components - Enable or Disable Windows Components, check the Windows Subsystem for Linux.
    Installing the Linux subsystem in Windows 10
  3. After installing the components, enter Windows 10 "BASH" search, start the proposed application option and install. You can set your username and password for Bash, or use the root user without a password.
    Installing Ubuntu Bash

When the installation is completed, you can run Ubuntu Bash on Windows 10 through the search, or creating a label for the shell where you need.

Running Ubuntu Bash in Windows 10

Examples of using Ubuntu Shell in Windows

To begin, I note that the author is not a specialist in Bash, Linux and development, and the examples below are just a demonstration that in Windows 10 Bash works with expected results for those who understand this.

Applications Linux

Applications in Windows 10 Bash can be installed, delete and updated using APT-GET (sudo apt-get) from the Ubuntu repository.

APT-GET INSTALL in Windows 10

Using applications with a text interface is no different from that of Ubuntu, for example, you can install Git in Bash and use it in the usual way.

Using Bash Git in Windows 10

Scripts Bash

You can run Bash scripts in Windows 10, you can create them in the Nano text editor in the shell.

Bash scripts in Windows 10

BASH scripts cannot cause Windows programs and commands, but it is possible to launch scripts and bash commands from BAT files and PowerShell scripts:

Bash -c "Team"

You can also try to run applications with a graphical interface in Ubuntu Shell in Windows 10, there is no one account on the Internet, there is no one manual and the essence of the method comes down to using XMing X Server to display the GUI application. Although the possibility of working with such Microsoft applications is not claimed.

As was written above, I am not the person who can fully appreciate the value and functionality of the innovation, but I see at least one application for yourself: various courses Udacity, EDX and other related to the development will be much easier, working with the necessary tools Right in Bash (and in these courses, work is usually demonstrated in the MacOS and Linux Bash terminal).

Read more