- How to create a Linux virtual machine on Windows 10 using Hyper-V
- Guide requirements
- How to enable Hyper-V on Windows 10
- Verifying Hyper-V support
- Enabling Hyper-V
- How to create a virtual machine using Hyper-V
- Creating a virtual switch
- Creating a virtual machine
- How to install Ubuntu Linux using Hyper-V on Windows 10
- More Windows 10 resources
- This Diablo 2: Resurrected Amazon guide will get you off to a hot start
- Battlefield 2042’s Orbital map isn’t scratching my Battlefield itch
- Surface Laptop Studio and an eGPU sound great, but are the pair practical?
- The NFL is back! Check out these must-have Windows apps for football fans
- Как работать с Linux используя Windows
- Ubuntu из Microsoft Store
- VirtualBox
How to create a Linux virtual machine on Windows 10 using Hyper-V
Although it’s now possible to run a number of Linux distros natively on Windows 10, these environments can be somewhat limited in features and tools you can use. Also, you can only pick from three distros, including Ubuntu, SUSE Linux Enterprise, and OpenSUSE Leap, and you’re stuck with the command-line interface, which means that you can’t run any of the graphical experiences (e.g., GNOME, KDE, XFCE) or Linux-based graphical applications.
Of course, you can always install your favorite Linux distro on a second machine, but if you don’t have one, it’s still possible to run a full-blown version of Linux using a virtual machine (VM).
If you’re running Windows 10, you can enable Hyper-V on your device to create a VM to install your preferred distro whether you’re a developer or an enthusiast who just wants to know what’s the Linux fuzz all about.
In this Windows 10 guide, we’ll walk you through the steps to install most Linux distributions on virtual machines using Microsoft’s Hyper-V virtualization feature.
Guide requirements
To run a Linux virtual machine on Windows 10, you’ll need the following:
- A computer with support for Hyper-V.
- An ISO file to install your preferred Linux distribution.
In this guide, we’ll be using Ubuntu version 17.10, which you can download from the official Ubuntu website. However, it’s possible to install version 16.04, which might be a more stable version of the open source project, and you can also install other distros, including:
- CentOS and Red Hat Enterprise Linux.
- Debian.
- SUSE.
- Oracle Linux.
- FreeBSD.
How to enable Hyper-V on Windows 10
Hyper-V is a virtualization technology from Microsoft available on Windows 10 Pro, Enterprise, and Education, and it allows you to create one or multiple virtual machines to install and run different OSes on the same physical hardware.
Verifying Hyper-V support
Although Hyper-V is part of Windows 10, there is a minimum hardware requirement a computer must meet to enable the feature.
- 64-bit CPU with Second Level Address Translation (SLAT).
- Processor must support VM Monitor Mode Extension (VT-c on Intel chips).
- 4GB of memory at a minimum.
In addition, you have to make sure the Virtualization Technology and Hardware Enforced Data Execution Prevention options are enabled on your system BIOS.
You can quickly verify your computer has the required support for Hyper-V using Systeminfo:
- Open Start.
- Search for Command Prompt and click the top result.
Type the following command and press Enter:
Under Hyper-V Requirements, if the result reads Yes, then you can run Hyper-V.
If the command displays No under Hyper-V Requirements, then your hardware doesn’t support this feature, or you need to make sure to enable it manually.
Enabling Hyper-V
Use the following steps to enable Hyper-V on Windows 10:
- Open Control Panel.
- Click on Programs.
Click on Turn Windows features on or off.
Click OK to begin the process.
After the installation completes, click Restart now to apply the changes.
How to create a virtual machine using Hyper-V
Once you’ve completed adding the virtualization layer to Windows 10, you’ll need to create a virtual machine for the Linux distribution you want to use.
However, before you do that, you must create a virtual switch to allow the VM to connect to the internet.
Creating a virtual switch
Use the following steps to configure a virtual switch on Hyper-V:
- Open Start.
- Search for Hyper-V Manager and click the top result.
- Click on the Action menu.
Select New and click on Virtual Switch Manager.
Click the Create Virtual Switch button.
Click OK.
Creating a virtual machine
After creating the virtual switch, you can proceed to create a new virtual machine:
- Open Start.
- Search for Hyper-V Manager and click the top result.
- Click on the Action menu.
Select New and click on Virtual Machine.
Enter a descriptive name for your virtual machine (e.g., vm-ubuntu).
Click Next.
Select the amount of RAM to allocate for your virtual machine. In the case of Ubuntu, you need a minimum of 2GB of memory.
You can allocate as much memory as you want, but this setting will always depend on the physical memory available on your computer.
Click Next.
Click Next.
Click Next to continue.
Click Next.
How to install Ubuntu Linux using Hyper-V on Windows 10
The last step is to start the virtual machine and install the Linux distribution you want to use.
On Hyper-V Manager, under Virtual Machine, right-click the newly created device, and select Connect.
Click the Start (power) button.
Click the Install Ubuntu button.
Click Continue.
Click Continue.
Double-click the /dev/sda drive.
Double-click free space.
Click OK.
Double-click free space again.
Click OK.
Click the Install Now button.
Click Continue.
Click Continue.
Click Continue.
Restart the virtual machine to finish the setup.
Quick Tip: If during the final restart process, you get a message to remove the installation and press Enter, but hitting the key won’t restart the VM, just click the Turn off button and then turn it back on again.
After completing the steps, you can just turn on the VM and start using Ubuntu Linux alongside Windows 10.
While we’re focusing this guide setting up Ubuntu, you can also refer to these instructions to run other distributions of Linux.
More Windows 10 resources
For more helpful articles, coverage, and answers to common questions about Windows 10, visit the following resources:
This Diablo 2: Resurrected Amazon guide will get you off to a hot start
Thinking about trying out the Amazon in Diablo 2: Resurrected? Good choice. Our guide will walk you through the leveling process, magic finding, what gear to look out for, and more.
Battlefield 2042’s Orbital map isn’t scratching my Battlefield itch
Battlefield 2042’s Orbital map has been available to play on during the beta, but after spending 15 hours on it, I’m feeling incredibly underwhelmed. Is this the best DICE can do?
Surface Laptop Studio and an eGPU sound great, but are the pair practical?
The Surface Laptop Studio packs a lot of power for its size, but is adding an external GPU (eGPU) the best choice? While it can work, some hiccups are possible. Here’s what we’ve learned after running a 3080 Ti for 24 hours.
The NFL is back! Check out these must-have Windows apps for football fans
After months of waiting through the offseason, the NFL is finally back this week. With these Windows 10 apps, you won’t miss a snap of the NFL action.
Источник
Как работать с Linux используя Windows
Если вы только начали свой путь разработчика и до сих используете операционную систему семейства Microsoft Windows, то уже наверняка столкнулись с ситуацией, когда ваш инструментарий отличается от того, что установлено у большинства людей из этой профессии. Чаще всего проблемы начинаются при работе в командной строке. Дело в том, что Windows не является POSIX-совместимой операционной системой, поэтому в ней отсутствует базовый набор прикладных программ, который необходим для разработки.
Этот вопрос можно решить установкой какого-либо из многочисленных дистрибутивов Linux в качестве основной, либо альтернативной операционной системы. Для новичков есть способ проще и быстрее — технологии виртуализации. Об этом и поговорим.
Ubuntu из Microsoft Store
Если вы работаете на Windows версии 10 с архитектурой x64, то можно можно воспользоваться встроенным решением и установить слой совместимости (Windows Subsystem for Linux) на основе Ubuntu Linux через магазин приложений Microsoft Store.
Перед тем как начать, необходимо убедиться, что системные требования соответствуют рекомендованным. Для этого запустите приложение Microsoft Store, введите в графе поиска Ubuntu и перейдите по найденной ссылке. Если ранее Windows не обновлялся, то вероятней всего вы получите соответствующее указание сделать это до начала установки Ubuntu. Если всё OK, то нажимайте на кнопку «Получить» и через несколько минут (в зависимости от скорости интернет соединения) вы получите сигнал об успешной установке приложения.
Первый запуск может вызвать ошибку Error: 0x8007007e и предложение прочитать инструкцию по её решению https://aka.ms/wslinstall. Если хотите сэкономить время, то просто запустите PowerShell (не путать с cmd ) от имени администратора и выполните следующую команду:
После этого компьютер попросит перегрузиться, а потом нужно снова запустить приложение Ubuntu. В случае удачной установки откроется интерпретатор командной строки с предложением ввести имя пользователя и пароль. Выглядеть это будет вот так:
Преимущество такого способа установки позволяют стереть грань между операционными системами и получить доступ ко всему инструментарию Linux ( bash , ssh , git , apt и так далее) из стандартной командной строки Windows не теряя привычное окружение и оставаясь на одном файловом уровне.
Ссылки на официальную документацию:
VirtualBox
Если вы работаете на Windows версии ниже 10 или хотите получить изолированную операционную систему Linux, да ещё и с графическим окружением, то можно воспользоваться сторонним бесплатным программным продуктом под названием VirtualBox.
Инсталлятор Oracle VM VirtualBox для Windows Hosts
Ссылка на скачивание: Download Oracle VM VirtualBox
Образ операционной системы Ubuntu Linux в формате ISO
Ссылка на скачивание: Download Ubuntu Desktop
Для начала необходимо установить и запустить приложение VirtualBox.
Нажимаем кнопку «Создать», выбираем из списка тип операционной системы «Linux», если нет своих предпочтений по дистрибутиву, то выбираем версию «Ubuntu» 32 или 64 битной архитектуры, а название можно ввести любое.
Указываем объём оперативной памяти выделенной под виртуальную систему. Рекомендованный объём составляет 1024 MB.
Указываем объём дискового пространства выделенного под виртуальную систему. Рекомендованный объём составляет 10 GB.
Тип виртуального жёсткого диска можно оставить как есть — VDI (VitrualBox Disk Image).
Формат хранения данных выберите исходя из личных предпочтений. Динамический виртуальный жёсткий диск растёт по мере заполнения, а фиксированный создаётся сразу того размера, который был указан на предыдущем шаге.
Имя и размер файла можно оставить без изменений и сразу нажать на кнопку «Создать».
По завершению у вас будет создана виртуальная машина, но она пока без операционной системы. Для того чтобы её установить, нужно скачать Ubuntu Linux (32-bit или 64-bit, в зависимости от того, что было выбрано на шаге, где мы указывали тип ОС).
Нажатие на кнопку «Запустить» должно привести к появлению диалогового окна с предложением указать путь до скаченного ISO образа. Сделайте этого и нажмите кнопку «Продолжить»
Виртуальная машина автоматически будет выполнять часть процессов, но в некоторых операциях всё же потребуется участие пользователя.
Выберите языковую поддержку в списке слева и нажмите «Установить Ubuntu».
Можно загрузить обновления сразу на этапе установки.
Без особых опасений выбираем пункт «Стереть диск и установить Ubuntu» и двигаемся дальше.
Если вы выбрали русский язык на первом этапе установки, то вам предложат русскую раскладку клавиатуры в качестве дополнительной.
Заполните поля и выберите режим входа в систему.
Далее начнётся процедура разметки диска, переноса файлов, установка обновлений и другие процессы, которые не потребуют прямого участия пользователя.
По завершению виртуальный компьютер перезагрузится и вы попадёте в уже установленную среду Ubuntu Linux.
Но это ещё не всё. Весьма желательно установить так называемые «Дополнения гостевой ОС». Они содержат драйверы и прочие системные файлы, необходимые для наилучшей производительности и обеспечения дополнительных функциональных возможностей между виртуальной и гостевой операционными системами.
Выберите пункт меню «Устройства» программы VitrualBox, подпункт «Подключить образ диска Дополнений гостевой ОС…» и дождитесь предложение запустить приложение для автоматического запуска с виртуального привода.
Виртуальная ОС Ubuntu Linux установлена и готова к работе.
Ссылка на официальную документацию: Oracle VM VirtualBox User Manual
Источник