Chapter 1
Preparing Your Environment

images Before beginning your journey to successfully pass the CompTIA Linux+ certification exam, you need a learning space. A learning space consists of Linux systems (virtual or physical), where you can actively try out, practice, and explore various Linux commands and utilities. Besides reading this book, having a private space to work freely will assist in your success.

You may already have experience working with Linux in your enterprise environment. However, most likely you are using only one Linux distribution. Training with more than one distribution is needed to pass the Linux+ exam.

In addition, your employer may frown upon any risky behavior on its systems. You need to feel free to try out Linux commands that may cause a system to crash. Your own learning space, containing various Linux distributions and their assorted tools, is a key factor in successfully passing the Linux+ certification exam.

This chapter begins by looking at a few items concerning the setup of your learning space environment. We will also explore various Linux distributions for your learning space. At the chapter’s end, we’ll cover a method for accessing the Linux command line.

Setting Up a Learning Space

Your learning space needs to be an environment where you can freely explore Linux and its various distributions (called distros for short) and utilities. Whereas some companies may have a spare Linux server available for you to fully use, many of us are not so lucky. Even if you are a student, with a nice lab environment already set up and available for your use, you may want your own space, where you can explore without restrictions.

Though there are many different ways to set up your personal learning space, we will focus on only a few, such as setting up Linux on an old laptop, implementing a virtualized environment, and using the cloud. Hopefully the ideas here will spur you on to setting up a helpful exploration and study environment.

Using That Old Laptop

If you’ve got a spare or old laptop sitting around, repurposing it as your Linux learning space may work well for you. This is especially useful if you like to move your study environment, such as, for example, moving to a different and quieter location in your home when things get a little loud and crazy. An old desktop will also work, but you will be less mobile.

Whatever system you choose, you need to ensure that it has enough capacity to handle the minimum hardware requirements for a learning space. If you plan on installing multiple Linux distributions on a single system, booting them individually, and not using a virtualized environment, then Table 1.1 will serve as your requirements guide.

Table 1.1 Hardware requirements for using single distribution at a time

Resource Minimum Recommended
Memory 2GB >= 4GB
Free disk space 25GB >= 30GB
Processor 2GHz dual core > 2GHz dual core

Though you can use this learning space, it is certainly not ideal. In addition, you can expect this type of Linux learning environment to boot and operate slowly. This learning space environment should be used only if you have no other options.

Creating a Virtualized Environment

Creating a virtualized environment for your Linux learning space is ideal. This setting will allow you to boot multiple Linux distributions at the same time, enable you to move quickly between them, and provide compare and contrast experiences. In addition, you can explore networking utilities more thoroughly in such an environment.

images If you are unfamiliar with a virtualized environment, do not despair. Not only are there many resources on the Internet that can get you up to speed, we also cover virtualization concepts in Chapter 28.

There are several excellent and free virtualization products (called hypervisors or virtual machine managers), which you can install. They include the following.

Oracle VirtualBox This actively developed open-source software is available at www.virtualbox.org. It can run on Linux, Windows, Macintosh, and even Solaris. You can use VirtualBox to run multiple Linux distributions at the same time, assuming your hardware has enough resources. The website is loaded with helpful documentation and has community forums to help you create your Linux learning space.

VMware Workstation Player VMware Workstation Pro is a proprietary closed-source virtualization product. VMware offers a free version called Workstation Player, which is available at https://www.vmware.com/products/workstation-player.html. This free version does have its limits. Workstation Player will only allow you to run a single virtual machine at time. Also, if you want to install it at your company’s site, you must pay a fee to do so.

images If you are using a Mac, VMware Workstation Player will not work on your system. Instead, VMware offers a free virtualization product called VMware Fusion. It is available at https://www.vmware.com/products/fusion.html.

Microsoft Hyper-V This closed source virtualization product is available on many current Windows 64-bit versions, such as Windows 10 Professional and Enterprise. However, Windows 10 Home edition does not support it. You can use Hyper-V to run multiple Linux distributions at the same time, assuming your hardware has enough resources.

Please don’t feel limited by this list. It includes only a few suggested hypervisors to investigate. If you have found a virtualization product that works better for your environment, use it for your learning space.

Prior to selecting and installing a particular hypervisor, determine if your laptop or chosen system has enough capacity to handle the entire learning space’s minimum hardware requirements. If you plan on installing and running multiple Linux distributions at the same time, use Table 1.2 as a guide for your needed hardware resources. However, be aware that the virtualization products’ websites may provide more detailed information.

Table 1.2 Hardware requirements for using a virtualization product

Resource Minimum Recommended
Memory 8GB >= 8GB
Free disk space 70GB >= 100GB
Processor

x86_64

2GHz dual core

x86_64

> 2GHz dual core

Using a virtualized learning space is very flexible. Figure 1.1 shows an example of this type of elastic learning space environment.

The figure shows a screenshot illustration the learning space environment using Oracle VirtualBox.

Figure 1.1 Learning space using Oracle VirtualBox

Notice in the learning space depicted in Figure 1.1 that there are two installations of CentOS. One has Unified Extensible Firmware Interface (UEFI) set, and the other one does not. This will allow for exploring both BIOS and UEFI booting. The UEFI boot setting is within the hypervisor software and must be set prior to the distro’s installation. You cannot jump between these boot methods after the installation is complete.

Hopefully you are starting to gather some ideas of how you want to configure your private learning space. Before you do, there is one more space possibility we need to explore.

Jumping to the Cloud

If you do not own a laptop or desktop with enough resources to provide a multiple Linux distribution learning space, consider the cloud. Chris Watterson at www.chriswatterston.com/blog/my-there-is-no-cloud-sticker famously coined the words, “There is no cloud. It’s just someone else’s computer.” While that statement is an oversimplification of cloud computing, the description does work for what you may need for your learning space.

There are many cloud service providers where you can start up various Linux distribution virtual machines, such as Amazon Web Services (AWS), Microsoft Azure, and DigitalOcean. Cloud services change rapidly, so you may not be able to find the Linux distribution versions you need. However, it is worth your time to take a look at the various offerings from cloud service providers. The cloud just might be a cheaper option for your learning space than a new computer.

images If you choose to use a cloud service, the service may not allow you a way to explore certain CompTIA Linux+ objectives, such as, for example, modifying how a Linux server boots, such as via BIOS versus UEFI. Keep this in mind as you explore your learning space venue.

Before you settle on the location for your learning space, consider the various recommended Linux distributions and their versions. These are additional components of your successful learning space environment.

Exploring Linux Distributions

The CompTIA Linux+ certification is vendor neutral. In practical terms, that means no particular Linux distribution is the focus of the exam. If you have experience with Red Hat Enterprise Linux (RHEL), you need to learn more about utilities and features on Ubuntu and openSUSE distributions and vice versa.

It is tempting to think that Linux distributions are all the same and few differences exist between them. Unfortunately, this is a fallacy. We like to compare the Linux kernel to a car’s engine and a distribution to a car’s features. If you have ever rented a car, the car’s features are often rather different than the features of the car you normally drive. When you get into the rented car, you have to take a few minutes to adjust the seat, view the various car controls, and figure out how to use them prior to taking off onto the roadway. This is also true with learning new distributions. The good news is that if you have lots of previous experience with Linux, learning a new distribution is not that difficult.

images Linux distributions are often based on other distributions or distribution forks. Two popular distribution groups, which contain distributions helpful to passing the Linux+ exam, are Red Hat based and Debian based. Differences between these two groups include software packages, names, and their management tools; configuration file names and/or locations; software release schedules; firewall configuration utilities; and so on. Red Hat Inc. tends to focus on businesses and enterprise computing, while the Debian Project focuses on free software. Due to these various differences, it is necessary to use distributions from both groups in your learning space.

It is important to understand which Linux distros will help you in successfully passing the CompTIA Linux+ certification exam. In addition, you should know which particular distribution versions are helpful.

Looking at CentOS

Community Enterprise Operating System (CentOS) has been around since 2004. It is nearly an exact duplicate of RHEL, a very popular enterprise Linux distribution. While obtaining RHEL requires a paid subscription via Red Hat, CentOS is free and a great study resource for the CompTIA Linux+ certification exam.

You can obtain a CentOS Linux distribution ISO from the CentOS website at www.centos.org. Be aware that this distribution, like many others, comes in multiple flavors. We recommend you obtain the CentOS version 7.* Everything ISO.

images As time goes on, new CentOS distribution versions will be available. While it is always tempting to get the latest and greatest version, it is not beneficial to use it in your learning space. Remember that the CompTIA Linux+ objectives are static, until the next time the certification exam is updated. Therefore, it is wise to use the distribution versions that were available at the certification exam’s creation time.

After you install your CentOS version 7.* Everything distribution, you should update the software packages. Do this by logging in to the root account using the password you set up during installation and issuing the commands shown in Listing 1.1.

Listing 1.1: Updating software on CentOS

# sudo yum update
Loaded plugins: fastestmirror
[...]
Upgrade  3 Packages

Total download size: 1.3 M
Is this ok [y/d/N]: y
[...]
Complete!
#

Be aware that by default the CentOS version 7.* Everything distribution will not have a graphical user interface (GUI) installed with it. Though the CentOS distribution’s flavor name is Everything, it is installed as a minimal server. If you prefer a GUI installed with this distribution, log in as root, and issue the commands shown in Listing 1.2.

Listing 1.2: Installing a GUI on CentOS

# yum groupinstall "GNOME Desktop" "Graphical Administration Tools"
[...]
Total download size: 727 M
Installed size: 2.3 G
Is this ok [y/d/N]: y
Downloading packages
[...]
Complete!
#
# ln -sf /lib/systemd/system/runlevel5.target 
> /etc/systemd/system/default.target
#
# reboot

images If you have not used the CentOS distro previously or have limited experience with Linux, it is recommended you read all of this chapter prior to attempting to install the GUI. However, don’t let this note stop you. If you want to try it, go ahead. Sometimes trying, stumbling, and trying again makes wonderful learning experiences.

While CentOS is a popular distro in the Red Hat camp, you also need a distribution in the Debian camp. Next, we’ll explore the Ubuntu distribution.

Looking at Ubuntu

The Ubuntu Linux distribution is managed by Canonical LTD and has also been around since 2004. This free and popular Linux distro is based on the Debian distribution and is a must-have in your personal Linux learning space.

You can obtain the Ubuntu distro ISO from www.ubuntu.com. There are several flavors of Ubuntu, and we recommend you download the Ubuntu Desktop version 18.04 LTS.

images The LTS in the Ubuntu version name stands for Long Term Support. This is an indicator Canonical uses to show it will provide maintenance and security updates for an extended time period. In the case of 18.04 LTS, you can count on these updates through April 2023.

If you are unfamiliar with Ubuntu, you need to be aware of a few important items. By default, you cannot log into the root account. Instead, when you need to use super user privileges, log into the account you set up at installation and put the command sudo in front of your command-line commands. An example is shown in Listing 1.3.

Listing 1.3: Using sudo on Ubuntu

$ sudo grep root /etc/shadow
root:!:17737:0:99999:7:::
$

images If you have never issued command-line commands in a terminal, it is recommended you read the entire chapter prior to attempting to do so. You will read more about terminals later in this chapter.

Another important item concerns installing Ubuntu. If you are connected to a network, you can automatically update the distribution’s software when you install the distribution. You will see this option listed in the installation process as Download updates during the installation with a check box next to it. It is generally recommended that you do not select this option. Instead, you can update the software after you have completed a successful installation. To update the software via the command line, manually issue the commands shown in Listing 1.4 in a terminal, using super user privileges.

Listing 1.4: Updating software on Ubuntu

$ sudo apt-get update
[sudo] password for Christine:
Hit:1 http://us.archive.ubuntu.com/ubuntu bionic InRelease
Get:2 http://us.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
[...]
Fetched 1,053 kB in 2s (631 kB/s)
Reading package lists... Done
$
$ sudo apt-get dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
[...]
Do you want to continue? [Y/n] Y
[...]
$

If you have room for only two Linux distros, CentOS and Ubuntu make fine choices. If you have additional resources, it would be worthwhile to add another distribution, openSUSE.

Looking at openSUSE

The openSUSE distro had its first release in 1994, under a different name, SUSE Linux. There have been many companies involved in supporting it, with the Germany-based company SUSE being the original.

This distro has a very loyal and solid following. Not only is the openSUSE distribution strongly supported by community developers, the openSUSE users love it as well. One of its unique and popular utilities is the Yet another Setup Tool (YaST). YaST, which can be thought of as a command-center utility, allows you to control many system services from one interface.

You can obtain the openSUSE distribution ISO from https://software.opensuse.org. This distro comes in two primary flavors, Leap and Tumbleweed. We recommend you select openSUSE Leap version 15.*.

images The openSUSE community changed its distribution’s version numbering scheme in 2017. The version before 15.0 was 42.3. Be aware of this dramatic change when you go to obtain openSUSE Leap.

Once you have successfully installed openSUSE, it is a good idea to update all the software prior to exploring this distro. To update the software via the command line, manually issue the commands shown in Listing 1.5, in a terminal, using super user privileges.

Listing 1.5: Updating software on openSUSE

$ sudo zypper patch
[sudo] password for root:
Loading repository data...
Reading installed packages...
Resolving package dependencies...
[...]
    Note: System reboot required.
Continue? [y/n/...? shows all options] (y): y
[...]
Warning: One of the installed patches requires a
reboot of your machine. Reboot as soon as possible.
There are some running programs that might use files
deleted by recent upgrade. You may wish to check and
restart some of them. Run 'zypper ps -s' to list these programs.
$

You may have noticed that the last three distros use different commands for updating software. This is another reason you need to have access to multiple distributions in your learning space. We’ll look at one more important distro next.

Looking at Fedora

Fedora is maintained by the Fedora Project, which is sponsored by Red Hat. Innovative and sometimes bleeding-edge software is one of this distribution’s great features. If you want to try something new, Fedora is for you. This distro, like the others, comes in multiple flavors, which are called editions by the Fedora Project. We recommend Fedora 28 Workstation edition. You can get a copy of this Fedora ISO at https://getfedora.org.

images Be aware that this particular distro updates its versions every six months. Therefore, you may need to retrieve Fedora 28 Workstation from this location instead: https://dl.fedoraproject.org/pub/fedora/linux/releases/28/Workstation.

The Fedora distro comes not only in multiple flavors, but also in multiple spins. A spin is an extra special flavor of Fedora. For example, if you are not happy with the default GUI that comes prepackaged with Fedora, you can opt for a spin that has a different GUI. If you want to browse the various Fedora spins available, take a look at the Fedora Project spins’ website, https://spins.fedoraproject.org.

Similar to the Ubuntu distro, by default, you cannot log into the root account. Instead, when you need to use super user privileges, log into the account you set up at installation, and put the command sudo in front of your command-line commands.

Once you’ve got Fedora Workstation successfully installed, update the software. To update the software via the command line, log into the account you set up at installation, and manually issue the commands shown in Listing 1.6 in a terminal, using super user privileges.

Listing 1.6: Updating software on Fedora

$ sudo su -c 'dnf upgrade'
[sudo] password for Christine:
[...]
Install    4 Packages
Upgrade  161 Packages
Total download size: 295 M
Is this ok [y/N]: y
Downloading Packages:
[...]
Complete!
$

If very few packages get updated, you may need to add an additional option to your command. Issue the command sudo su -c 'dnf upgrade –refresh' in a command-line terminal.

If you have spent your time on Linux in the GUI or are fairly new to Linux, you may be unfamiliar with how to access a command-line terminal. The next section will help. If you are a seasoned command-line user, you can skip this section.

Locating a Terminal

For exploring Linux and preparing to take the CompTIA Linux+ certification exam, you need to spend some time at the command line. The terminal is your gateway to the command line. Once you understand how to locate and use this terminal, you can start progressing through the rest of this book’s contents.

The simplest way to reach a terminal in most distributions is by pressing the key combination Ctrl+Alt+F2 after the system boots. This will take you to a terminal named tty2. After entering the username and password you created during the Linux distribution’s installation, you will be provided a prompt. Figure 1.2 shows a tty2 terminal on the openSUSE distribution.

The figure shows a tty2 terminal on the open- SUSE distribution.

Figure 1.2 openSUSE tty2 terminal

At the terminal prompt, you can start entering commands. If you have newly installed the distro, go ahead and update its software as directed earlier in this chapter. To leave this terminal, simply type in the command exit.

Summary

A learning space is a virtual or physical Linux system where you can explore, practice, and try out various Linux commands and utilities. A private learning space is a necessity to be successful in passing the CompTIA Linux+ certification exam. You can set up a learning space on an old laptop, on a current laptop using a hypervisor, or within the cloud.

Having multiple Linux distributions in your learning space is also essential. Because the distributions have differences, it is important to have them readily available to explore those differences.

Once you have your Linux learning space set up, you can start to dive into the CompTIA Linux+ certification objectives. We’ll begin covering those objectives in the next chapter.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.191.134