- Install Linux Inside Windows Using VirtualBox
- Installing Linux inside Windows using VirtualBox
- Requirements
- Step 1: Download and install VirtualBox
- Step 2: Download the Linux ISO
- Step 3: Install Linux using VirtualBox
- Troubleshooting: AMD-V is disabled in the BIOS
- Как работать с Linux используя Windows
- Ubuntu из Microsoft Store
- VirtualBox
Install Linux Inside Windows Using VirtualBox
Last updated August 14, 2019 By Abhishek Prakash 197 Comments
Brief: Using Linux in a virtual machine gives you the option to try Linux within Windows. This step-by-step guide shows you how to install Linux inside Windows using VirtualBox.
There are several ways to install Linux. You can clean everything from your system and install Linux. You can dual boot Linux with Windows and choose one of the operating systems at the boot time. You can even install Linux within Windows from Microsoft Store (though this only provides you with the command line version of Linux).
But if you want to use Linux without making any changes to your Windows system, you can go the virtual machine route. Basically, you install and use Linux like any regular Windows application. When you just want to try Linux for limited use, virtual machines provide the most comfortable option.
In this tutorial, I’ll show you how to install Linux inside Windows using VirtualBox.
Installing Linux inside Windows using VirtualBox
VirtualBox is free and open source virtualization software from Oracle. It enables you to install other operating systems in virtual machines. It is recommended that your system should have at least 4GB of RAM to get decent performance from the virtual operating system.
Requirements
- Good internet connection to download software and Linux ISO. (You can also use some other computer with an internet connection to download these files.)
- Windows system with at least 12 GB of free space.
- Windows system with 4GB of rRAM. (It can work with less RAM as well, but your system will start to lag while using Linux in the virtual machine.)
I am installing Ubuntu 17.10 in this tutorial, but the same steps apply to any other Linux distribution. If you prefer videos, you can watch the one below from our YouTube channel:
Step 1: Download and install VirtualBox
Go to the website of Oracle VirtualBox and get the latest stable version from here:
Installing VirtualBox is not rocket science. Just double-click on the downloaded .exe file and follow the instructions on the screen. It is like installing any regular software on Windows.
Step 2: Download the Linux ISO
Next, you need to download the ISO file of the Linux distribution. You can get this image from the official website of the Linux distribution you are trying to use.
I am using Ubuntu in this example, and you can download ISO images for Ubuntu from the link below:
Step 3: Install Linux using VirtualBox
You have installed VirtualBox and you have downloaded the ISO for Linux. You are now set to install Linux in VirtualBox.
Start VirtualBox, and click on the New symbol. Give the virtual OS a relevant name.
Allocate RAM to the virtual OS. My system has 8GB of RAM and I decided to allocate 2GB of it. You can use more RAM if your system has enough extra.
Create a virtual disk. This serves as the hard disk of the virtual Linux system. It is where the virtual system will store its files.
I recommend using the VDI file type here.
You can choose either the “Dynamically allocated” or the “Fixed size” option for creating the virtual hard disk.
The recommended size is 10 GB. However, I suggest giving it more space if possible. 15-20 GB is preferable.
Once everything is in place, it’s time to boot that ISO and install Linux as a virtual operating system.
If VirtualBox doesn’t detect the Linux ISO, browse to its location by clicking the folder icon as shown in the picture below:
Soon you’ll find yourself inside Linux. You should be presented with the option to install it.
Things from here are Ubuntu-specific. Other Linux distributions may have slightly different looking steps, but it won’t be complicated at all.
You can skip to Continue.
Select ‘Erase disk and install Ubuntu’. Don’t worry. It won’t delete anything on your Windows operating system. You are using the virtual disk space of 15-20GB that we created in previous steps. It won’t impact the real operating system.
Just click on Continue.
Things are pretty straightforward from here.
Try to choose a password that you can remember. You can also reset the password in Ubuntu if you forget it.
You are almost done. It may take 10-15 minutes to complete the installation.
Once the installation finishes, restart the virtual system.
If it gets stuck on the screen below, you may close the VirtualBox.
And that’s all. From now on, just click on the installed Linux virtual machine. You’ll be able to use it directly. The installation is a one time only process. You can even delete the Linux ISO that you downloaded earlier.
I strongly recommend using VirtualBox Guest Additions on Ubuntu for it provides better compatibility and you would be able to use copy-paste and drag-drop between Linux and Windows.
Troubleshooting: AMD-V is disabled in the BIOS
If you face this error while using the virtual machine:
Not in a hypervisor partition (HVP=0) (VERR_NEM_NOT_AVAILABLE).
AMD-V is disabled in the BIOS (or by the host OS) (VERR_SVM_DISABLED).
Result Code:
E_FAIL (0x80004005)
Component:
ConsoleWrap
Interface:
IConsole
This means that virtualization is blocked on your system. You’ll have to activate it in your BIOS settings first.
Reboot your system and as soon as it powers up, press F2/F10/F12 to access BIOS settings. You have to look for the virtualization option in the BIOS and enable it.
Any questions?
That’s all you need to do to install Linux in VirtualBox on Windows. If you have any doubts, or if you encounter any issues, please feel free to ask your questions in the comment box below.
Like what you read? Please share it with others.
Как работать с Linux используя Windows
Инструкция по установке Ubuntu 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