|M01: Introduction to Operating Systems||TU1: Installing, configuring and exploiting a
||Pràctical Exercise 1: Initial installations and configuration of virtualbox and Debian GNU/Linux||21-09-2021|
is a Virtual Machine?
A Virtual Machine (VM) is a compute resource that uses software instead of a physical computer to run programs and deploy apps. One or more virtual “guest” machines run on a physical “host” machine. Each virtual machine runs its own operating system and functions separately from the other VMs, even when they are all running on the same host. This means that, for example, a virtual MacOS virtual machine can run on a physical PC.
A virtual machine, commonly shortened to just
VM, is no different than any other physical computer like a
laptop, smart phone, or server. It has a CPU, memory, disks to
store your files, and can connect to the internet if needed.
While the hardware that make up your physical computer is
tangible (physical), virtual hardware (virtual hard drive,
virtual ram memory, virtual network cards,.....) exist
only as files stored in a physical hard drive or physical ram
memory. Virtual hardware is not physical but it is as real as a
What are virtual machines used for?
Virtual machines (VMs) allow a business to:
* run an operating system that behaves like a completely separate computer in an app window on a desktop.
* run software that requires a different operating system
* test applications in a safe and isolated environment.
* Improve efficiency => Saving physical hard drive space, time and managements costs
* Perform specific tasks considered too risky to carry out in a host environment, such as accessing virus-infected data or testing operating systems.
* run multiples operating systems on a single physical computer
* run legacy (old version) applications => Reducing migration to a new operating system costs
* Easy management and maintenance of multiple operating system
3- Install VirtualBox 6.1.26:
The Guest Additions are designed to be
installed inside a
virtual machine after the guest operating system has been
installed. They consist of device drivers and system
applications that optimize the guest operating system for
better performance and usability.
The Guest Additions offer the following features:
11- Shutdown your system in the right way.: Select
System --> Shut Down --> Shutdown.
Eject the VBoxGuestAdditions.iso
(Start) Debian GNU/Linux. Gain access to
your Desktop. Resize your window and your Desktop with
the help of your mouse.
14- Power off your system in the right
way. Select System --> Shut
Down --> Shut Down.
3.3- ADD NEW REPOSITORIES TO YOUR PACKAGE MANAGER
0- Before starting:
- A software package contains all of the files required to install or unistall programs on Debian GNU/Linux
A package manager keeps track of what software is installed on your computer, and allows you to easily install new software, upgrade software to newer versions, or remove software that you previously installed. The job of a package manager is to present an interface which assists the user in managing the collection of packages installed on his or her system.
- A software repository is a storage location for software packages. An external hard drive, a DVD/CDROM or a Shared Folder in a computer (repository server) in the LAN or Internet could be a software repository. Debian GNU/Linux have many mirrors (an image or clone of a main repository server) around the world. Usually, a computer downloads software packages from a software repository with the help of package manager. The package manager will install the software package in the systeme as well.
- aptitude is a package manager and it reads the list of software repositories or "sources" from the file /etc/apt/source.list.
- Update and upgrade --> https://linuxconfig.org/apt-update-vs-apt-upgrade
1- As a root user, change /etc/apt/sources.list in order to add the contrib and non-free repository addresses (or sources). Adding these new repositories allows the system to gain access to some extra useful software packages. The new sources.list file should have the following contents:
After changing the contents of /etc/apt/sources.list, run: aptitude update
2- Install a useful GUI text editor called Geany on your system. Just follow the next steps as a root user: aptitude install geany
3- Install the arial font (and another useful fonts). Run: aptitude install ttf-mscorefonts-installer
4- Logout as root.
4- Show the Trash bin
and Computer icons on your Desktop:
a) Install MATE Tweak. Run as a root user: aptitude install mate-tweak
b) Show Trash bin and Computer icons. Select System --> Control Center --> Look and Feel --> MATE Tweak. Enable Trash and Computer.
c) Check that Trash bin and Computer appear on your Desktop.
5- Start the LibreOffice Writer text editor: Applications --> Office --> LibreOffice Writer. Check that the arial font is now available.
3.4- ATTACH A physical USB DRIVE TO DEBIAN GNU/Linux
1- Start a terminal (MATE Terminal) and using the su - command, become the root user.
2- Provide your user with the proper permissions to work with shared folders by running the command:
-a xxyyzz vboxsf
xxyyzz is the user
created by you during the
installation process of Debian
3- Log out as root. Afterward, Close the terminal window properly and log out as standard user from your desktop. Finally, gain access to your desktop again.
4- Plug your USB drive into your laptop. Attach and open a USB drive into your virtual machine:
<---- Image of
the "USB settings.."
SHARING FOLDERS BETWEEN THE HOST (PHYSICAL)
MACHINE AND THE VIRTUAL MACHINE
1- Shutdown your virtual computer.
2- Create a new folder, called sharing, inside the folder VirtualBox VMs of your host operating system. Create a new empty file called inf1_xxyyzz.txt inside the folder sharing of your host operating system. Remember: xx=two first letters of your name, yy=two first letters of your first surname and zz=two first letters of your second surname.
4- Select Machine Folders and click on the small blue rectangle with a green cross at the right side of the window. A window will appear with a form to add a new shared folder. Add a new one with the following features:
a) Folder Path: Look for sharing on your system and select it.
b) Folder Name --> sharing
c) Select Auto-mount
d) Mount point --> Do no write anything
5- Boot your virtual machine.
6- As a root user run the following commands:
7- Logout as a root user.
8- Select and open the sf_sharing folder on your Desktop. Check that the file created in 2 appears. Copy the file on the Desktop.
1- Your system boots and you
can gain access to your system.
2- Username. If your user does
not have the proper username, we will not accept your
system and your mark will be zero.
3- Host name. If your machine does not have the proper hostname, we will not accept your system and your mark will be zero.
4- Yo can surf the internet with the
help of your browser.
5- You can resize you virtual system.
6- Geany has been installed on your
7- The arial font has been installed
on your system
8- Show the Trash bin and Computer
icons on your Desktop
9- Show the contents of a USB drive on Debian
10- Show the contents of sharing on Debian