First 50 of 200 questions. Each one lists the choices, the correct answer, and an explanation. The checker at the top of this page saves progress in this browser when it is available.
Continue in the practice tool above to load more questions, 50 at a time.
Question 1The Linux Operating System and Open Source Software
Which freedom is guaranteed by the Free Software Definition but is not part of the Open Source Definition's criteria?
- The freedom to run the program for any purpose Correct answer.
- The freedom to study and modify the source code
- The freedom to redistribute copies
- The freedom to improve the program and release improvements to the public
Explanation
The Free Software Definition lists four freedoms, the first being the freedom to run the program as you wish, for any purpose. The Open Source Definition instead focuses on criteria such as free redistribution and access to source code, without stating a purpose-of-use freedom. This distinction is often cited when explaining why the two movements differ philosophically.
Question 2The Linux Operating System and Open Source Software
A program is distributed under a license that allows use, modification, and redistribution but requires that modified versions be licensed under the same terms. Which type of license is this?
- Permissive
- Public domain
- Copyleft Correct answer.
- Proprietary
Explanation
Copyleft licenses such as the GNU GPL require derivative works to carry the same license terms, keeping the software free downstream. Permissive licenses allow modified versions to be relicensed under other terms. Public domain works carry no conditions at all, and proprietary licenses restrict modification and redistribution.
Question 3The Linux Operating System and Open Source Software
Which license is a permissive license that requires preservation of copyright notices but allows the code to be used in closed-source products?
- Creative Commons Attribution-ShareAlike 4.0
- MIT License Correct answer.
- GNU Lesser General Public License version 3
- GNU General Public License version 3
Explanation
The MIT License is a short permissive license that permits reuse in proprietary software as long as the copyright notice and permission notice are retained. The GPL and LGPL impose reciprocal obligations on distribution. CC BY-SA is designed for creative works and requires share-alike distribution.
Question 4The Linux Operating System and Open Source Software
In a Linux distribution, what is the primary role of the package manager?
- Installing, upgrading, and removing software while resolving dependencies Correct answer.
- Providing a graphical desktop environment for the system
- Enforcing file permissions on user home directories
- Compiling the kernel from upstream source for each installation
Explanation
A package manager tracks installed software, retrieves packages from repositories, and resolves dependency relationships during install, upgrade, and removal. Kernel compilation, desktop environments, and permission enforcement are separate concerns handled by other tools. This dependency handling is the main reason distributions rely on package managers rather than manual tarball installs.
Question 5The Linux Operating System and Open Source Software
Which command installs the package named 'curl' on a Debian-based system using the high-level APT tool?
- apt install curl Correct answer.
- yum install curl
- zypper install curl
- pacman -S curl
Explanation
APT is the package management tool used by Debian and its derivatives such as Ubuntu, and 'apt install curl' is its standard install syntax. yum, pacman, and zypper belong to other distributions. Recognizing which tool belongs to which distribution family is a core Linux Essentials skill.
Question 6The Linux Operating System and Open Source Software
Which directory on a Linux system is conventionally used to store system-wide configuration files?
- /usr
- /var
- /etc Correct answer.
- /opt
Explanation
The Filesystem Hierarchy Standard designates /etc for host-specific system configuration files. /var holds variable data such as logs and spools, /usr holds the majority of user utilities and applications, and /opt is reserved for add-on software packages. Knowing these conventions helps locate settings quickly.
Question 7The Linux Operating System and Open Source Software
What does the Linux kernel primarily do?
- Manage hardware resources and provide services to running processes Correct answer.
- Store user documents in a hierarchical directory tree
- Provide a command-line shell for user interaction
- Compile source code into executable binaries
Explanation
The kernel is the core of the operating system; it schedules processes, manages memory, and mediates access to hardware such as disks and network devices. The shell is a separate user-space program, the filesystem is a data organization layer, and compilers are ordinary applications. This separation between kernel space and user space is fundamental.
Question 8The Linux Operating System and Open Source Software
Which statement best describes the relationship between Linux and GNU?
- Linux is a kernel developed independently and commonly combined with GNU user-space tools. Correct answer.
- GNU is a distribution of Linux maintained by Linus Torvalds.
- Linux is a GNU project and was written by the Free Software Foundation.
- Linux and GNU are two names for the same complete operating system.
Explanation
Linux began as a kernel project by Linus Torvalds, while GNU provided a large body of user-space utilities, libraries, and tools. A complete free operating system typically combines the Linux kernel with GNU components, which is why some people call it GNU/Linux. The two projects have separate origins and governance.
Question 9The Linux Operating System and Open Source Software
Which family of Linux distributions uses RPM packages and the DNF package manager?
- Slackware
- Debian
- Red Hat Correct answer.
- Arch
Explanation
Red Hat and its derivatives such as Fedora and CentOS Stream use RPM packages managed by DNF. Debian uses DEB packages with APT, Arch uses pacman, and Slackware uses its own pkgtool system. Grouping distributions by package format is useful when choosing commands.
Question 10The Linux Operating System and Open Source Software
A user wants to view the manual page for the 'tar' command. Which command displays it?
- tar -v
- man tar Correct answer.
- info tar
- tar --help
Explanation
The man command displays the manual page for a given command from the system manual pages. While 'tar --help' prints a brief usage summary, it is not the manual page. The info command reads GNU info documents, and '-v' is an option to tar itself meaning verbose.
Question 11The Linux Operating System and Open Source Software
Which of the following is an example of application software rather than system software?
- The ext4 filesystem driver
- The LibreOffice word processor Correct answer.
- The systemd init process
- The GRUB bootloader
Explanation
Application software helps the user perform tasks such as writing documents, while system software manages the machine itself. LibreOffice is an application, whereas GRUB, systemd, and filesystem drivers are all part of the system infrastructure needed to boot and run the computer. This classification is a standard part of the Linux Essentials syllabus.
Question 12The Linux Operating System and Open Source Software
What is the main purpose of the GPL requirement that distributors provide source code?
- To prevent companies from selling hardware with the software
- To require that all users register with the original author
- To ensure recipients can study and modify the software they receive Correct answer.
- To guarantee that the software is free of charge
Explanation
The GPL's source-code provision exists so that recipients retain the freedom to study and modify the program, which is impossible without source. Free software concerns freedom, not price, so charging money is permitted. Nothing in the license restricts hardware sales or requires user registration.
Question 13The Linux Operating System and Open Source Software
Which command shows the kernel version currently running on a Linux system?
- whoami
- uname -r Correct answer.
- uptime
- df -h
Explanation
The uname command reports system information, and the -r option limits output to the kernel release string. uptime reports load and time since boot, whoami prints the current user name, and df -h reports filesystem usage. These are common system-information commands in the Linux Essentials objectives.
Question 14The Linux Operating System and Open Source Software
A script starts with the line '#!/bin/bash'. What is this line called and what does it do?
- A variable assignment, which sets the shell prompt
- A redirection, which sends output to a file
- A shebang, which names the interpreter used to run the script Correct answer.
- A comment, which is ignored by the shell
Explanation
The '#!' sequence at the start of an executable script is called a shebang; the kernel uses the path that follows to select the interpreter. Comments begin with a single '#' and are ignored, variable assignments use 'name=value', and redirection uses operators such as '>'. Recognizing the shebang explains why scripts run correctly when executed directly.
Question 15The Linux Operating System and Open Source Software
Which statement about the difference between the Linux kernel and a Linux distribution is correct?
- The kernel is maintained by each distribution and is never shared.
- The kernel includes the desktop environment and office applications.
- A distribution is only the kernel compiled with different options.
- A distribution bundles the kernel with libraries, tools, and a package manager. Correct answer.
Explanation
A distribution combines the kernel with user-space software, an installer, and a package management system to form a usable system. The kernel itself contains no desktop environment or office suite. Distributions typically share upstream kernel releases while adding their own patches and configuration.
Question 16The Linux Operating System and Open Source Software
Which of the following best describes the role of the X Window System or Wayland on a Linux desktop?
- It provides the file manager used to browse directories.
- It is the package manager for graphical applications.
- It replaces the kernel's process scheduler.
- It provides the display server that manages graphical output and input devices. Correct answer.
Explanation
X11 and Wayland are display server protocols that handle drawing to the screen and routing input from devices such as keyboards and mice. Desktop environments and applications run on top of them. They do not replace kernel scheduling or manage packages.
Question 17The Linux Operating System and Open Source Software
What distinguishes freeware from free software?
- Freeware is a license approved by the Free Software Foundation.
- Freeware is distributed at no cost but may withhold source code and restrict modification. Correct answer.
- Freeware always includes the source code and permits modification.
- Free software may never be distributed at no cost.
Explanation
Freeware refers to software distributed without charge, but its license may still be proprietary and forbid modification or source access. Free software is defined by freedoms such as studying and modifying the code, regardless of price. The two terms are easily confused because both involve the word 'free'.
Question 18The Linux Operating System and Open Source Software
Which command displays the amount of free and used space on mounted filesystems in human-readable units?
- du -h
- free -h
- lsblk
- df -h Correct answer.
Explanation
df reports filesystem-level usage, and -h formats sizes in human-readable units such as gigabytes. du instead summarizes space used by files and directories, free reports memory usage, and lsblk lists block devices. Choosing between df and du is a common practical distinction.
Question 19The Linux Operating System and Open Source Software
A company modifies GPL-licensed software and distributes the modified binaries to customers. What is required?
- The company must publish the software in a public app store.
- The company must pay a royalty to the original author.
- The modified source code must be made available under the GPL. Correct answer.
- The company must stop using the software commercially.
Explanation
Under the GPL, distributing modified binaries obliges the distributor to provide the corresponding source under the same license. No royalty is owed, and commercial use is explicitly allowed. Publication channel and app store listing are not license conditions.
Question 20The Linux Operating System and Open Source Software
Which of the following is the best description of a Linux shell?
- A kernel module that manages device drivers
- A daemon that schedules cron jobs
- A filesystem that stores user data
- A program that reads commands and passes requests to the kernel Correct answer.
Explanation
A shell is a user-space command interpreter that reads input and invokes programs or built-in functions, relying on the kernel to perform privileged operations. It is not a kernel module, a scheduler, or a filesystem. Bash, zsh, and dash are common examples.
Question 21The Linux Operating System and Open Source Software
Which statement about the Open Source Definition is accurate?
- It mandates that authors transfer copyright to a foundation.
- It requires that all software be distributed at zero cost.
- It forbids the use of source code in commercial products.
- It permits derived works to be distributed under the same terms as the original license. Correct answer.
Explanation
The Open Source Definition includes the criterion that the license must allow modifications and derived works to be distributed under the same terms as the original. It does not require zero cost, does not prohibit commercial use, and does not require copyright transfer. These criteria were written to preserve openness while allowing business use.
Question 22The Linux Operating System and Open Source Software
What is the purpose of the /home directory on a typical Linux system?
- To store temporary files cleared at every boot
- To hold system log files
- To contain the bootloader configuration
- To store personal files and settings for each user account Correct answer.
Explanation
Each user normally receives a home directory under /home where personal files and configuration dotfiles are stored. System logs live under /var/log, bootloader configuration is under /boot, and temporary files are typically in /tmp. This convention supports per-user separation of data.
Question 23The Linux Operating System and Open Source Software
Which statement correctly describes the difference between a Linux distribution's community edition and an enterprise edition?
- The enterprise edition is always licensed under the GPL.
- The community edition lacks a Linux kernel and cannot boot.
- The enterprise edition typically adds vendor support and longer maintenance cycles. Correct answer.
- The community edition forbids commercial use.
Explanation
Enterprise editions generally provide commercial support, certification, and extended update lifecycles, while community editions are maintained by volunteers or the wider project. Both editions include a kernel and are usable on real hardware. Licensing and commercial-use permissions vary by project and are not determined by edition alone.
Question 24The Linux Operating System and Open Source Software
Which command displays the manual page section that lists system administration commands and privileged utilities?
- man 1 intro
- man 3 intro
- man 8 intro Correct answer.
- man 5 intro
Explanation
Manual pages are divided into numbered sections; section 8 covers system administration commands and daemons. Section 1 covers user commands, section 3 covers library functions, and section 5 covers file formats and conventions. Knowing the section numbers helps locate the right page when names collide.
Question 25The Linux Operating System and Open Source Software
What is the main advantage of using a version control system such as Git in open source projects?
- It compiles the source code into binaries for distribution.
- It automatically licenses the code under the GPL.
- It replaces the need for a package manager.
- It tracks changes and enables many contributors to collaborate on the same code. Correct answer.
Explanation
Version control records the history of changes and lets contributors work in parallel through branches and merges, which is essential for distributed open source development. It does not compile code, choose a license, or replace package management. These are separate tools in the development workflow.
Question 26The Linux Operating System and Open Source Software
Which license is used by the Linux kernel itself and requires that derivative works distributed to others be licensed under the same terms?
- MIT License
- Apache License 2.0
- GNU General Public License version 2 Correct answer.
- BSD 2-Clause License
Explanation
The Linux kernel is released under GPLv2, a copyleft license: if you distribute a modified version, the derivative must carry the same license and source must be made available. Permissive licenses such as MIT, BSD, and Apache 2.0 allow redistribution under other terms.
Question 27The Linux Operating System and Open Source Software
A package manager resolves dependencies so that installing one program automatically pulls in the libraries it needs. Which statement best describes why this behavior matters in a Linux distribution?
- It avoids the manual tracking of shared library versions that would otherwise cause broken programs Correct answer.
- It guarantees that every installed program runs with root privileges
- It converts all installed packages into statically linked binaries
- It removes the need for a package repository or index
Explanation
Dependency resolution tracks which shared libraries and versions each package requires and installs or upgrades them together, preventing missing-library failures. It has nothing to do with privileges, static linking, or eliminating repositories, which remain the source of packages.
Question 28The Linux Operating System and Open Source Software
In the Filesystem Hierarchy Standard, which directory holds variable data such as logs, spool files, and mail queues that changes while the system runs?
- /etc
- /var Correct answer.
- /opt
- /usr
Explanation
/var is designated for variable data whose contents grow or change at runtime, including /var/log and spool directories. /usr holds mostly static program data, /etc holds configuration, and /opt holds add-on software packages.
Question 29The Linux Operating System and Open Source Software
A user runs `ls -l` and sees the permission string `-rwxr-x---` on a file. What access does the group owner have?
- Read and execute, but not write Correct answer.
- No permissions at all
- Write only
- Read, write, and execute
Explanation
The permission string splits into owner (rwx), group (r-x), and others (---). The group triplet r-x means members of the file's group may read and execute but not modify the file.
Question 30The Linux Operating System and Open Source Software
Which statement best explains why the GNU Project's tools were essential to a usable Linux system in the early 1990s?
- They replaced the kernel with a microkernel architecture
- They provided a graphical desktop environment that the kernel lacked
- They defined the ext2 filesystem format used by Linux
- They supplied the compiler, shell, and core utilities needed to build and operate a complete system Correct answer.
Explanation
The kernel alone cannot be used; GNU supplied Bash, GCC, coreutils, and other userland components that made a complete operating system possible. Desktops, kernel architecture, and filesystem formats were separate efforts.
Question 31The Linux Operating System and Open Source Software
Which command displays the manual page for a program in section 5, which documents file formats such as `/etc/passwd`?
- man 5 passwd Correct answer.
- info passwd
- man passwd 5
- man -s passwd
Explanation
The manual page section number is given immediately after `man`, so `man 5 passwd` opens the file-format page. Without the section number, `man passwd` would show section 1, the command page.
Question 32The Linux Operating System and Open Source Software
Which of the following is an example of system software rather than application software?
- A web browser used to read news
- A spreadsheet program used for budgeting
- The dynamic linker that loads shared libraries at program start Correct answer.
- A photo editor used to retouch images
Explanation
System software supports the running of the machine and other programs; the dynamic linker (ld.so) loads shared libraries and is part of the base system. Spreadsheets, browsers, and photo editors are end-user applications.
Question 33The Linux Operating System and Open Source Software
Which command displays the manual page for the `tar` archiving utility?
- man tar Correct answer.
- tar --help
- type tar
- which tar
Explanation
`man tar` opens the manual page describing the command's options and behavior. `--help` prints a short usage summary, while `which` and `type` only locate the executable.
Question 34The Linux Operating System and Open Source Software
A distribution ships its kernel as a package that depends on a specific initramfs package version. What does this dependency primarily ensure?
- The kernel boots with the correct early-boot drivers and module set Correct answer.
- The kernel is recompiled with the latest compiler flags
- The root filesystem is converted to a read-only mount
- The system clock is synchronized with a network time server
Explanation
The initramfs provides the modules and tools needed to mount the real root filesystem, so it must match the kernel's module ABI. Package dependencies encode that pairing to prevent an unbootable mismatch.
Question 35The Linux Operating System and Open Source Software
Which statement accurately distinguishes a desktop environment from a window manager on Linux?
- A window manager replaces the shell, while a desktop environment replaces the boot loader
- A window manager provides the display server protocol, while a desktop environment only sets wallpapers
- A desktop environment runs in the kernel, while a window manager runs in user space
- A window manager draws decorations and controls window placement, while a desktop environment also bundles panels, settings, and applications Correct answer.
Explanation
A window manager is responsible for positioning windows and drawing frames; a desktop environment is a larger suite that includes a window manager plus panels, configuration tools, and default applications. Roles such as display server and shell belong to other components.
Question 36The Linux Operating System and Open Source Software
Which statement best describes the difference between the Linux kernel and a Linux distribution?
- The kernel is a set of user applications, while a distribution is a single binary file
- The kernel includes the package manager, while a distribution only provides the boot loader
- The kernel is the core that manages hardware and processes, while a distribution packages the kernel with userland tools, a package manager, and installers Correct answer.
- The kernel is licensed under the MIT License, while distributions are always proprietary
Explanation
The kernel handles scheduling, memory, and device drivers, but a usable system also needs libraries, utilities, a package manager, and installation tooling, which a distribution assembles. The other options misplace components or misstate licensing.
Question 37The Linux Operating System and Open Source Software
A team wants to distribute a program under a permissive license so that other companies may include it in closed-source products. Which license best fits that goal?
- GNU General Public License version 3
- MIT License Correct answer.
- GNU Affero General Public License version 3
- GNU Lesser General Public License version 3
Explanation
The MIT License permits reuse in proprietary products provided the copyright notice is retained, with no copyleft obligation. GPLv3 and AGPLv3 impose strong copyleft, and LGPLv3 still requires relinking rights for the covered library.
Question 38The Linux Operating System and Open Source Software
A script begins with the line `#!/usr/bin/env python3`. What does this line accomplish when the script is executed directly?
- It compiles the script into a bytecode file before execution
- It sets the file's execute permission automatically
- It disables the shell's history expansion for the script
- It instructs the kernel to run the script with the first python3 found on the caller's PATH Correct answer.
Explanation
A shebang line names the interpreter for the kernel; using `/usr/bin/env` makes the kernel launch env, which then locates python3 via PATH. This helps when python3 lives in different locations across systems.
Question 39The Linux Operating System and Open Source Software
Which statement best describes the role of the shell in a Linux system?
- It is the component that schedules processes onto CPU cores
- It is the daemon that manages network interfaces
- It is a command interpreter that reads commands and launches programs on behalf of the user Correct answer.
- It is the library that provides the C standard functions
Explanation
The shell is a user-space program that parses command lines, expands variables and globs, and starts programs via system calls. Scheduling belongs to the kernel, the C library is separate, and network configuration is handled by dedicated services.
Question 40The Linux Operating System and Open Source Software
A company distributes a modified version of a program licensed under the GNU General Public License version 2. What obligation does the GPLv2 place on that company when it distributes the modified binary?
- It must publish the modification as a patch only, without releasing the full source tree.
- It must make the complete corresponding source code of the modified work available under the GPLv2. Correct answer.
- It must pay a royalty to the original author before shipping any binaries.
- It must place the modified work in the public domain before redistribution.
Explanation
The GPL is a copyleft license: anyone who distributes a binary of the covered work, modified or not, must also provide the complete corresponding source code under the same license. This ensures downstream recipients keep the same freedoms to study, modify, and redistribute the software. The obligation is triggered by distribution, not by private use.
Question 41Command Line Basics
Which command displays the manual page for the `ls` command?
- doc ls
- help ls
- man ls Correct answer.
- ls --man
Explanation
The `man` command opens the system manual page for the named program, so `man ls` shows documentation for `ls`. Manual pages are organized into numbered sections and are read with a pager.
Question 42Command Line Basics
A user wants to know the absolute path of the program that would run when typing `gcc`. Which command reports this?
- locate gcc
- file gcc
- which gcc Correct answer.
- stat gcc
Explanation
`which` searches the directories listed in `PATH` and prints the full path of the first matching executable. This answers exactly which binary the shell would launch for that name.
Question 43Command Line Basics
What does the shell do when it encounters the command `pwd`?
- Changes to the home directory
- Prints the current working directory path Correct answer.
- Shows the previous command history
- Lists the contents of the current directory
Explanation
`pwd` stands for print working directory and outputs the absolute path of the directory the shell is currently in. It is a shell builtin in most shells, so it always reflects the shell's own location.
Question 44Command Line Basics
Which key sequence sends an interrupt signal to terminate the foreground process in a terminal?
- Ctrl+D
- Ctrl+L
- Ctrl+C Correct answer.
- Ctrl+Z
Explanation
Ctrl+C causes the terminal driver to send SIGINT to the foreground process group, which normally terminates the running program. It is the standard way to abort a command that is running in the foreground.
Question 45Command Line Basics
Which command shows the first ten lines of the file `notes.txt`?
- less notes.txt
- cat -n notes.txt
- head notes.txt Correct answer.
- tail notes.txt
Explanation
`head` prints the beginning of a file and defaults to ten lines. The count can be changed with `-n`, for example `head -n 20 notes.txt`.
Question 46Command Line Basics
Which command creates an empty file named `report.txt` if it does not already exist?
- touch report.txt Correct answer.
- cp report.txt
- echo report.txt
- mkdir report.txt
Explanation
`touch` updates timestamps on an existing file and creates the file if it is missing, leaving it empty. It is the conventional way to create a placeholder file.
Question 47Command Line Basics
Which command displays the absolute path of the current working directory?
- cd
- ls -d
- pwd Correct answer.
- dirname
Explanation
`pwd` prints the full path from the root to the current directory. It is useful in scripts where the working directory must be known precisely.
Question 48Command Line Basics
In a shell prompt, what does the `~` character represent when used at the start of a path?
- A hidden file in the current directory
- The previous working directory
- The current user's home directory Correct answer.
- The root directory of the filesystem
Explanation
The shell expands a leading tilde to the home directory of the current user, so `~/docs` means the docs directory inside that home directory. A tilde followed by a username expands to that user's home directory.
Question 49Command Line Basics
A user runs `cd /var/log` and then `cd ..`. Where is the user now?
- /var/log
- /
- /var Correct answer.
- /var/log/..
Explanation
The `..` entry refers to the parent directory, so from `/var/log` the parent is `/var`. The shell resolves the relative move against the current directory.
Question 50Command Line Basics
Which command copies the directory `src` and all of its contents into `backup`?
- cp -a backup src
- cp -r src backup Correct answer.
- cp src backup
- mv -r src backup
Explanation
Copying a directory requires a recursive option so that every file and subdirectory is copied. `cp -r` performs this recursion and creates `backup` if needed.