CodeGym /Courses /Docker SELF /Installing Linux: Choosing an Environment, Installation D...

Installing Linux: Choosing an Environment, Installation Demo

Docker SELF
Level 1 , Lesson 3
Available

Installing Linux: Choosing an Environment, Installation Demo

1. Installing Linux

Alright, by now, you’ve already dived into the fascinating history of Linux, learned that any distribution is like a “Lego set” made of kernels, libraries, and utilities, and each one has its own charm (or “package manager,” if you prefer). Today, let’s jump into the practical part and install Linux! This is the moment when theoretical knowledge transforms into something you can touch. Well, at least something you can poke with your terminal cursor.

You might have one of these 3 operating system options:

  1. Linux - no additional installation needed for you
  2. MacOS - built on Unix and compatible with Linux. It should be enough for learning Linux basics.
  3. Windows:
    • Windows 11 - just enable WSL2, and we’re rolling with the built-in Linux kernel.
    • Windows 10 - update your system and enable WSL2.
    • Windows 8 or earlier - you need to install Linux on a virtual machine.

2. How to Choose the Right Distribution?

What's the difference between distributions?

Before diving into the installation, you need to figure out which distribution suits your needs. Here are some ideas to help you make the right choice:

Distribution Key Features Who is it for?
Ubuntu Simplicity, massive documentation, and community Beginners, developers, desktop users
CentOS Reliability, stability (server-focused) Server administrators
Fedora Modern tech, bleeding-edge Developers, tech enthusiasts
Arch Linux Full customization, complexity Geeks who want total control
Linux Mint User-friendly, based on Ubuntu Beginners who need "out-of-the-box" functionality

Golden rule: if you're a newbie, start with Ubuntu. It's like Linux with training wheels.

Minimum Requirements

You don't need a supercomputer for Linux. Here are the rough specs for a basic distribution:

  • Processor: Dual-core, 1 GHz or higher.
  • RAM: 2 GB (more is better).
  • Free disk space: At least 20 GB.
  • Supports BIOS/UEFI.

If you've got at least 4 GB of RAM, Linux will fly. And if it's less — it'll still work, just with a touch of patience.


3. How to Prepare for Installation?

Installation Method: Virtual Machine or Physical Device?

There are two main approaches:

  1. Install on a virtual machine. This is a perfect option to try Linux without risks. You can use programs like:

    • VirtualBox: free and popular.
    • VMware Workstation Player: free for non-commercial use.
  2. Physical installation. If you're ready to "hit the brakes on Windows" or you have an old laptop, this is your choice.

Creating a Bootable Drive

If you want to install Linux on a physical device, you'll need a bootable USB stick. The Rufus program for Windows is great for this task. If you're on macOS, use Etcher.

  1. Download the distro ISO image from the official site.
  2. Install Rufus/Etcher.
  3. Run the program and choose your ISO image and USB stick.
  4. Start the writing process.

That's it, your USB stick is ready!


4. Installation Demo: Step by Step

The most exciting part of our lecture is here. We're going to install Linux. For this example, let's pick Ubuntu.

1. BIOS/UEFI Setup

To boot from a USB drive, you might need to tweak your BIOS or UEFI settings. Here's how you do that:

  1. Restart your computer.
  2. During boot, press a key (often it's Del, F2, Esc, but it depends on your device).
  3. Go to the "Boot" tab and move the USB device to the top of the list.

Congrats, that was your first mini-adventure into the world of system magic!

2. Booting into the Installer

After setting up the BIOS, reboot your computer with the USB plugged in. You'll see something like a welcome screen offering "Try Ubuntu without installing" and "Install Ubuntu". Choose the second option.

3. Language and Keyboard Layout Setup

The first step in the installer is to pick a language. For most, it's either "Russian" or "English" if you prefer the English interface. Next, set up your keyboard (the layout is usually auto-detected, but double-check).

4. Choosing Installation Type

At this step, you can choose:

  • Erase disk and install Ubuntu — if you want to completely replace the current system (old computer, fresh install).
  • Install Ubuntu alongside Windows — if you want to keep Windows.
  • Something else — for advanced partition setups.

For beginners, the first option is the best. If you picked "something else," you're already a pro, so let's move to the next step.

5. Configuring Disk Partitions

If you did choose "Something else," you'll need to create the following partitions:

  • /: root partition. At least 20 GB is recommended.
  • swap: swap partition. For systems with 2-4 GB RAM, make swap twice the size of your RAM.
  • /home: partition for user data (recommended but optional).

Here's what it looks like in the installer's GUI:

[ + ] Create partition
Type: Ext4
Mount point: /
Size: 20 GB

After setting everything up, click "Continue".

6. User Setup

Think of a name for your user and set a password. These will be your magic keys to the system. Your computer's name can be something like "Tux-PC" or "This_Is_Computer".

Here are some tips:

  • Password: not "12345". Choose something complex but memorable.
  • Auto-login: disable it if security is important.

7. Completing the Installation

Once everything is set up, the installer will start copying files. This process takes about 10 to 30 minutes, depending on your device.

When it's done, you'll be prompted to restart your computer. Hooray, you just installed Linux!


5. First steps after installation

1. Check the system

Once you boot up, you'll see either the desktop or the terminal interface. First thing to do:

  • Open the menu and find "Terminal". Welcome to the CLI!
  • Run a couple of commands to check things out:
   whoami    # Find out your current username.
   uname -a  # Make sure you're on Linux.

2. Install updates

For Ubuntu, it's simple:

sudo apt update && sudo apt upgrade -y

And here's the first reason to love Linux: everything updates without a reboot.


6. Common Mistakes and How to Fix Them

  • Computer doesn’t see the flash drive during boot. The culprit is usually incorrect BIOS settings. Check if the flash drive is selected as the boot device.
  • Not enough space on the disk. Make sure you've cleared enough space beforehand or are using partitions correctly.
  • Broke Windows (or you think so). Don’t panic! If Windows isn’t loading, bootloader recovery commands in Linux often help. Google "GRUB repair."

Congrats, you planted your tree... I mean, set up your first Linux system! Now you have a tool for work and fun, and ahead lies new horizons of the command line!

7. Step-by-step Guide

How to Install Linux Using VirtualBox

If you’ve never set up virtual machines, here’s a step-by-step guide with pictures.

You'll need:

First, you need to install and run the VirtualBox app.

Creating a Virtual Machine

Click the "Create" button, choose "Linux" as the operating system type from the list. If you don't have a specific preference for a distribution, pick "Ubuntu" 64-bit, and feel free to name it whatever you want.

Set the amount of RAM allocated to the virtual system. The recommended amount is 1024 MB.

Set the amount of disk space allocated to the virtual system. The recommended size is 10 GB.

You can leave the type of virtual hard disk as is — VDI (VirtualBox Disk Image).

Choose the storage format based on your preference. A dynamically allocated virtual hard disk grows as it fills up, while a fixed-size one is created immediately at the specified size.

You can leave the file name and size unchanged and just hit the "Create" button.

Once done, you’ll have a virtual machine, but it doesn't have an operating system yet. To install one, download Ubuntu Linux (64-bit).

Installing Linux

Clicking the "Start" button should bring up a dialog window prompting you to point to the downloaded ISO. Do this and press "Continue".

The virtual machine will handle some processes automatically, but there are a few steps where you'll need to step in.

Choose the language support from the list on the left and click "Install Ubuntu".

You can choose to download updates during installation.

Select "Erase disk and install Ubuntu" without any concerns and proceed.

If you chose English at the language selection step, you'll be prompted to select an additional keyboard layout.

Fill out the fields and choose the system login mode.

Next, the system will handle disk partitioning, transferring files, installing updates, and other processes that don’t require your active involvement.

Once finished, the virtual computer will reboot and you’ll enter the installed Ubuntu Linux environment.

Linking the Host OS and Virtual Machine OS on Linux

But that's not all. It's highly recommended to install the so-called "Guest Additions." These include drivers and other system files needed for optimal performance and additional features between the virtual and host OS.

In the VirtualBox app menu, select "Devices," then "Insert Guest Additions CD image…" and wait for the app to prompt you to run the auto-run application from the virtual drive.

The virtual Ubuntu Linux OS is now installed and ready to use.

Link to the official documentation: Oracle VM VirtualBox User Manual

Comments
TO VIEW ALL COMMENTS OR TO MAKE A COMMENT,
GO TO FULL VERSION