Us­ing a Vir­tual Ma­chine to Run Linux on Win­dows

If you would like to run Linux on Win­dows and have never used a vir­tual ma­chine, this tu­to­rial ex­plains how you can do so in a few sim­ple steps.

OpenSource For You - - Contents - By: Maulik Parekh The au­thor has an M. Tech de­gree in cloud com­put­ing from VIT Univer­sity, Chen­nai. He can be reached at maulik­parekh2@gmail.com. Web­site: https://www.linkedin. com/in/maulik­parekh2.

Linux and Win­dows are two of the most pop­u­lar op­er­at­ing sys­tems in the mar­ket. One can say that these two OSs have be­come es­sen­tials be­cause of their con­tin­u­ous de­vel­op­ment and fea­ture en­hance­ments. Many peo­ple pre­fer one over the other. Yet, peo­ple who use Linux some­times need the Win­dows op­er­at­ing sys­tem, and vice versa. For faster de­vel­op­ment and more se­cu­rity, peo­ple pre­fer to use Linux over Win­dows. So these peo­ple need Linux along­side Win­dows.

A com­mon so­lu­tion for this prob­lem is to use a dual boot, which ba­si­cally in­stalls the en­tire op­er­at­ing sys­tem. How­ever, due to boot loader changes (like UEFI mode), con­fig­ur­ing dual boot be­comes dif­fi­cult.

This ar­ti­cle is about run­ning Linux on Win­dows, with­out us­ing the dual boot tech­nique. There are dif­fer­ent ways to do so, one of the most pop­u­lar be­ing us­ing a vir­tual ma­chine.

Vir­tual ma­chines

Vir­tu­al­i­sa­tion is fairly old tech­nol­ogy now. It was started around 1980 by IBM. So, cur­rently, this tech­nol­ogy is pretty sta­ble. We can cre­ate Linux vir­tual ma­chines in Win­dows us­ing soft­ware like Vir­tual Box, VMware Player, and VMware Work­sta­tion.

A vir­tual ma­chine pro­vides the same func­tion­al­ity as a phys­i­cal com­puter, but it is an em­u­la­tion of a phys­i­cal com­puter. The vir­tual ma­chine can be cre­ated or de­stroyed at any mo­ment and it will not im­pact the ac­tual op­er­at­ing sys­tem, which is the best part about us­ing it.

To in­stall Linux on Win­dows, we just re­quire two things — the soft­ware to cre­ate a vir­tual ma­chine which is Vir­tual Box (free soft­ware) and an ISO file of the op­er­at­ing sys­tem.

The in­stal­la­tion process is pretty sim­ple, like in­stalling any soft­ware in Win­dows. The steps for in­stalling Ubuntu (a favourite Linux flavour) in­side Win­dows are given below.

The first step is to en­able vir­tu­al­i­sa­tion tech­nol­ogy in the BIOS. If you have al­ready en­abled it, you can skip this step.

You need to power on the sys­tem and go to the BIOS setup by press­ing F2, Del or the En­ter key, de­pend­ing upon your com­puter model.

Af­ter that, un­der CPU Con­fig­u­ra­tion ­> Sys­tem Con­fig­u­ra­tion ­> Ad­vanced or Se­cu­rity Tab, we need to find Vir­tu­al­iza­tion Tech­nol­ogy or Intel Vir­tu­al­iza­tion Tech­nol­ogy.

If the op­tion is dis­abled, then it must be en­abled. If it’s al­ready en­abled, skip this step.

If you get any of the fol­low­ing er­ror mes­sages at any point

of time, it means that vir­tu­al­i­sa­tion tech­nol­ogy is not en­abled for you and you need to en­able it:

VT-x/AMD-V hard­ware ac­cel­er­a­tion is not avail­able on your sys­tem

This host sup­ports Intel VT-x, but Intel VT-x is dis­abled The pro­ces­sor on this com­puter is not com­pat­i­ble with Hy­per-V

If you have not in­stalled Vir­tual Box, then you can go to the links https://www.vir­tu­al­box.org/wiki/Down­loads and http://down­load.vir­tu­al­box.org/vir­tu­al­box/5.1.28/ Vir­tu­al­Box­5.1.28­117968­Win.exe, and down­load and in­stall it. The steps are very straight­for­ward; hence, I am not men­tion­ing them here.

Open the Vir­tual Box ap­pli­ca­tion once it is in­stalled. It will look like what’s shown in the snap­shot in Fig­ure 1.

Click on the New but­ton and se­lect the OS cat­e­gory be­fore pro­vid­ing the ap­pro­pri­ate name to the vir­tual ma­chine.

As­sign RAM as per your re­quire­ments. Ubuntu can run on 512MB, which is the min­i­mum re­quire­ment to run Linux smoothly on Win­dows. Since I have 8GB RAM in my lap­top, I have cho­sen 2048MB (2GB) RAM.

The next op­tion is to se­lect the vir­tual hard disk. Since we are creat­ing a new vir­tual ma­chine, we will use the ‘Cre­ate vir­tual hard disk now’ op­tion.

Here we need to se­lect the vir­tual hard disk type. Since

we are us­ing Vir­tual Box, we will use VDI which is a

Vir­tual Box disk im­age.

There are two op­tions here — we can either use a fixed size or a dy­namic size. It is bet­ter to opt for the lat­ter so that the size can be in­creased if re­quired.

Al­lo­cate the disk space as per your re­quire­ment.

Once it is done, go to the vir­tual ma­chine that you have cre­ated, right-click on it and go to the set­tings of that ma­chine. Now we must at­tach the ISO file so that while we run the VM, it should know the lo­ca­tion of the Ubuntu ISO file. As shown in the snap­shot (Fig­ure 7), click on the DISK but­ton and browse the .ISO file of Ubuntu OS. The ISO file is now at­tached.

Next, go to the vir­tual ma­chine, right-click on it and start it. You will get the Ubuntu in­stal­la­tion screen, which is sim­i­lar to in­stalling any op­er­at­ing sys­tem that you have cho­sen. The re­main­ing steps are sim­i­lar to the in­stal­la­tion of any OS.

If you want to close the vir­tual ma­chine win­dow, you can do one of three things.

1. Save the ma­chine: This is like hi­ber­nate. The sys­tem will re­sume from wher­ever you left off, the next time when you start — it will show you the same task at which you paused. 2. Send the ‘Shut­down’ sig­nal: This is like press­ing the power but­ton. It will al­low nor­mal shut­down of the vir­tual ma­chine. 3. Power off the ma­chine: This is like pulling a power ca­ble. It is for a hard shut­down which is re­quired in sce­nar­ios where a VM gets hung or is not work­ing prop­erly.

At any time, if you want to de­stroy the vir­tual ma­chine you cre­ated, right-click and se­lect the Re­move op­tion. This will re­move all the re­lated files.

In this ar­ti­cle, we have seen the ba­sic op­er­a­tions of a vir­tual ma­chine. We can ex­plore other op­tions in a sub­se­quent one.

Ref­er­ence

[1] https://www.vir­tu­al­box.org/wiki/Down­loads

Fig­ure 5: Se­lect vir­tual hard disk type

Fig­ure 4: Se­lect vir­tual hard disk

Fig­ure 1: Vir­tual ma­chine home

Fig­ure 3: As­sign­ing RAM

Fig­ure 2: Creat­ing a vir­tual ma­chine

Fig­ure 8: In­stal­la­tion started

Fig­ure 6: Disk space

Fig­ure 9: In­stall Ubuntu like any nor­mal OS

Fig­ure 7: Se­lect­ing the ISO file

Newspapers in English

Newspapers from India

© PressReader. All rights reserved.