Installing linux with virtualbox

Install Linux Inside Windows Using VirtualBox [Step by Step Guide]

Last updated April 29, 2021 By Abhishek Prakash 220 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.)
  • Make sure to enable virtualization in the BIOS

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.

Читайте также:  Центр обновления windows долго загружает обновления

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.

Читайте также:  Пакеты шрифтов для linux

Like what you read? Please share it with others.

About Abhishek Prakash

Creator of It’s FOSS. An ardent Linux user & open source promoter. Huge fan of classic detective mysteries ranging from Agatha Christie and Sherlock Holmes to Detective Columbo & Ellery Queen. Also a movie buff with a soft corner for film noir.

Thanks for the article and for the troubleshoot step for the virtualization disabled by default 🙂

You are welcome.

I just followed your steps and it installed and ran Ubuntu just fine. Everything seems to work. I even installed Chrome easily. I’m running it on a laptop with a 1.2g Intel and 8g of RAM. Thank you for the article.

You are welcome 🙂

Just wanted to thank you for this amazing workflow.

Glad you liked it.

Thank You! I’m taking a Linux class right now at my local community college and I greatly appreciate you helping me with furthering my IT endeavors and career. Good luck with everyone else and thank you again!

Happy to be of help with your learning and career. Do subscribe to the weekly newsletter to get regular updates.

Thanks Abhishek that was very helpful and easy to follow. Post the installation of Ubuntu 20.04.3 LTS, I am having a peculiar problem. Basically the libc library and header files are not there though I have updated all the files during install. The specific error I get is :
gcc: fatal error: stdio.h: No such file or directory
on trying various fixes
e.g.
sudo apt-get install libc6-dev

I still get the following

>>>sudo apt-get install build-essential
Reading package lists… Done
Building dependency tree
Reading state information… Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
build-essential : Depends: libc6-dev but it is not going to be installed or
libc-dev
Depends: g++ (>= 4:9.2) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Any thought? I basically want to write my code in C / C++ (including system calls) and run them.

Источник

Устанавливаем операционные системы семейства Linux на VirtualBox

Установка Linux на VirtualBox

Для того чтобы процедура была проведена без проблем, должны быть соблюдены следующие условия:

  • Процессор должен поддерживать аппаратную визуализацию VT-x или VT-d (для Интел), AMD-V (для АМД).
  • Должна быть установлена программа VM VirtualBox от Oracle.
  • На компьютере должен присутствовать скачанный ISO-образ операционной системы Linux.

Установив виртуальную машину (это довольно быстрый процесс), можно заняться собственно самой ОС Linux.

Сегодня можно встретить множество вариаций Linux, разработанных на ее ядре. Сейчас мы рассмотрим некоторые из них – Ubuntu, Kali Linux, Debian, CentOS и Remix OS.

Установка Extension Pack

Первым делом необходимо скачать на официальном сайте и установить специальный пакет расширений VirtualBox Extension Pack. Он позволяет программе иметь максимальную совместимость с дистрибутивами Linux. Подробная инструкция доступна по ссылке ниже.

Создание виртуальной машины

  1. Запускаем VirtualBox и жмем «Создать». Указываем имя виртуальной машины – Ubuntu, а также тип ОС – Linux. Нужно указать и версию платформы. Это зависит от того, какова разрядность загруженной ОС – 32х или 64х.
Читайте также:  Does windows 10 come out


Задаем объем ОЗУ, который следует выделить для работы «виртуалки. В данном случае операционная система будет функционировать нормально при объеме 1024 Мб.


Создаем новый жесткий диск.

Выбираем тип файла, который используется при создании нового образа диска. Лучше всего оставить активным пункт VDI.


Если хотим, чтобы диск был динамическим, отмечаем соответствующий параметр. Это позволит объему расти по мере того, как он будет заполняться файлами.


Далее указываем объем памяти, выделяемой на жестком диске, и определяем папку для сохранения виртуального диска.

Мы создали ВМ, однако сейчас она не активна. Для ее включения необходимо осуществить ее запуск, нажав на соответствующую кнопку. Либо можно осуществить двойной клик по самой машине в списке.

Вариант 1: Установка Ubuntu

Установка Ubuntu максимально проста и не требует особых навыков.

    После запуска ВМ появится окно программы установки. В нем следует указать местонахождение загруженного образа Ubuntu.


Выбрав этот образ, мы перейдем к следующему шагу. В новом окне выбираем язык интерфейса – русский, чтобы процесс установки был полностью понятен.

Далее можно пойти двумя путями: либо протестировать Ubuntu, запустив ее с образа диска (при этом она не будет устанавливаться на виртуальный диск), либо выполнить ее полную установку. Получить представление об операционной системе можно и в первом случае, однако полная установка позволит лучше погрузиться в ее среду.

    Выберем «Установить». После этого появится окно подготовки к инсталляции. Проверим, согласуются ли параметры ПК с требованиями разработчиков. Если да, перейдем к следующему шагу.


При установке выберем пункт, предлагающий стирание диска и установку Ubuntu. В процессе установки можно задать часовой пояс и указать раскладку клавиатуры.


Далее указываем имя ПК, устанавливаем логин и пароль. Выбираем тип аутентификации.


Процедура установки займет примерно 20 минут. После ее завершения произойдет автоматическая перезагрузка ПК, после чего запустится рабочий стол установленной Ubuntu.

Установка Linux Ubuntu завершена, можно начать знакомиться с системой. Далее мы поговорим о том, как устанавливать другие ОС семейства Линукс на VirtualBox.

Вариант 2: Установка Kali Linux

Данная система содержит в своем дистрибутиве множество специализированных программ, предназначенных для тестирования безопасности сетей и приложений. Установка Кали несколько отличается от такового процесса с Ubuntu и является более сложным в технической части.

Вариант 3: Установка Debian

Debian можно назвать основой Linux. Эта система отлично подходит для использования как в серверах, так и рабочих станциях. Она поддерживает множество архитектур и имеет самый большой репозиторий (хранилище) пакетов довольно широкого назначения.

Вариант 4: Установка CentOS

CentOS основана на коммерческом дистрибутиве Red Hat Enterprise Linux компании Red Hat. В отличии от него, система распространяется бесплатно и, вместе с тем, совместима с RHEL.

Вариант 5: Установка Remix OS

Remix OS позволяет пользователям ПК использовать мобильные приложения, предназначенные для ОС Android на любом компьютере с процессором Intel. Система распространяется бесплатно, но имеет закрытый исходный код в отличии от большинства других дистрибутивов Linux.

Мы сегодня познакомились с небольшой частью дистрибутивов Linux. Каким из них пользоваться, решайте сами, руководствуясь поставленными задачами, а VirtualBox поможет разобраться в особенностях и приобрести опыт.

Помимо этой статьи, на сайте еще 12315 инструкций.
Добавьте сайт Lumpics.ru в закладки (CTRL+D) и мы точно еще пригодимся вам.

Отблагодарите автора, поделитесь статьей в социальных сетях.

Источник

Оцените статью