Back to courses
Technology beginner

Linux for Beginners

Duration0 hours
Modules7
Get started — free →

Course outline

Module 1 Module 1: Introduction to Linux and Its Distributions

Introduction to Linux and Its Distributions

Introduction

Core content I

Core content II

Core content III

Summary

Further learning

Knowledge check

Q1. Which of the following best describes the Linux kernel?
  • A. A desktop application suite for editing documents
  • B. The core component that manages hardware resources and system processes ✓
  • C. A graphical interface used to launch applications
  • D. A package manager for installing software

Why: The Linux kernel is the core of the operating system. It manages the CPU, memory, devices, and processes, acting as the bridge between hardware and software.

Q2. What is a Linux distribution?
  • A. A single program that replaces the kernel
  • B. A complete operating system built around the Linux kernel, bundled with software, tools, and a package manager ✓
  • C. A type of hardware designed to run Linux
  • D. A virtual machine used only for testing

Why: A distribution (or distro) packages the Linux kernel together with system utilities, libraries, a desktop environment or server tools, and a package manager. Examples include Ubuntu, Fedora, and Debian.

Q3. Which Linux distribution is widely known as a beginner-friendly option with a large community and frequent use on desktops?
  • A. Gentoo
  • B. Linux From Scratch
  • C. Ubuntu ✓
  • D. Slackware

Why: Ubuntu is popular with beginners because of its user-friendly installer, extensive documentation, and large community support. Gentoo and Linux From Scratch require significant manual configuration, and Slackware is known for its minimalism and a steeper learning curve.

Q4. What is the primary difference between Debian-based and Red Hat-based distributions?
  • A. Debian-based distributions cannot run on x86 hardware
  • B. Debian-based distributions use the apt package manager, while Red Hat-based distributions use dnf or yum ✓
  • C. Red Hat-based distributions do not support command-line tools
  • D. Debian-based distributions are only used for servers

Why: Debian-based systems such as Ubuntu and Linux Mint use apt (with dpkg underneath), while Red Hat-based systems such as Fedora, RHEL, and Rocky Linux use dnf or yum. The package format and tooling differ between these families.

Q5. What does the term 'open source' mean in the context of Linux?
  • A. The software is free of charge but its source code is hidden
  • B. The software can only be modified by its original developers
  • C. The source code is publicly available for anyone to view, modify, and distribute ✓
  • D. The software runs only on open hardware platforms

Why: Open source means the source code is publicly available under a license that allows people to view, modify, and redistribute it. This openness is a core reason Linux is developed collaboratively by a global community.

Module 2 Module 2: Navigating the File System

Navigating the File System

Introduction

Core content I

Core content II

Core content III

Summary

Further learning

Knowledge check

Q1. Which command displays the current working directory in a Linux terminal?
  • A. ls
  • B. pwd ✓
  • C. cd
  • D. whoami

Why: pwd stands for 'print working directory' and shows the full path of the directory you are currently in. ls lists contents, cd changes directories, and whoami shows the current user.

Q2. What does the command 'cd ..' do?
  • A. Deletes the current directory
  • B. Moves up one level to the parent directory ✓
  • C. Moves to the home directory
  • D. Displays hidden files

Why: The double dot (..) is a shortcut that refers to the parent directory, so cd .. moves you up one level in the directory hierarchy.

Q3. Which command lists all files in a directory, including hidden files that begin with a dot?
  • A. ls
  • B. ls -l
  • C. ls -a ✓
  • D. ls -d

Why: The -a option tells ls to show all entries, including hidden files whose names begin with a dot. Plain ls omits these hidden files by default.

Q4. What is the symbol used to represent the home directory of the current user?
  • A. /
  • B. *
  • C. ~ ✓
  • D. #

Why: The tilde (~) is a shorthand for the current user's home directory, so cd ~ takes you home regardless of where you currently are.

Q5. What is the root directory in a Linux file system?
  • A. The directory containing the user's personal files
  • B. The top-level directory represented by a single forward slash (/) ✓
  • C. The directory where installed programs are stored
  • D. The temporary directory used during boot

Why: The root directory is the top of the Linux file system hierarchy and is represented by a single forward slash (/). All other directories branch out from it.

Module 3 Module 3: Basic Commands and Terminal Usage

Basic Commands and Terminal Usage

Introduction

Core content I

Core content II

Core content III

Summary

Further learning

Knowledge check

Q1. Which command displays the current working directory?
  • A. ls
  • B. pwd ✓
  • C. cd
  • D. whoami

Why: pwd stands for 'print working directory' and shows the full path of the directory you are currently in. ls lists files, cd changes directories, and whoami shows the current username.

Q2. Which command lists all files in a directory, including hidden files that begin with a dot?
  • A. ls
  • B. ls -l
  • C. ls -a ✓
  • D. ls -h

Why: The -a flag tells ls to show all entries, including hidden files whose names start with a dot. Plain ls hides them, -l gives a long listing, and -h makes sizes human-readable.

Q3. What does the command 'cd ..' do?
  • A. Deletes the parent directory
  • B. Moves to the root directory
  • C. Moves up one level to the parent directory ✓
  • D. Creates a new directory named '..'

Why: In Linux, '..' refers to the parent directory, so 'cd ..' changes your location to the directory one level above the current one.

Q4. Which command creates a new empty directory named 'projects'?
  • A. touch projects
  • B. mkdir projects ✓
  • C. newdir projects
  • D. make projects

Why: mkdir (make directory) creates a new directory. touch creates empty files, and 'newdir' and 'make' are not standard commands for creating directories in a typical Linux shell.

Q5. Which command displays the contents of a text file named notes.txt in the terminal?
  • A. open notes.txt
  • B. run notes.txt
  • C. cat notes.txt ✓
  • D. show notes.txt

Why: cat prints the contents of a file to the terminal. open and show are not standard Linux commands, and run is used for executing programs or scripts rather than displaying text.

Module 4 Module 4: Managing Files and Directories

Managing Files and Directories

Introduction

Core content I

Core content II

Core content III

Summary

Further learning

Knowledge check

Q1. Which command displays the current working directory?
  • A. ls
  • B. pwd ✓
  • C. cd
  • D. whoami

Why: The pwd command (print working directory) displays the full path of the directory you are currently in. ls lists files, cd changes directories, and whoami shows the current user.

Q2. Which command creates a new empty directory named projects?
  • A. touch projects
  • B. mkdir projects ✓
  • C. newdir projects
  • D. cp -d projects

Why: mkdir (make directory) creates a new directory. touch creates empty files, not directories, and newdir and cp -d are not standard commands for creating directories.

Q3. Which command copies a file named notes.txt to a new file named backup.txt?
  • A. mv notes.txt backup.txt
  • B. cp notes.txt backup.txt ✓
  • C. ln notes.txt backup.txt
  • D. cat notes.txt > backup.txt

Why: cp (copy) duplicates a file, leaving the original in place. mv would move or rename the file, removing the original name, and ln creates links rather than copies.

Q4. Which command deletes a directory named old_data and everything inside it?
  • A. rm old_data
  • B. rmdir old_data
  • C. rm -r old_data ✓
  • D. del -all old_data

Why: rm -r (recursive) removes a directory along with all of its contents. rm alone fails on directories, and rmdir only removes empty directories.

Q5. Which command lists all files in a directory, including hidden files that begin with a dot?
  • A. ls -a ✓
  • B. ls -l
  • C. ls -h
  • D. ls -t

Why: The -a option makes ls show all entries, including hidden files whose names start with a dot. -l gives a long listing, -h makes sizes human-readable, and -t sorts by modification time.

Module 5 Module 5: Users, Permissions, and Ownership

Users, Permissions, and Ownership

Introduction

Core content I

Core content II

Core content III

Summary

Further learning

Knowledge check

Q1. Which command displays the permissions of a file in long-listing format?
  • A. ls -l ✓
  • B. cat -p
  • C. pwd -a
  • D. chmod --show

Why: The ls -l command shows a long listing that includes file type, permission bits, owner, group, size, and modification time for each file.

Q2. What does the permission string -rwxr-x--- indicate about the group permissions?
  • A. The group can read, write, and execute
  • B. The group can read and execute but not write ✓
  • C. The group can only read
  • D. The group has no permissions

Why: Permissions are read in triplets for owner, group, and others. The group triplet r-x means read and execute are granted, but write is not.

Q3. Which command changes the owner of a file named report.txt to the user alice?
  • A. chmod alice report.txt
  • B. chown alice report.txt ✓
  • C. chgrp alice report.txt
  • D. usermod report.txt alice

Why: chown changes file ownership. chmod changes permission bits, and chgrp changes the group, not the owner.

Q4. What numeric permission value corresponds to read and write permissions (rw-) for a file?
  • A. 4
  • B. 5
  • C. 6 ✓
  • D. 7

Why: Read is 4 and write is 2, so read plus write equals 6. Execute would add 1, giving 7 for rwx.

Q5. Which user account has full administrative privileges on most Linux systems?
  • A. guest
  • B. nobody
  • C. root ✓
  • D. daemon

Why: The root account, with UID 0, has unrestricted access to the system and can perform administrative tasks.

Module 6 Module 6: Installing and Managing Software

Installing and Managing Software

Introduction

Core content I

Core content II

Core content III

Summary

Further learning

Knowledge check

Q1. Which command is used on Debian-based distributions such as Ubuntu to update the list of available packages from the repositories?
  • A. sudo apt upgrade
  • B. sudo apt update ✓
  • C. sudo apt install
  • D. sudo apt refresh

Why: sudo apt update refreshes the local package index from the configured repositories. It does not install or upgrade anything; that is done afterward with apt upgrade or apt install.

Q2. Which command installs the package named htop on a Debian or Ubuntu system?
  • A. sudo apt get htop
  • B. sudo apt-install htop
  • C. sudo apt install htop ✓
  • D. sudo install apt htop

Why: The correct syntax is sudo apt install followed by the package name. Administrative privileges via sudo are required to install system-wide software.

Q3. On Fedora or Red Hat-based systems, which package manager is commonly used to install software from the command line?
  • A. apt
  • B. pacman
  • C. dnf ✓
  • D. zypper

Why: DNF (Dandified YUM) is the default package manager on modern Fedora and Red Hat-based systems. APT is used by Debian/Ubuntu, pacman by Arch, and zypper by openSUSE.

Q4. Which command removes an installed package named nano on Ubuntu while leaving its configuration files in place?
  • A. sudo apt delete nano
  • B. sudo apt remove nano ✓
  • C. sudo apt uninstall nano
  • D. sudo apt erase nano --all

Why: sudo apt remove nano uninstalls the package but keeps its configuration files. To remove the configuration files as well, you would use sudo apt purge nano.

Q5. Which command shows detailed information about an installed or available package, such as its version, size, and description, on Debian-based systems?
  • A. apt info ✓
  • B. apt describe
  • C. apt details
  • D. apt show-all

Why: apt info <package> displays detailed metadata about a package, including its version, size, dependencies, and description. The other options are not valid apt subcommands.

Module 7 Module 7: Introduction to Shell Scripting

Introduction to Shell Scripting

Introduction

Core content I

Core content II

Core content III

Summary

Further learning

Knowledge check

Q1. What must be the first line of a shell script to specify which interpreter should run it?
  • A. #!/usr/bin/env python
  • B. #!/bin/bash ✓
  • C. //bin/bash
  • D. @shell bash

Why: The shebang line #!/bin/bash tells the system to execute the script using the Bash shell. The #! characters must be the first two bytes of the file.

Q2. Which command makes a shell script file executable by its owner?
  • A. chmod +r script.sh
  • B. chmod u+x script.sh ✓
  • C. chown x script.sh
  • D. run --executable script.sh

Why: chmod u+x adds execute permission for the user (owner). Read permission (+r) does not allow the script to run, and chown changes ownership rather than permissions.

Q3. How do you access the first argument passed to a shell script?
  • A. $0
  • B. $1 ✓
  • C. $*
  • D. $#

Why: $1 holds the first positional argument. $0 is the script name, $* expands to all arguments, and $# gives the number of arguments.

Q4. Which syntax correctly assigns a value to a variable in Bash?
  • A. name = 'Linux'
  • B. set name Linux
  • C. name='Linux' ✓
  • D. $name='Linux'

Why: Bash variable assignment requires no spaces around the equals sign: name='Linux'. Adding spaces causes Bash to interpret name as a command, and the $ prefix is only used when reading the variable.

Q5. What does the exit status value of 0 indicate after a command runs in a shell script?
  • A. The command failed
  • B. The command was not found
  • C. The command succeeded ✓
  • D. The script must be restarted

Why: By convention in Unix-like systems, an exit status of 0 means success, while any non-zero value indicates an error or failure. You can check it with $? immediately after a command.

Stay in the loop on this course.

We’ll email you when new modules or related material drops. No spam.

Built with Fragment Language. Sovereign architecture — no third-party trackers.
FragRun.mfgAFImemoryFGOwnership: B-Systems.ee