Instructor: Okay, so what is a virtual machine?
This is something that I mentioned in the previous video,
but it is important for us to fully understand what it is.
I can just give you a definition and say,
a virtual machine is a machine within our physical computer
that is using its hardware resources.
But for most of you, this will be a new term
that you haven't really encountered before.
So I would like to explain it further more for you
as well as mention why are we going to use it.
Let me start like this.
All of us are running an operating system,
and 99.9% of us are running one of the three
main operating systems.
You either have Windows, macOS, or Linux.
Most of you will have Windows or macOS.
I doubt anyone will be running Linux, but nonetheless,
these are the three main ones.
But what if we wanted to run two different operating systems
on the same machine?
Can we do that?
For example, let's say you have Windows installed
on your physical machine, but you want to install Linux too.
Or even better case,
you want to install five operating systems
running on different virtual machines.
Can you do that?
You can.
How would that work?
Well, picture it like this.
Imagine these four lines representing our computer,
and we already know that any computer will have
one of the three main operating systems,
Windows, macOS, or Linux.
But the operating system is not the only thing
defining our machine.
Our machine also has its computer parts.
We have hard disk, processor, RAM memory, motherboard,
and many more computer parts
that with the operating system, make our machine work.
These computer parts are also known as hardware.
But wait a second, Alexa.
Why are you telling us this?
Thought this was a lecture on
explaining how virtual machines work,
and not on hardware components.
Well, hang on for just a second.
We are slowly getting there.
Picture a virtual machine to be this smaller rectangle
within our physical machine, which is this larger rectangle.
And let's imagine that our physical machine
is running Windows operating system.
But if you took a look at this course content,
you would probably notice that we are going to be doing
all of our hacking stuff over Linux.
Does that mean
that we must delete our Windows and install Linux?
Nope.
We will install Linux as a virtual machine,
and for this machine to work,
it'll need to have access to our hardware components.
What does this mean?
Well, since a virtual machine will act
as a machine of its own,
it must have its own computer parts.
And what we will do is we're going to
borrow our physical machine's CPU power, RAM memory,
hard disk memory to our virtual machine,
so it can run just like our physical machine.
In other words, we're splitting the power
of our physical machine into two different machines,
or more if we decide that we want to create
multiple virtual machines.
Does that mean that they will be slower
since they will be splitting hardware resources?
Well, technically yes, but it will not be noticeable for us.
However, the more powerful your PC is,
more virtual machines it'll be able to run effectively.
Another important thing is that once you shut
down your virtual machine, all the hardware resources
used by it will get freed back
for a physical machine to use.
Okay, good.
But what are other benefits that we have
if we create a virtual machine?
Well, since we are hackers
and we'll be doing a lot of things
and running a lot of programs on that virtual machine,
we want to make sure that we are doing it first
in a safe environment, at least while we learn.
The good thing about virtual machines is that if,
for example, our machine starts getting some unknowing error
or we get locked out of our files
or simply we delete a file that we shouldn't have deleted
and it crashes our virtual machine.
But what if we, for example,
get infected by a malware or virus by accident?
Or we simply just installed the wrong version
of operating system, which we don't need?
Don't worry.
With two clicks, we can delete the entire virtual machine
with all of its files,
and it will have no effect on our physical machine.
Then we can proceed to create a new one
for as many times as we want.
We can also create something called a snapshot
which will allow us to save the current state
of a virtual machine and with it, we can revert it back
to that state whenever we want.
This could be used if we, for example,
run into some errors with our virtual machine.
Sounds cool, right?
Now that we know how virtual machines work
and why are we going to use one,
you must be wondering, how can we create a virtual machine?
Actually, this is pretty easy.
All we need are two things.
We need an operating system that we want to install
in that virtual machine,
and we also need something called virtualization software.
Now, what is this?
Even though it sounds harsh saying virtualization software,
what it essentially is
is a program that will allow our physical machine
to borrow hardware components to our virtual machine.
Or we can also define it
as a program that will allow us to run multiple
operating systems on a single host or a single machine.
So with these two combined, we can create a virtual machine.
And in the next few lectures,
we are going to see exactly how to do that.
See you there.