Outils pour utilisateurs

Outils du site


issue153:tutoriel1

Ceci est une ancienne révision du document !


I have been using the Linux operating system for nearly twenty years. Those twenty years have not always been smooth, and that is probably why Linux hasn’t gained the traction that Windows or MacOS have in the market. In the past, Linux took some work to get up and running. There are plenty of horror stories of getting wifi working on laptops. I have told those stories! Times have changed. Red Hat Linux was recently purchased by IBM for $34 billion. That is a lot of zeroes for a company that was built on an operating system that is freely available to anyone that wants it. Red Hat Linux will not be the focus of this article as it is more of an “Enterprise” operating system. Ubuntu Linux is a much better personal operating system, and I run it on my personal laptop. Ubuntu has become so popular and user friendly that Dell and Lenovo both offer systems with Ubuntu Linux pre-installed. For our purposes, the Ubuntu operating system is easy to download and install.

Back in my day (slight grin at my aging rhetoric), you would have to install Linux on to a physical computer to give it a try. You could dual boot with Windows but that can be a painful process for new users. You can try Ubuntu Linux out as a “Live” system without installing but the concept may be lost on people that are not as familiar with technology. The most painless approach is to install Linux on a virtual machine using VirtualBox. Like Ubuntu Linux, VirtualBox is easy to download and install. Let’s get started!

VirtualBox Installation Go to www.virtualbox.com and click on the large green button on the homepage. On the next page you will see a heading like this: On the same page you will see a heading like this: Download the extension pack as well. Once you have VirtualBox downloaded, launch the downloaded file to begin the installation. You can click next all the way through as the defaults are fine. When VirtualBox is completely installed, open the VirtualBox Extension Pack file that you downloaded and install it as well.

Hypervisorlaunchtype Issue on Windows 10

At this point, you could attempt to create your first virtual machine but you may run into the same issue that I ran into on Windows 10. Windows 10 has a setting called “Hypervisorlaunchtype”. This obscure setting will block you from being able to start your virtual machine on VirtualBox. I found a blog post from Zahid Anwar that outlines how to disable this feature.

Open Powershell as an administrator. If you are not familiar with Powershell, it is a windows terminal program that you can find by clicking on your start menu button and typing “powershell.” When it appears in the menu, right-click on the icon and choose “Run as Administrator.” With Powershell open, type

bsdedit

at the prompt (shown right).

The part I have highlighted in red is what you are looking for. If this is set to “Auto” you will need to run

bsdedit /set hypervisorlaunchtype off.

After you have turned off hypervisorlaunchtype you will need to reboot your computer. Download Ubuntu Linux

Before we create our first virtual machine we need to download Ubuntu Linux from the Ubuntu website.

Go to https://www.ubuntu.com

Click on Download in the navigation.

Under the “Ubuntu Desktop” heading choose “18.04 LTS” or a later LTS version. LTS stands for “Long Term Support” and is a version of Ubuntu that is supported for five years after it is released.

Clicking on lts button will download the latest ISO image. This might take a few minutes depending on your Internet connection. Create Your First Virtual Machine

Open VirtualBox

In the right-side panel above the “Welcome to VirtualBox!” heading are five choices. Click on the blue “New” button.

Enter a name for your virtual machine. This can be anything you want but with any naming convention make it meaningful. You never know. You might fall in love with creating virtual machines and spin up a dozen of them. Meaningful names help you tell them apart.

If you type in “Ubuntu”, VirtualBox will automatically change the type to “Linux” and the Version to “Ubuntu (64-bit).” If you use another name, make sure to click on “Type” and change it to “Linux” and “Version” and change it to “Ubuntu (64-bit).” The next step is to choose how much memory you want your virtual machine to use. The recommended amount of 1024 MB is fine and can be changed later if you want to add more.

Next up is the disk for the virtual machine. Just like a physical computer, a virtual machine needs a disk for storage.

Click “Create” to start the process of creating the virtual hard disk.

The next page will ask for the type of hard disk. The default “VDI” is fine. The next screen will ask if you want to use a “Dynamically allocated” or “Fixed size” disk. Dynamically allocated disks grow as you need them to grow. For instance, if you set the disk up with 80 GB of disk space but choose to dynamically allocate that disk space, VirtualBox will only use as much space as it needs until it hits 80 GB. On the other hand, fixed size will reserve the entire 80 GB from the beginning. The default dynamically allocated is fine and my preferred choice.

Next up is the size of the disk. You don’t need a lot of disk space to take Ubuntu Linux for a test drive. I allocated 60 GB of disk space because I plan on using my virtual machine for something that requires this. Keep in mind that you can always delete the virtual machine and recover back any disk space that it takes up. Once the disk is created you are returned to the VirtualBox main screen. Your new virtual machine should be highlighted. Click on the yellow “Settings” button in the right-hand panel.

We are going to make a few changes to the virtual machine to optimize performance. We also need to tell the virtual machine to use the Ubuntu Linux ISO image that we downloaded earlier.

Click on “System” in the left-hand panel. Click on the “Processor” tab. Move the processor toggle to the end of the green. In my case, this was four CPUs. This is not necessary but will give you a bit more processing power with your virtual machine. Next click on “Display” in the left-hand panel. Move the “Video Memory” toggle all the way to the end. This will give you 128 MB of video memory. You won’t be doing any hardcore gaming with this setting but it gives a bit better video performance.

Click on “Storage” in the left-hand panel and then click on the disk icon with “Empty” next to it.

In the attributes section in the right-hand panel click on the disk icon with the down arrow on it.

Note that my screenshot already shows “ubuntu-18.04.3-desktop-amd64.iso.” You will only see “Choose Virtual Optical Disk File…” when you click on this. Click on “Choose Virtual Optical Disk File…” and locate the Ubuntu Linux ISO image that we downloaded earlier. Where it said “Empty” before, it now shows the image we downloaded.

We are done making changes to the configuration. You can click “OK.”

You should be back on the main screen for Virtualbox. Go ahead and double-click on your virtual machine to launch it. After an initial boot up, you should see the following screen.

Click on “Install Ubuntu.” On the next screen you can click continue unless you prefer a different language than English.

The default settings for “Updates and other software” are fine. Since this is a virtual machine there is no need to install third-party software for graphics and wifi. We are not going to do any special partition and encryption and LVM (Logical Volume Manager) are probably overkill for a test drive so go ahead and click “Install Now.”

You will see a warning that if you continue the disk will be erased. It is safe to click “Continue.”

Next up is your time zone. You can click your location on the map or type in a location in the box that currently says “New York.”

The next screen is to set up your user account. You can put anything you’d like for these.

Finally the installation begins! The installation will take a few minutes. When it is finished you will see a message to restart.

After clicking on “Restart Now”, you will see another message to remove the disk and click enter. There is no disk to remove so you can just hit enter.

After reboot, you should be presented with the Ubuntu login screen. Initial Setup for Ubuntu Linux

You now have Ubuntu Linux installed and you could take it for a test drive. The problem is that it is still a tiny screen on the VirtualBox emulation screen. This isn’t exactly optimal or appealing. We want to be able to experience Ubuntu in fullscreen, as if it is installed on our computer. To do this we need to install something called “Guest Additions.” Login to Ubuntu Linux with the password you setup previously.

You will see an initial set of screens on first login. You can click through these screens. The only screen of interest is the screen asking if it is ok to send information back to Canonical, the creator and maintainer of Ubuntu Linux. I choose to send the information back with the thought that they are using the information to make Ubuntu better. Privacy hawks will jump all over me for this. The choice is yours. Most likely you will see a box that says that updated software is ready to be installed. Go ahead and install the update.

After the installation finishes you will be asked to reboot the system. Go ahead and reboot. We now need to install a package that is necessary to install Guest Additions. We need the terminal for this. Click on “Activities” in the upper left-hand corner and then type “terminal” in the search box. The only choice is the terminal program. Click on it to open the terminal.

At the prompt, type in

sudo apt install build-essential

You will be prompted for your password. Type in the same password you use to login to the system. You can just hit enter when prompted with the Y/n question.

Now click on “Devices” in the VirtualBox menu and choose “Insert Guest Additions CD Image…”

A box will pop up asking if you want to run the software. Click “Run.”

You will be prompted for your password. Enter your password and click “Authenticate.”

Guest Additions will be installed. When it is finished you will be asked to press “Return” to close the window.

You will need to restart Ubuntu for the changes to take effect. Click on the small down-arrow in the upper right-hand corner and click on the power button which is the button at the bottom on the right-hand side. Choose “Restart” from the options.

Once the system reboots and you log back in, expand the window by clicking on the box next to the “x” in the upper right-hand corner of the window.

Now click “View” in the VirtualBox menu and choose “Full-screen Mode.”

If you hover your mouse at the bottom-center of the screen, a menu will pop up that gives you the same options you used to have at the top of the screen before full-screen mode.

If you click on the square button next to the “x” you will be taken out of full-screen mode. Conclusion

You are now ready to take Ubuntu Linux for a proper test drive. Sixty-one steps seems like a lot of work for a test drive but in the end you will get to experience Ubuntu Linux and the Linux operating system as it was intended.

If you are new to Linux I’d love to hear how your test drive went. If you are an experienced Linux user and have feedback or suggestions don’t hesitate.**

issue153/tutoriel1.1580799926.txt.gz · Dernière modification : 2020/02/04 08:05 de d52fr