Skip to main content

How to build a home lab to learn new Linux skills

Create a home lab to experiment and learn—critical tasks for pursuing Linux certifications, learning new work skills, or experimenting with services.
Image
Woman working on a laptop

Photo by Vlada Karpovich from Pexels

Most IT people learn by doing. Creating a Linux home-lab environment puts you in a position to accomplish a series of tasks.

Some of the many benefits of home lab environments include:

  • Reinforcing Linux skills and concepts with hands-on tasks
  • Preparing for Linux certification exams, such as RHCSA and RHCE
  • Exploring open source solutions to common issues
  • Learning to find help on the internet and from within Linux
  • Showing yourself (and others) that you're ready to work with Linux daily
  • Learning and working with new technologies that can lead you further down your career path

Build your Linux lab environment

There are several options when it comes to building a lab environment. The two main choices are physical computers and virtual machines (VMs). These days, there are also cloud-based lab solutions, but this article focuses on locally hosted physical and virtual machines.

Physical computers

Using physical computers in a lab scenario has positive and negative aspects. The machines take up space, have a cost, and are not as flexible as a lab scenario might call for. However, repurposing older systems that you already own might be cost-effective and straightforward.

Here are some options:

  • Use one or two actual computers: You will be overwriting the hard drives, so be absolutely certain there is no important information remaining on these computers.
  • Use a Raspberry Pi: This computer costs approximately $30-$75 and can run multiple Linux distributions, depending on the model. (A Raspberry Pi may not be a great beginner option, but for those with a little more experience, it should be fun and educational.)

You must also provide network connectivity between the lab computers, and these computers also need internet access.

These systems only need to be powerful enough to run a local installation of Linux. Most Linux hardware requirements are not as significant as those of Windows or macOS.

Virtual machines

VMs are my preferred option, as they provide a great deal more flexibility than physical computers. You can use a single primary computer to host Linux-based VMs. The hardware requirements for this computer will be more stringent, but most modern systems can handle at least a couple of VMs.

Your host computer needs hardware powerful enough to run your operating system plus the virtualization software and the VMs themselves. Pay close attention to the amount of available RAM and storage space. I like laptops because their portability allows me to work in coffee shops, libraries, or even my back deck.

Here's a little more information on hardware specifications:

RAM: The system must have enough memory to support the host operating system, plus the quantity of RAM allocated to each running VM.

For example, my laptop has 32GB of RAM. My host operating system and a few basic applications consume perhaps 6GB. If I launch three VMs, allocating each 4GB of memory, they use 12GB. When combined with the host's 6GB, 18GB of my 32GB is consumed. While there are variations in these estimates and tricks to use memory more efficiently, this offers general guidance.

Hard drive space: The host operating system, applications, and your data consume storage space. However, when you download the installation files for the Linux distributions you intend to use in your lab, those will also consume space.

For example, the Fedora 33 ISO image I downloaded is 2GB in size. If you download five images, you have consumed a small chunk of storage space. However, VMs I build from these images also consume storage capacity. The VM I built from that Fedora 33 image consumes approximately 11GB. Try to provide plenty of storage capacity, and faster hard disk drives will improve performance as well.

[ Download the Linux cron cheat sheet. ]

Host operating system

You can use whatever host computer you have available to you. There are virtualization options for the three most common platforms. Here are a few suggestions for each host operating system:

  • Linux: Many distributions, such as Red Hat Enterprise Linux (RHEL), use KVM as their default virtualization technology. You can interface with KVM through various applications, including GNOME Boxes, QEMU, virt-manager, and more. You can also look to Vagrant or VirtualBox.
  • macOS: VirtualBox is a good open source VM manager, and Vagrant is a nice terminal-based VM manager.
  • Windows: Hyper-V (included with Windows editions) or VirtualBox are both viable choices.

Build your virtual machines

To build your VM, follow the documentation for whatever virtualization software you choose. The short version is that you'll need to download an ISO image of the distribution you want. Avoid the "Live" versions as those are used differently.

After you have your distributions, the virtualization software provides a VM configuration procedure that allows you to allocate RAM, hard drive space, and control network connectivity. It also allows access to the ISO image to begin the installation procedure.

[ Fill skills gaps by signing up for a free trial Red Hat Learning Subscription and get unlimited access to our comprehensive curriculum. ]

For more information on building a VM, see Alex Callejas' article, Build a lab in five minutes with three simple commands, which guides you to build a Linux VM using KVM.

Guest operating systems

Plan to experiment with several Linux distributions. Note the differences between the distributions and read about their suggested uses (business or home). Some vendors have a server version as well as a client version. Finally, consider package management differences and preferred desktop environments.

Suggested distributions for your lab:

  • Fedora is a popular and common distribution that provides practical day-to-day-use tools with an eye toward the future. Fedora has many Spins that offer specialized functionality.
  • Red Hat Enterprise Linux (RHEL) is popular among business communities and large organizations, with many enterprise-level services, strong support, robust documentation and training, stability, and a predictable release cycle.
  • CentOS Stream is a user-friendly distribution that is excellent for home computers and servers alike. It has plenty of power and flexibility for enterprise environments, but it is progressive enough to be suitable for the home desktop.

If you're new to Linux, start with a user-friendly distribution such as Fedora. I don't recommend starting with specialized distros. For instance, Kali Linux and the Fedora Security Spin are glamorous as security penetration testing platforms, but not necessarily a great place to start learning the basics of Linux.

Additional resources

There are many resources to help you get started with your home lab and with Linux in general. Here are a few ideas:

  • Vendor websites: Many Linux distributions, such as Red Hat, have forums and documentation. Learn to use these.
  • Online tutorials: Sites such as Enable Sysadmin and Opensource.com provide many focused tutorials and guides. You can search the web for even more such articles.
  • Existing labs: If you have attended training or purchased self-study guides, adapt exercises from the courseware to the labs.
  • Workplace assignments: Add real scenarios and configurations that you are required to do at work.

Wrap up

Home labs add value to the many great resources available to anyone learning Linux. They give you an environment to experiment and learn—critical tasks for those pursuing Red Hat certification, learning new work skills, or experimenting with new services. You can build home labs on physical or virtual machines with common host operating systems. There are many virtualization options available to work with, too.

Check out these related articles on Enable Sysadmin

Topics:   Linux   Career   Skills development   Virtualization  
Author’s photo

Damon Garn

Damon Garn runs Cogspinner Coaction, LLC, a technical writing and IT project company based in Colorado Springs, CO. He has been a technical instructor for nearly 20 years, with a focus on Windows Server, Linux, and security. More about me

On Demand: Red Hat Summit 2021 Virtual Experience

Relive our April event with demos, keynotes, and technical sessions from
experts, all available on demand.

Related Content

OUR BEST CONTENT, DELIVERED TO YOUR INBOX