Installing Ubuntu Server on VirtualBox

Ubuntu Server Installation

In this lesson, we’ll do an Ubuntu Server installation on VirtualBox.

As before, open VirtualBox then click on New.

Create a name for your server, and select Linux for the Type and Ubuntu (64-bit) for the Version.

Click on Continue.

Leave the Memory size at default (1024 MB here) and click Continue.

Leave Create a virtual hard disk now selected and click Create.

Leave VDI (VirtualBox Disk Image) selected and click on Continue.

For Storage on physical hard disk, leave Dynamically allocated selected and click on Continue.

As mentioned in the Desktop installation lesson, this means the drive is as small as it can be to accommodate the data and will grow as data is added.

Click on Continue.

Leave File location and size at default, unless you have to store in another location, and click on Create.

Your Server VM is created and waiting for Ubuntu Server to be installed.

Double click on your Server VM to start it.

Choose the Server .iso file you downloaded and click Start.

If you didn’t already have it downloaded, you can pause here, download it from, then continue.

Keep English selected, or select your language by scrolling up or down using the arrow keys, then hit Enter to continue.

Hit Enter on the next screen to Install Ubuntu Server.

Leave English selected, or select your language, then hit Enter to continue.

Leave United States selected, or select your Country, then hit Enter to continue.

For Configure Keyboard, leave it at <No> unless you have to select a different layout, then hit Enter to continue.

Leave English (US) selected, or select your keyboard layout, then hit Enter to continue.

Leave English (US) selected, or select your keyboard layout, then hit Enter to continue.

Under Hostname, I recommend making it the same as or similar to the VM name you chose earlier.

Hit the Tab key until you get to Continue, then hit Enter.

Create a Username for the account you’ll log in with, then tab down to Continue and hit Enter.

Enter your password, then tab to Continue and hit Enter.

Enter your password again to confirm, then tab to Continue and hit Enter.

Leave encryption off, as this is just a practice system, and hit Enter to select the default value of No.

Accept the default for your timezone if it is correct and hit Enter on <Yes> to continue.

Leave Guided – use entire disk and set up LVM (Logical Volume Manager) selected and hit Enter to continue.

Leave the defaults for Partition disks selected and hit Enter to continue.

For Partition disks, tab over to <Yes> and hit Enter.

Leave the drive size at default and tab to <Continue> and hit Enter.

For Partition disks, tab over to <Yes> and hit Enter to continue.

You’re warned multiple times, because, if you’re installing on hardware, instead of in VirtualBox, and you make a mistake, you could blow away your hard drive, causing big problems, depending on what you lose when your drive is formatted.

Leave HTTP proxy blank and tab to Continue, then hit Enter.

I recommend tabbing down to Install security updates automatically, unless you have a patch management system for your server environment, then hit Enter to continue.

Under Software selection, leave standard system utilities selected and tab or arrow down to OpenSSH server and click on the space bar to select it. Then tab down to <Continue> and hit Enter.

OpenSSH is a service for managing remote connections to your server securely, and is almost always something you’ll want added.

Leave <Yes> selected to Install the GRUB boot loader and hit Enter to continue.

GRUB is a system for managing boot up in Linux.

For Finish the installation, hit Enter to <Continue>.

Don’t worry about removing or disabling the CD-ROM drive. VirtualBox takes care of this for you.

Your system will reboot and start your Ubuntu Server using all of the settings you entered.

And… You’re greeted with a command prompt! What!? That’s scary. What are you supposed to do here? :-)

You’ll learn to become very comfortable at that little prompt as you progress through this course.

In fact, often even when you’re using a GUI, as with Desktop, you’ll be searching for the Terminal so you can more quickly do what you want to without having to click through a bunch of GUI screens.

For now, just log in and we’ll do our first system update.

That should always be one of the first things you do on a new system before considering your installation complete.

As the last sentence in the login screen says, you use sudo to run a command as root.

root is the most powerful user on the system and can do anything on the system.

Updates require root privileges to run.

So, type sudo apt update and hit Enter.

When prompted, enter your password and hit Enter.

Notice, you won’t see any characters, not even dots or asterisks, when entering your password. This is normal.

Your system will update its database with the latest release of all the packages it knows about.

Now that the database is up to date, you can actually upgrade the packages installed on your system.

Type sudo apt upgrade -y and hit Enter

The -y option at the end tells the system that you answer “yes” to a prompt that would normally come up asking if you want to proceed.

This will likely take several minutes the first time you run it.

There’s one last type of upgrade, called a full-upgrade to be done.

Hit the up arrow to recall your last command and hit the back arrow until your cursor is in front of the word upgrade.

Type full- then hit Enter.

In this case, there was nothing additional to be installed.

A full upgrade will do some additional upgrades that may not be captures with a regular upgrade.

There, you’ve just installed and updated your first Ubuntu Server! Great work!

To shut down, just type shutdown -h now, as you did with Ubuntu Desktop.

If some time has elapsed since you used sudo, you’ll have to re-enter your password when prompted.

By default, the system stores, or caches your sudo credentials for 5 minutes, so you won’t have to type it again during that time.