+5 votes
116 views
How to Download and Use Linux on Windows 10 Quick and Easy (Command Line)

in Applications by (552k points)
reopened | 116 views

1 Answer

+3 votes
Best answer

How to get Linux on Windows 10 easily
What is Linux for (an example)
Step 1: Run PowerShell on Windows
Step 2: Install Windows Subsystem for Linux
Step 3: Restart the PC
Step 4: Download and install the Linux distro
Step 5: Run and configure Linux on Windows

Normally you shouldn't need Linux at any time, since practically any software you need is available for Windows. However, on a couple of occasions I have come across information on the Internet where it is required or where it is easier to use Linux than Windows. The specific case is the Lineage OS script for signature verification, which requires packages such as git or python . Another case is that of the node.js utility , which is used to use the Archon Custom Runtime . It is not that these types of packages or programs are not available for Windows. They are, but in addition to the fact that the information about it is more sufficient for Linux and sometimes it is the only thing there is, in this operating system the acquisition of these packages is easier because they are available in fixed repositories (something like application stores) accessible from the same system and that can be installed with a simple command, while for Windows you must search for them on the Internet.

How to get Linux on Windows 10 easily

image

Although you could use Linux on your PC by installing it as an alternate boot system (dual boot) or as a virtual machine using programs like Virtual Box, this is relatively complex and time consuming. The simplest way is to install the Windows Subsystem for Linux or WSL ( Windows Subsystem for Linux ). Microsoft has a comprehensive, easy-to-follow guide in Spanish for this procedure.

There are two methods to install this WSL system: the simplified installation and the manual installation. In this article I will use the manual installation, which allows you to install WSL version 1, since it is the only thing that works or can be installed in versions of Windows 10 that are old or prior to compilation 18362, as in my case compilation 17134.

If you have a more current version of Windows 10, build 18362 onwards, you can install WSL 2 and even use the simplified installation method, however, WSL 1 should be sufficient for basic Linux use. Even though WSL 2 has some more features than WSL 1 , Microsoft recommends WSL 1 in some particular cases.

image

Note : To find out what compilation your Windows 10 is, type "system information" in the search magnifying glass next to the start button. Click on the "System Information" result. In the window that will open, where it says "Version" you will find the build number of your Windows. Also check where it says "System Type" that indicates "x64-based PC". If it says ARM64 the build number will be different, but you should still be able to install at least WSL 1.

Step 1: Run PowerShell on Windows

image

In the search magnifying glass next to the Windows start button, type "powershell." In the result that says Windows PowerShell, right click and then, in the list of options, left click on "Run as administrator". In the warning window "Do you want to allow this application to make changes to your device" click "Yes".

Step 2: Install Windows Subsystem for Linux

image

A single incorrect underscore in the command can lead to an error, as seen at the beginning. When correcting it, the command is accepted without problem and WSL is installed.

In the PowerShell window you must enter the following command and then press the Enter key. Make sure everything is correct, as a single incorrect character will generate an error, as seen in the first part of the image above.

dism.exe / online / enable-feature / featurename: Microsoft-Windows-Subsystem-Linux / all / norestart

Step 3: Restart the PC

Microsoft indicates it, so go to the Windows start button, click on the "Power" button and then "Restart."

Step 4: Download and install the Linux distro

image

Linux comes in different "flavors", variants or distros for Windows 10. The most popular is Ubuntu , but there is also OpenSUSE , Debian , Fedora , Pengwin , Kali or Alpine , which can be easily downloaded and installed in one click on your PC from the Microsoft Store that comes pre-installed on Windows 10. Once on the download screen, just click the "Get" button and the distro will download and install automatically.

Step 5: Run and configure Linux on Windows

image

When the download and installation is complete, you will see a notice in the Windows 10 message panel. Touch the "Start" button to start your Linux command line.

image

The username admin is not allowed and an error is generated. By changing to "user" it is accepted by the system and is configured.

Linux setup is really just about setting your system username and password.

image

Here in WSL 1 the Lineage OS signature verifier is being used to check if the signature of a Lineage OS zip or ROM downloaded from the Internet is correct, invalid or the ROM is blocked from reading.

Once you have done all of the above you are ready to use the Linux command line, as you can see above.

What is Linux for (an example)

In Linux, it is much easier to use command-line-based programs or "packages" that Windows does not offer and that are difficult to install.

image

git, pip and python can be easily used on Windows thanks to WSL. And thanks to that the LineageOS signature verifier can be used in Windows without problems.

For example, LineageOS offers a script that allows you to verify the signature of a ROM and know if it is official or not, in case you download it from a place other than the lineageos.org website. However, the installation of this script is relatively complex on Windows, while on Linux you can easily do it in a couple of commands, as you can see above.

Note : In case you don't know, the WSL / mnt / c directory is the same as C: / on Windows. And in other words, the root directory of the user that you created in Linux can be found here in Windows:

C:\Users\Tunombre\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu18.04onWindows_79rhkp1fndgsc\LocalState\rootfs\home\usuario


by (3.5m points)

Related questions

+5 votes
1 answer
asked Apr 30, 2020 in Linux / Unix by backtothefuture (552k points) | 308 views
+4 votes
1 answer
+3 votes
1 answer
asked Oct 5, 2019 in Linux / Unix by backtothefuture (552k points) | 822 views
+5 votes
1 answer
asked Oct 25, 2023 in Guides by backtothefuture (552k points) | 58 views
+5 votes
1 answer
asked Feb 10, 2021 in PlayStation by backtothefuture (552k points) | 169 views
Sponsored articles cost $40 per post. You can contact us via Feedback

Most popular questions within the last 30 days

10,659 questions
10,791 answers
510 comments
3 users