Linux is an operating system, similar to Windows, but available in many different versions due to its open source and fully customizable nature. To install Linux, you must choose an installation method and select a Linux distribution.
To install Linux:
Choosing which method to use to install Linux depends on your needs and preferences.
Learn more about these options below.
For those of you using a Windows machine, this is the easiest way to install Linux. Just run the Linux installation command: to install the Ubuntu distribution. wsl --install
This method uses virtualization to integrate the Windows operating system (OS) with the Linux operating system (running on the actual Linux kernel). You can add as many different Linux distributions as you like and run your favorite Linux tools, including GUI applications, as well as your favorite Windows tools. You can also mix and match Bash and PowerShell commands on the same command line. The Linux file system hosts the project files, while a separate Windows file system hosts any developer tools that work with the files, such as VS Code. This method of running Linux is very efficient and performant. After you select a Linux distribution or choose to use the default Ubuntu distribution, follow the instructions for using the Install Linux command with the Windows Subsystem for Linux or learn more in the WSL documentation.
Whether you are using a Windows-based or MacOS-based computer, everyone can use it, but if you are in the cloud If you create a VM in the VM, you need an Azure account, or if you create the VM directly on your computer (locally), you need virtualization software.
A VM is a digital version of a physical computer and is used in environments where expanded hardware support levels (required memory and processing power) and security levels (anti-malware, encryption, backups, policy management, etc.) may be required Common options for running Linux.
Like WSL, you can create as many VM instances of different Linux distributions as you need and run them in an isolated environment without any conflicts, perfect for software development testing. While the performance of running a Linux distribution on WSL is slightly faster, Linux VMs are easier to clone or migrate. You can use virtualization software (also called a hypervisor) to create a virtual machine on a cloud service (such as Azure) or on your local computer.
Creating a VM on Azure means it is hosted in the cloud, on Microsoft's servers. Essentially renting computing resources from Microsoft and using them to run VMs. This is convenient if you need to provision new VMs quickly, or if you need to run workloads that require more computing resources than your local machine can provide. Larger enterprises with more complex needs often choose to run Linux VMs on Azure because of its scalability, control, and rich functionality. Learn more about the architecture, workflow, and considerations for running Linux VMs on Azure.
Creating a VM on a local computer requires virtualization using a hypervisor. Windows includes a "Type 1" hypervisor called Hyper-V that runs virtualization directly on the device hardware. There are also "type 2" hypervisors that run on top of the operating system, such as VirtualBox or VMware. If you are using a Mac, the most commonly recommended hypervisor is "Parallels Desktop", although this is a paid service. See Install a Linux VM on a Mac with an Apple M-series chip. VirtualBox also supports Windows and MacOS. For more information about how to design and run a custom Linux guest on an Apple silicon or Intel-based Mac, see Create and run a Linux virtual machine.
You are responsible for managing your virtual machines when using a hypervisor, including allocating resources such as memory and disk space, and ensuring that they are secure and up to date. This requires more technical expertise than some other options and may not be scalable or fault-tolerant.
After you select your distribution and decide whether you want to run your VM locally using a hypervisor or in the cloud using Azure, follow Create a Linux virtual machine in the cloud or Create a Linux virtual machine locally using a hypervisor Instructions for operating a virtual machine
Bare Metal Linux simply means Linux runs directly on the device hardware. This installation method requires you to create a bootable USB drive by downloading the iso installation file from the site hosting your chosen Linux distribution. You'll need to use a Windows computer (or any desktop device with an existing operating system) to create this drive.
Many users choose the traditional method of installing bare-metal Linux on a device that is also running Windows and uses the "dual boot" method. To dual-boot Linux and Windows, you need to partition your hard drive to create separate spaces for the Linux and Windows operating systems. Performance speeds between WSL, virtual machines, and bare metal Linux have become so close that few developers choose this approach because of the need to reboot (reboot) every time you want to switch between operating systems Equipment overhead. If you choose the bare-metal Linux installation route, you may also need to deal with potential driver issues or hardware compatibility issues that Linux may have on certain devices.
You can find a list of Popular Linux Distributions available for download on Linux.org. Once you've chosen a distro, follow the instructions to Create a bootable USB to install bare-metal Linux.
Different versions of Linux are called “distros” (sometimes abbreviated to “releases”). So there isn't really a way to "install Linux", you first need to choose the distribution of the Linux kernel you want to download and install. There are more than 600 active Linux distributions such as Ubuntu, Debian, Kali Linux, OpenSUSE, etc. There are many factors to consider when choosing a distribution, such as:
If you are new to Linux, you may want to start with Ubuntu. This is one of the most common starting points for Linux users due to the level of support and ease of use. Ubuntu is available in both desktop and server versions, depending on how you plan to use it. The specific tasks that the operating system will be responsible for can help you decide which distribution to use. Arch Linux is a popular choice for those who want a highly customizable, do-it-yourself approach that remains stable and well-supported by a large user base. This is a more complex starting point, but can help you better understand how Linux works due to the amount of custom configuration.
Minimal or "lightweight" distribution means a small footprint and low memory and processing speed requirements. Alpine Linux is a popular option and users will find that most features are disabled by default or not installed, but still has everything needed for containerized applications. Security needs: Some Linux users may have specific security issues to consider. Kali Linux is an example of a distribution designed for security tasks, such as penetration testing, security research, computer forensics, and reverse engineering.
Business, corporate, or academic environments may have unique concerns than consumer environments. Both Red Hat Enterprise Linux (RHEL) and Oracle Linux offer 24/7 global support and subscription-based services. CentOS is another popular enterprise distribution that is community supported yet still compatible with RHEL.
A large community of users who consistently contribute to the distribution, fixing bugs, adding features, helping with issues, etc. is another good consideration. Ubuntu is one of the most popular distributions. OpenSUSE has been around longer than most other distributions and still receives active updates. Many other distributions quickly became popular as the needs and preferences of the user community changed. The Linux.org website provides resources to help you evaluate what is available, well supported, or growing in popularity.
To install on a Windows PC For Linux, use the install Linux command.
wsl --install
By default, the install command will use the Ubuntu distribution of Linux. You can view other allocations available in Microsoft Store by entering the following command: . If you want to install a distribution other than Ubuntu, just add the name of the distribution you want to install to the command: wsl -l -o
-d
wsl --install -d <Distro Name>
If the distribution you want to install is not available in the Microsoft store, see the Windows Subsystem for Linux (WSL) documentation to learn how to import any Linux distribution for use with WSL.
Details on how to use VS Code, Git, databases, Docker, GUI apps, GPU acceleration, NodesJS, USB devices or mount disks, build custom distributions, manage disk space, or set up WSL for enterprise business, See the WSL documentation.
To create a Linux virtual machine (VM) hosted in the cloud on Azure, log in to the Azure portal and select Create virtual machine machine” service. Then follow the instructions to create a username, project, instance, SSH key, port, and copy IP address.
Azure supports various options for setting up Linux VMs in the cloud. For a quick start guide on how to set up a Linux VM, choose your preferred method:
If you don’t have an Azure subscription, create a free account before starting. If you're new to using Azure to create Linux VMs, you can learn more about VMs or check out the online training course: Create a Linux virtual machine in Azure.
To create a Linux VM hosted on your local computer using a hypervisor, you can Using:
You need to check the hardware requirements for your chosen hypervisor . After you enable or install the hypervisor, you need to select the type of operating system you want to install and the installation source (this is usually an .iso or .vhdx file). You need to name the VM, select the directory where you want to host the files, select the amount of memory you want to allocate to the VM, and the size of the virtual hard drive where the files will be stored (you can usually choose between a fixed or dynamically allocated amount of drive space). Integration with Linux virtual machines can sometimes be tricky due to display drivers and other hardware dependencies, but most hypervisors have an active user community that can help. If you want your VM to be connected to the Internet, you may also need to set up a virtual network.
If you are new to hypervisors and want to learn more, try the free online training module: Configuring and Managing Hyper-V Virtual Machines.
If you want bare-metal Linux, whether running the distro on its own on the device or dual-booting between the distro and Windows, here are the steps:
After successfully installing the Linux distribution, there are a few more important steps:
sudo apt update && sudo apt upgrade
The above is the detailed content of How to Download and Install Linux for Windows 11. For more information, please follow other related articles on the PHP Chinese website!