User-Level Intro to Linux

Module #01 - Basic Usage

This is the first of our regular learning modules, it will follow the same template that every subsequent module will follow.

This module is going to get you stared by focusing on the essentials skills you need to be quickly operational on a Linux system. We will not go into depth but instead focus on the easiest ways to accomplish a small set of everyday tasks.

Topics Studied in this Module

T1 - Ubuntu Desktop Essentials
Introduction to using the Ubuntu Linux default desktop manager. We also cover a minimal set of tools that will allow you to edit files and navigate the file system by only using GUI tools.
T2 - CLI Essentials
Introduction to the Linux Command Line Interface and its Bash shell. We will cover the basics of navigating the file system (more about this topic in the module dedicated to the Linux File System), as well as managing processes.
T3 - Getting Help
You might have heard the saying "Give a man a fish and he is fed for a day, teach him to fish...". When it comes to Linux, or just about any operating system you might have to use or administer, "learning to fish" boils down to learning to get help. Some would say it boils down to learning to learn. This topic will help you learn to use the help tools available in any Linux system.

Learning Activities

This module features the following learning activities; DF, PA, GQ

Linux+ Exams Objectives

This module deals with material related to the following objectives from the CompTIA Linux+ and LPI certifications exams.

  • Exam LX0-101 - Objective 103.1 - Work on the command line
  • Exam LX0-101 - Objective 103.3 - Perform basic file management
  • Exam LX0-101 - Objective 103.5 - Create, monitor & kill processes
  • Exam LX0-102 - Objective 110.1 - Perform security administration tasks

T1 - Ubuntu Desktop Essentials

Let us get started with the obvious. You may use your Linux system simply through its desktop environment. The following videos will show you how to do so on various versions of Ubuntu that have been used in this offering since its inception. While these will show you the evolution of the "default" Ubuntu desktop experience, most of the tools we are using will be the same. Focus on the most recent Ubuntu release since this is the one we will be using.

You will find two brief videos below on how to use the main tools of your desktop environment. Make sure you watch them then practice using the various tools they demonstrate.

  • Demo Video - Ubuntu Desktop Overview
  • Video Link: YouTube
  • Watch this video as part of your "readings assignments"
    It will show you how to perform simple tasks using the Ubuntu Gnome desktop. This version of the desktop, used with the 10.04LTS release, would now be referred to as the "classic" desktop, as opposed to the new "unity" system.
    However, the video is still worth watching since many distributions still use Gnome or the similar KDE desktop environment. Also, it explains how to use the few tools which are introduced, e.g. texteditor, filebrowser...
    The following video will build on what we learned here and introduce the "unity" desktop environment used with release 12.04LTS.
  • Demo Video - Ubuntu Unity Desktop
  • Video Link: YouTube
  • This video takes up where the above leaves us. We review how to find the above-mentioned tools with the new Unity Ubuntu Desktop Environment.

During summer 2019, Luis Campuzano pointed out that the right-click menu option to create new files was gone from Nautilus since Ubuntu 18.04. He found the following workaround, using the Templates folder.

T2 - Command Line Interface Essentials

In order to supplement the easy-going introduction from the previous topic, we will also learn to use the Command Line Interface (CLI). To get you started, first watch the following video to get an idea of what your interaction with the Bash shell is all about.

  • What is interacting with Bash all about?
  • Video Link: YouTube
  • This video discusses a few high level concepts that are meant to frame your understanding of what interacting with the Bash shell, and the Linux command line interface more generally, is all about. We look at the different types of "commands" that the shell is able to execute for you; builtins, aliases, and external commands. We do not talk much about keywords and functions since we will deal with these in more details when we consider Bash scripting.

Now that you have a high-level perspective on interacting with the Linux CLI, let us take a closer look at one of the types of commands we mentioned above; aliases

  • Bash aliases
  • Video Link: YouTube
  • This video shows how to define and undefine aliases in your current Bash shell session. It then show the syntax allowing you to execute multiple commands in the same line, and discusses the general syntax used in UNIX and Linux to specify different types of options to shell commands.

The next topic we are going to cover is that of filesystem navigation from the Linux CLI. We will have another module dedicated to explore aspects of the Linux filesystem in more depth but, for now, we simply want to show you how to perform, from the CLI, some of the basic tasks that you already learned to perform with the GUI-based file explorer.

  • Filesystem Concepts
  • Video Link: YouTube
  • This video looks at the most elementary topics related to navigating the filesystem from the Linux CLI; absolute vs. relative pathnames for files and folders.
  • Moving Around in the Linux File System
  • Video Link: YouTube
  • We look at the cd, dirs, pushd and popd Bash builtins that allow us to navigate the Linux file system from the Command Line Interface.
  • Creating and Removing Files or Folders
  • Video Link: YouTube
  • This video looks at the mkdir, rmdir, rm and touch commands.
  • Copying, Moving and Renaming Files or Folders
  • Video Link: YouTube
  • We look at the cp, and mv commmands.

In addition to being able to "move around" your file system from the CLI, another basic goal of this module is to familiarize you with how to launch applications from the command line and manage the corresponding processes' life cycles. The following video will go over the practical aspects of such tasks.

  • Bash Process Management
  • Video Link: YouTube
  • This video will show you how to monitor the processes running on your Linux system. It will also detail how to run external commands in both the foreground and the background of your shell. We look at the fg, bg and jobs commands as well as the CTRL-C and CTRL-Z keyboard shortcuts.
  • Sending Signals to Processes
  • Video Link: YouTube
  • This video takes a closer look at the Process ID way to refer to processes as well as the kill command, along with the signals it is able to send.

To wrap up this topic, we are going to use several of Ryan Chadwick's Linux tutorials. These will allow you to have a written reference, however, please keep in mind that the tutorials below supplement the above videos (and reciprocally). So one is not a drop-in replacement for the other, nor a replacement for you taking your own notes as you study. The idea here is to provide you with diversified types of learning material (video, audio, written) so as to keep you engaged with the topics regardless of your individual learning style preferences.

  • Reading Assignments
  • URL Link: Ryans Tutorials - Linux Tutorial
  • The following sections of the Ryan Linux Tutorial are reading assignments for this module; Be warned that the second tutorial sounds like it is implying that the kill command only kills processes. From the above videos, you should know better; it really sends signals to process. It only so happen that the default signal it sends is TERM which terminates processes, thus explaining the origins of its name.

T3 - Getting Help

The third topic explored in this module is one that you will use throughout this offering, the subsequent offerings in our Linux specialization track, and most likely your life-long learning in Information Technology as a whole.

Being able to look for help regarding new tools or technologies, and using reliable reference material to do so, is an essential skill for an IT Professional to develop - regardless of his or her specialization. The following reading assignments and videos will focus on instilling this skill.

First, let us take a look at the various commands that allow you to get help, right from the CLI.

  • Using Less
  • Video Link: YouTube
  • Before we learn to read manual pages, we take a look at the less command and how to use it to search for information in a plain text file. Since the man utility (see below) uses less to display manual pages, this will all come in handy very soon, and then again, when we learn how to combine the output of multiple commands together.
  • Manpages Structures
  • Video Link: YouTube
  • This video shows how to access help when working with the Linux CLI in general, and Bash in particular. It covers the ubiquitous --help option, the help builtin command, and finally the man command that allows you to access the manpages from the online manual.
  • Searching through the online manual
  • Video Link: YouTube
  • We explore further tools used to acces what is generally referred to as the Linux online manual; man, whatis, apropos.

Use the following reading assignment to wrap up this topic and make sure you are clear on the material introduced so far.

We are going to use the Discussion Forum for this module to let everyone explore what it means for software to be released under an "open source" license. To this end, you will have to pick one of the following topics and address all of the questions listed for it.

Topic #1 - What does Open Source mean?

  • Who defines what "open source" means? Hint: yes, some people use the term quite liberally but there is a defining body.
  • What does it take for a project to be considered open source? Hint: again, no need to invent things here, find the relevant definitions.
  • What is the difference between "free as in free beer" and "free as in freedom"? Where did that expression originate?

Topic #2 - Open Source Legalities

  • Name two prominent open source licenses and provide official references to their definitions.
  • Explain, in your own words, how exactly they differ form one another.
  • For each of them, provide a fictional scenario illustrating when you would use it instead of the other one.
  • Provide one example of open-source related law suits, along with its outcome, and references to the sources you used.

Requirements for your Posts

Your post will have to address only one of the above topics; make sure the title of your post clearly indicates which topic you selected.

Inside the post, you will need to address each of the questions listed for the topic that you selected.

You must provide detailed references to the sources of information you researched in order to answer the questions.

You must make explicit reference to these data sources from the text in order to support each of your claims.

How to get a good grade on this type of DF?

As with any DF assignments, you will not be able to see your classmates posts before to make your own. If you make an empty post, or post something then delete it, you will not receive points as this suggests you were able to see everyone else's posts and use them to get ideas.

Opinions are easy to come by, try to Google anything subject to controversy and you will find thousands of them. As such, their value is nil except if they are backed by facts or logical arguments. Make sure that you reference information that you found in order to support the points you are making. Students who simply post arbitrary opinions will not receive points in this kind of DF.

During the first week, you were asked to test that the live Ubuntu ISO image was able to work on your Virtual Box. This first Practice Assignment will guide you through setting up Ubuntu Linux on a virtual hard-drive inside your virtual machine. This way, you will be able to keep working on the same virtual machine without loosing your work when you reboot.

When you work on your PA assignments, make sure that you keep notes. By the end of each PA, you should have a how-to document with all the steps you used to perform each requested tasks, screenshots whenever useful, and references to the various resources that were helpful to you.

Rules for all PA reports to be submitted

You should submit a single PDF which contains your answers for every task. Make sure to include your name at the top of the document, and clearly demarcate your responses for each question of each task.

For any screenshot you submit, you need to make sure that it provides relevant information for the question. You should do a print screen to capture any screenshot for this course, please contact the TA if you are unsure about how to do this. In addition, your name should appear somewhere in every screenshot.

For text-based responses, you need to make sure that you go into enough detail that you completely answer the question. Depending upon the question a single sentence may be adequate, or you may need to write a longer response. Please correct any spelling or grammar issues before you submit, this will make grading easier and help avoid any confusion. If you submit poorly written work, you grade will be reduced accordingly. You should cite any external resources you use. In the case of a web page the url is sufficient.

All graded assignments should be completed individually, without any form of external help. Please contact the instructor or the TA if you have any questions.

You are encouraged to use open source officeware available on your Linux virtual machine to prepare such documents. Make sure you keep them professional looking and back up your information with both references and screenshots showing that you were actually able to use the software on your own Linux virtual box.

Step 1 - Preparing a new virtual machine with virtual disks

First, you need to create a new Ubuntu virtual machine. However, this time around, also create a virtual hard drive on which you will install Ubuntu. That will allow you to run your Linux virtual machine from the same virtual disk instead of running it from the ISO image directly.

As you try to do so, you will have to use many of the features provided by Virtual Box. Identify the decisions that you had to make when configuring your virtual hard drive. For each, experiment with them, and research information about them, so that you are able to explain, in your own words, which ones you would recommend to another student in this course to use. Justify your recommendations based on the resources you consulted.

What you are expected to put in your report for this step;

  • Provide a screenshot that clearly shows that the virtual machine has been created and a virtual hard drive has been attached. To do this you can simply take a screenshot of the Virtual Box home page with your new VM and its "information" tab selected.
  • Provide a summary of the notes that you took to document the configuration decisions you made. Also provide the references to the documentation you researched online to help you do so.

Now we are ready to use this new virtual machine to install Ubuntu on a virtual disk.

Step 2 - Booting the new VM / Installing Ubuntu

Now that you have the Virtual Machine configured to boot the Ubuntu install ISO, you are ready to actually install the Ubuntu operating system on its virtual disk.

Boot your new virtual machine from the ISO image and, instead of “trying out” Ubuntu as a live CD, select the option allowing you to install it to disk. As you go through the installation process, do some research on the various installation options available to you. Keep notes on the decisions you make, their justification as if you were to recommend them to a classmate, and the references to the resources you consulted.

Once ubuntu has booted, you should be prompted, within minutes, to update the system. Feel free to get this over with so that you have the latest versions of all installed software.

Last but not least, you might have noticed that, when you resize the window for this new virtual machine, Ubuntu might not actually detect the resizing and is therefore still only using a small part of your visual real estate. To fix this, go to the Devices menu at the top of your virtual machine's window. Select the option allowing you to Insert Guest Additions CS Image. Virtual Box will then let Ubuntu know that a virtual CD has been inserted. Ubuntu will prompt you to auto-run the contents. Do it and it will install the software (Loadable Kernel modules) necessary to make Ubuntu aware that it is running in a virtual box. This will allow you, among other things, to resize the Ubuntu desktop by resizing the virtual machine's window.

What you are expected to put in your report for this step;

  • Provide screenshots that clearly show that you were able to boot your Ubuntu installation from the virtual disk. To do this you can simply take a screenshot of the Virtual Box main page with your new VM and its "information" tab selected. Open a terminal window on the desktop and type your full name in it so that it shows on the screenshot.
  • Provide a summary of the notes that you took to document the installation decisions you made. Also provide the references to the documentation you researched online to help you do so.

Step 3 - Using Virtual Machine Snapshots

One of the benefits of learning about Linux via a virtual machines is that you may actually wildly experiment without fear of breaking anything that can not be readily restored. To this end, Virtual Box provides you with an interesting feature called "snaphots".

Snapshots allow you to save the entire "state" of your virtual machine; i.e. what is on the disks, memory... Once you have taken a snapshot of your virtual machine, you may revert back to it at a later time, thus undoing anything that you might have broken while experimenting.

Let us take a look at this feature in more details...

  • Link - Virtual Box First Steps Manual
  • URL Link: https://www.virtualbox.org/manual/ch01.html#snapshots
  • This section of the virtual box "first steps" manual explains what snapshots are, and how to use them. Make sure you read this before to proceed any further into this PA and use the course forums to ask any questions you might have about this toll.

Now that you have an idea about what snapshots are able to do for you, let us design a small "experiment" to make sure you are able to leverage them;

  • Use the various tools we demonstrated in the videos of this module to create a text file with your full name in it
  • Use the file explorer we demonstrated in our videos to verify the files are indeed in your home directory
  • Now, take a snapshot of your virtual machine, as explained in the above manual
  • We then need to delete some of the files you created, using the same GUI-based file explorer we already used above
  • Verify that the files are gone then restore your snapshot
  • Verity that the files you previously deleted are now available again

As you work on the above list of tasks, make sure you keep detailed notes on what you did, what you had to lookup on online resources. As we previously discussed, these notes are essentials to help you remember how you solved the challenges presented to you in the PA assignments. Otherwize, it is very easy to work through a PA and then later find yourself wondering how you did it when working through a similar question during an exam. You do not want this :)

What you are expected to put in your report for this step;

  • For each of the tasks in the above list, provide screenshots proving successful completion of the work.

This tab provides you with optional resources meant for those who want to learn a bit more about the topics covered in this module.

Understanding Open Source

These websites will help you gain a better understanding of the open source movement;

If you are curious, and would prefer to consult books or documentaries, the following might be a good starting point;

Some webinars freely available on YouTube might also be of interest to you;

Last but not least, learning bit about Linus Torvals might not be such a bad idea either ;p

Open Source Legalities

Harley Hahn's Guide to UNIX and Linux

If you are interested in learning more about the topics covered in this module, I recommend you look for Harley Hahn's Guide to UNIX and Linux. It is unfortunately out of print but is a great (and entertaining) read about the topic.

The following sections of the above are particularly relevant to this module;

  • Section 7: Using the Keyboard with UNIX
  • Section 8: Programs to Use Right Away
  • Section 9: Documentation: The Unix manual and Info

Just for fun...

Those of you who are completely new to Linux might not be aware that this operating system is not only used in the confines of the major data centers or high-performance computing centers.

Here are some ideas of topics you might want to explore further just for fun;

  • Windows 10 marks an interesting development in terms of the relations between the Linux community and Microsoft. Following in the footsteps of projects like GNU Cygwin, there is now a way to get a Ubuntu-based overlay on your Windows 10 system and access it via a Bash-powered command line. For more details, refer to this tutorial or this one, along with this overview of available features. A project worth keeping an eye on.
  • Update on the above - The Windows Subsystem for Linux is reaching its second major release. By the time of this writting, WSL2 should be officially released and easy for each of you to install and tinker with. Check out the following links if you want to learn a bit more about WSL2; Microsoft WSL documentation, Blog post on the 2020 build. Many thanks to Dmytro Vitel, one of my grad students, for bringing the release of WSL2 to my attention!
  • If you are into Do-It-Yourself, or have a taste for tinkering, you might have heard of single board computers. This list would not be complete if I didn't mention the wealth of tutorials and projects revolving around the Raspberry PI hardware platform, or other similarly intended Linux-powered single board computers; e.g. Pine 64. If you are interested, the MagPI magazine makes most of their issues freely available on this webpage.