How to install Linux

How to install Linux - There are various versions, called "distributions" or "distros", most of which are 100% free. Among the best known are certainly Ubuntu and Linux Mint which, thanks to an enormous work by the developers and the community, greatly simplify the installation

How to install Linux

After hearing a lot about it from your geek friends, you too have finally decided to try something different and install Linux on your computer. Linux, as it is now known, is an alternative operating system to Windows and macOS that is based on the open source philosophy. Its source code can be freely viewed, modified and redistributed by everyone.

There are various versions, called "distributions" or "distros", most of which are 100% free. Among the best known are certainly Ubuntu and Linux Mint which, thanks to an enormous work by the developers and the community, greatly simplify the installation of the operating system and offer high compatibility with most of the hardware components available on the market. thus making the tedious manual configuration phase superfluous.

Another very important thing to underline is that distributions like these include very famous applications, such as LibreOffice and Mozilla Firefox, and that they are compatible with other software that you will surely have learned about on Windows, such as Chrome, GIMP and many others. In short: if you want to find out how to install Linux in a simple way, you just have to read this guide: you will find all the instructions you need right below.

How to install Linux on Windows

To be able to install Linux on Windows quickly and easily, you can follow at least two procedures: use the WSL utility built into Windows 10, or rely on a virtual machine manager, such as VirtualBox . Below I'll explain everything in detail.

How to install Linux on Windows 10

Windows 10 introduced a component, called WSL or Windows Subsystem for Linux ), which allows you to run Linux in a virtual environment seamlessly integrated with the Microsoft operating system. Thanks to WSL, you can download some of the most popular Linux distributions directly from the Microsoft Store , in just a few clicks.

To activate WSL, click on the Windows 10 search bar , on the Cortana symbol or on the Start button (the flag icon resident in the lower left corner of the screen), type the words activate or deactivate Windows functionality in the search field and select the first result that appears, the one identified by the wording Control Panel .

Once in the new window, locate the items Windows subsystem for Linux and Virtual machine platform (if present), put the check mark next to each of them and click on the OK button , in order to install everything. When prompted, restart your computer for the changes to take effect and enable WSL.

At the next restart, if you have also installed the virtual machine platform, you must set it as default: to do this, open PowerShell (you can call the utility by right-clicking on the Start button and clicking on the appropriate item attached to the menu that appears) , issue the command inside it wsl --set-default-version 2and apply the change by pressing the Enter key on the keyboard.

Once this step is completed, open the Microsoft Store and download the distribution of your choice among those available, which are currently: Ubuntu 20.04 , Ubuntu 18.04 , Ubuntu 16.04 , Debian , Kali Linux , OpenSUSE Leap 15.1 , SLES 12 SP5 , SLES 15 SP1 , Fedora Remixes for WSL , Pengwin and Pengwin Enterprise (the latter two for a fee).

Once you have chosen the distro you like, click on one of the links I just provided and install it, pressing the Get , Open Microsoft Store and Get buttons . Once the installation is complete, you can start Linux using the icon that, in the meantime, has been created in the Start menu .

During the first run, Windows will configure Linux and, when necessary, will ask you to configure the system administration username and password ; made this choice, you will be shown the textual shell of the distribution you have chosen, immediately operational.

In order to run a graphical interface, you will need to install a third-party graphics server that can host Linux programs (or the entire desktop), such as Xming , as this component is not included in WSL. To get it, open this website , wait for the program to download, and once you have the file, run it. Then, click on the Next button six consecutive times and complete the Xming installation by pressing the Install and Finish buttons . If requested, authorize the server to connect to the local network by clicking on the Allow access button .

The next step is to instruct Linux to use Xming to run programs with a graphical interface: using the text shell opened previously, enter the commands export DISPLAY=:0.0and echo “export DISPLAY=:0.0” > $HOME/.bashrc, each followed by pressing the Enter key on the keyboard.

Once this step has been completed, you are ready to use all Linux programs, graphical and textual: if, for example, you have chosen to install Ubuntu and use the Xfce desktop , install the latter by issuing the command sudo apt update && sudo apt install xfce4 x11-apps lightdm, followed by pressing the Enter key . When prompted, choose to use lightdm as the default window manager and, at the end of the installation, start Xfce by issuing the command xfce4-session, always followed by pressing the Enter key .

How to install Linux on VirtualBox

If WSL is not for you because it is a bit too complex or, again, if you want to get ready to install Linux on a physical machine, you can take advantage of a virtual machine emulator, such as VirtualBox . Programs of this kind allow you to create a virtual computer inside a physical PC, providing the user with a safe environment on which to operate, without the changes made affecting the operating system and the resources belonging to the real computer.

To proceed in this sense, first of all, take the ISO image from the Internet containing the Linux distribution of your choice ( Ubuntu , Kali Linux , Fedora , Linux Mint , OpenSuSE ) and wait for the download to be completed.

After choosing and downloading the distribution of your interest, proceed with the installation of VirtualBox: connect, therefore, to the program's website and click on the Windows Hosts link , to start downloading the program's installation package.

Once you have obtained the VirtualBox.exe file, start it, click on the Next button three consecutive times and then on the Yes , Install and Yes buttons . If necessary, authorize the installation of any add-ons by pressing the Install button several times . At the end of the setup, then click on the Finish button to close the window and start VirtualBox.

Once you have reached the main screen of the program, click on the New button to start the creation of the virtual machine: therefore, indicate a name to be assigned to it (eg Linux Mint ) and set the Type and Version drop-down menus using the most suitable parameters. appropriate for the Linux distribution you are about to use.

Once this is done, click on the Next button , set the amount of RAM to be assigned to the new virtual machine (it must not exceed half of the total RAM available on the PC), press the Next button again and, if it is not already present, affix the sign of check next to the item Create a new virtual hard disk immediately and click on the Create button , to move on to the creation of the virtual hard disk.

Now, indicate that you want to use the VDI format , press the Next button , put the check mark next to the option Dynamically allocated (so as to occupy space on the real disk only when necessary), press the Next button again and indicate the size of the virtual disk, using the adjustment bar or the text box at the bottom.

Finally, click on the Create button to finish making the disk and save the virtual machine files on your computer. If you need some more clarification regarding the steps just seen, I recommend that you learn more by consulting my tutorial on how to use VirtualBox .

Finally here we are: it's time to start the new virtual machine! Once you return to the main VirtualBox screen, double-click on the name of the VM you just created and proceed with the selection of the boot disk by clicking on the yellow folder icon ; choose the Linux ISO image downloaded previously through the panel that is proposed to you .

Now, click on the Start button and wait a few minutes for the virtual machine to initialize everything: with a bit of luck, the chosen distribution should start, showing you the installation wizard window.

At this point, all you have to do is follow the instructions provided on the screen, to proceed: therefore choose the language to use for the installation, the keyboard format , the time zone and the options for downloading the updates and, when requested, choose to want to install Linux on the entire disk , as it is a virtual machine totally dedicated to the aforementioned operating system.

Finally, you should be asked to specify a username and password to be used to access the system: after making this choice, the files that make up the operating system will eventually be copied (and downloaded, if necessary). Upon completion of the installation, you will be prompted to restart your computer in order to access the Linux virtual environment, which should work fine.

How to install Linux from USB

After doing a lot of experience with virtual machines, are you finally ready to dual boot Linux with Windows by copying the operating system installation files to a USB stick ? Then this is the section of the tutorial that suits you best.

However, since you are going to be operating on a real system, you should be aware that if you make a mistake, you could compromise your copy of Windows , along with all the other data on the disk. For this reason, before starting, I believe it is my duty to advise you to make a backup copy of your personal files on a sufficiently large external disk : for more precise information on what to do, I refer you to reading my tutorial dedicated to the subject.

Alternatively, you can create a real "picture" of Windows and the entire disk, to be restored in case the Linux installation goes in the worst way and irreparably damages the computer software: I explained how to do it in my guide to cloning hard disk with operating system .

Create the USB key

After securing the data, download the ISO image of the Linux distribution you prefer and copy it to a sufficiently large USB stick (and without data, as those already present will be deleted) using a program like Rufus : to obtain it, connect to its website and click on the item Rufus XX Portable . When the download is complete, run the .exe file obtained and click on the Yes button , to obtain any updates automatically.

Now, connect the USB stick to your computer, select its name from the Rufus Device / Drive drop-down menu, set the Boot Selection drop-down menu to Disk Image or ISO and press the Select button , to choose the ISO image to copy.

When you are done, check the accuracy of the data (leaving all other options unchanged) and click on the Start and OK buttons to create the USB drive; keep in mind that, following this operation, the data already present on the key will be deleted ( more info here ).

Disable Fast Boot and Secure Boot

Once the key has been created, you must disable Windows 10 fast startup : the latter is very useful for speeding up the startup of the operating system, however it can block your computer's disks and make them inaccessible to Linux. To do this, right-click on the Windows Start button, choose Shutdown Options from the menu that appears and click on the Additional power management settings link , located in the window that appears.

Once you have reached the Control Panel screen, click on the item Specify behavior of resident power buttons on the left, press on the wording Change the settings currently unavailable and remove the check mark from the box next to the item Enable quick start (recommended) . Finally, click on the Save Changes button , located at the bottom.

Now, restart your computer, enter the BIOS / UEFI , disable Secure Boot (the security feature that prevents unsigned operating systems from booting) and, if necessary, set the computer to boot from USB . If you don't know how to complete these operations, I recommend that you carefully read my guide on how to access the BIOS / UEFI .

Install Linux Mint

At this stage, insert the USB key into the computer, restart it and, after a few minutes, you should find yourself in the presence of the boot loader belonging to the choice: starting from this moment, I will refer specifically to the Linux Mint distribution , however the steps shown can be easily replicated to many other distributions.

In any case, when you reach the bootloader, select the Start Linux item , if necessary, press the Enter key on the keyboard and wait for the operating system to start. When you see the Linux desk, if you deem it appropriate, you can connect to the Internet by clicking on the Wi-Fi symbol , (on Mint resident at the bottom right), in order to facilitate the download of updates and any add-ons.

Next, double click on the disk icon marked Install Linux , select the language to use for the installation (presumably Italian ) from the left sidebar and press the Next button . Then choose the layout of the keyboard , click again on the Next button and indicate whether or not to install the multimedia codecs , by placing the check mark next to the appropriate box.

Once this is done, click on the Next button to move on to the disk partitioning phase: since you have decided to create a dual boot system, put the check mark next to the item Install Linux next to Windows 10 , click on the Next button and use the bar vertical present between the two partitions, to define the space to be dedicated to Windows and that to be dedicated to Linux. If you have multiple disks on your PC, make sure the correct one is specified in the Disk Selection drop-down list.

After carefully checking the defined settings, click on the Install button and then on the Next button two consecutive times, in order to change the disk partitions as specified above and start copying the operating system files.

In the meantime, choose the time zone to use, using the map displayed on the screen or using the text box located below, click on the Next button and fill in the next form providing the requested information: your name , computer name , a username to use for login and a password to protect the profile (twice in a row). It therefore specifies whether to log in automatically or whether to require a personal password to log in and whether or not to encrypt the personal folder.

At this point, you just have to click on the Next button and wait for the Linux installation to complete and for any updates to be downloaded from the Internet: this operation could take up to a few tens of minutes.

Once the installation is complete, you just have to click on the Restart now button and press the Enter key when prompted; at the next reboot, if everything went well, you should see the Linux bootloader, thanks to which you can choose whether to start the latter operating system or Windows 10.

How to install Linux on Mac

You don't have a Windows PC but a Mac and would like to be able to use Linux on your Apple computer too? In that case, unless you're extremely knowledgeable on the subject, I don't recommend physically installing Linux alongside macOS, as Apple's security restrictions could make it too difficult.

Alternatively, you can download and install a virtual machine manager such as VirtualBox on your computer and use it to use Linux in virtual mode: if you need a step-by-step guide dedicated to downloading and installing VirtualBox, I refer you to reading this mine . guide . Once the setup is complete and the program is started, you just have to create a virtual machine containing the distribution you prefer, following exactly the same steps seen for Windows .

Note: if you have a Mac with Apple Silicon chip (eg M1) and not Intel, you cannot install any operating system in dual boot with macOS. As for virtual machines, at the time of writing there is very little working, but in any case you will be able to virtualize only operating systems designed for ARM systems and not for the Intel / AMD platform.