Courseiva

LPI Linux Essentials (010-160, v1.6) (010-160) (010-160) — Questions 1–75

323 questions total · 5 pages · All types, answers revealed

Page 1 of 5

Page 2
1
MCQeasy

Which command lists all files in a directory including hidden ones?

A.ls -h
B.ls -l
C.dir -hidden
D.ls -a
AnswerD

The -a flag makes ls include entries beginning with a dot, which are hidden by default, so it lists all files including hidden ones as the stem requires. Plain ls omits dotfiles entirely, and -l only changes output format, not visibility.

Why this answer

`ls -a` lists all directory entries including those beginning with a dot (hidden files such as `.bashrc`, `.git`, `.ssh`). The `-a` flag is shorthand for 'all' and overrides the default behavior of suppressing dotfiles. It is the standard way to reveal hidden content in a directory.

Exam trap

The trap is that `-h` looks like it could mean 'hidden', but in `ls` it actually means 'human-readable' — candidates confuse the two flags.

How to eliminate wrong answers

Option A is wrong because `ls -h` means 'human-readable' — it formats sizes as K/M/G but does not show hidden files. Option B is wrong because `ls -l` produces a long listing with permissions and metadata but still omits dotfiles unless combined with `-a`. Option C is wrong because `dir -hidden` is a Windows CMD construct, not a valid Linux command syntax.

2
MCQmedium

A student wants to start contributing to Linux projects. Which activity is the most effective way to start?

A.Only reading the source code without providing feedback.
B.Starting a new proprietary distribution for profit.
C.Participating in documentation, bug reporting, or small code fixes in projects.
D.Rewriting the entire Linux kernel from scratch.
AnswerC

Contributing documentation, bug reports, or small code fixes lowers the barrier to entry, letting the student build familiarity with a project's tooling, conventions, and community before tackling complex changes. This directly satisfies the stem's constraint of being the most effective starting activity for a newcomer to Linux projects.

Why this answer

Contributing to open source is a gradual process, and the most effective entry point for a new contributor is participating in documentation, bug reporting, or small code fixes. These activities let newcomers learn project conventions, communicate with maintainers, and build trust before tackling larger changes. They also provide immediate value to the project without requiring deep kernel expertise.

Exam trap

The trap here is assuming that contributing requires deep technical expertise or large code changes, when in fact documentation and bug reporting are valid and often recommended first steps.

How to eliminate wrong answers

Option A is wrong because passively reading source code without providing feedback does not contribute to the project and does not help the student engage with the community or improve the code. Option B is wrong because starting a proprietary distribution for profit contradicts the core principles of open source licensing and is not a realistic or effective way to begin contributing to existing Linux projects. Option D is wrong because rewriting the entire Linux kernel from scratch is an enormous, impractical undertaking that ignores the collaborative nature of kernel development and is not a sensible starting activity.

3
Multi-Selecteasy

Which TWO of the following are examples of Linux distributions?

Select 2 answers
A.Chrome
B.Windows
C.Debian
D.Ubuntu
E.Office
AnswersC, D

Debian is a distribution: a complete Linux system built around the Linux kernel, packaged with GNU utilities and its own package manager (dpkg/APT). It satisfies the stem's requirement for a distribution example, unlike a kernel, shell or desktop environment.

Why this answer

Debian (C) is a Linux distribution: it packages the Linux kernel with GNU userland tools, the dpkg/APT package management system, and its own release repositories. Ubuntu (D) is also a Linux distribution, derived from Debian and maintained by Canonical, using the same .deb package format with its own release cycle and repositories. The remaining options are not Linux distributions: Chrome (A) is a proprietary web browser from Google, Windows (B) is a proprietary operating system family from Microsoft built on the NT kernel rather than the Linux kernel, and Office (E) is a productivity application suite, not an operating system distribution.

Exam trap

The trap here is confusing well-known software brands (Chrome, Office) with operating system distributions — candidates who recognize the names but not their category may pick them by familiarity.

4
MCQeasy

A community college instructor is preparing course materials and wants students to be able to copy, modify, and redistribute the lab exercises freely, while ensuring that any derivative works remain under the same terms. Which type of license best fits this requirement?

A.A copyleft license such as the GNU General Public License (GPL)
B.A proprietary end-user license agreement (EULA)
C.A permissive license such as the MIT License
D.A public domain dedication with no license attached
AnswerA

The GPL is a copyleft license: it grants everyone the freedom to use, study, share, and modify the work, but requires that derivative works be distributed under the same license terms. This matches the instructor's goal of keeping all downstream versions open and shareable, preventing anyone from turning the material into a proprietary, closed product.

Why this answer

The instructor wants both broad freedoms and a guarantee that derivative works stay open, which is precisely what a copyleft license provides. The GNU General Public License permits use, study, sharing, and modification while requiring that modified versions be distributed under the same terms. Permissive, proprietary, and public-domain approaches all fail to enforce that downstream reciprocity.

Exam trap

The trap here is assuming that any 'open' license guarantees that derivative works stay open, when only copyleft licenses impose that reciprocity requirement.

5
MCQeasy

A helpdesk technician is preparing a Linux workstation for a new employee. The employee needs to know which account they are currently logged in as, without opening any graphical tools. Which single command should the technician recommend to display the current user's login name?

A.id -u
B.uname -n
C.whoami
D.who -r
AnswerC

whoami prints the effective username of the current user to standard output, which directly answers the need to know the login name from a terminal. It requires no arguments and works consistently across Linux distributions, making it the simplest and most reliable choice for a helpdesk technician to give a new employee.

Why this answer

The whoami utility is designed specifically to print the effective username associated with the current shell session. It is available by default on essentially all Linux systems and needs no options, making it ideal for a quick identity check. The other commands return a UID, a hostname, or a runlevel, none of which answer the question of which account is in use.

Exam trap

The trap here is confusing user identity output with numeric IDs or host information, assuming any command that starts with 'who' or 'id' shows the login name.

6
MCQmedium

A university research group wants to release a data-analysis tool under a license that allows companies to embed it in proprietary products without releasing their own source code. Which type of license best fits this requirement?

A.A proprietary end-user license agreement (EULA)
B.A copyleft license such as the GNU GPL
C.A permissive license such as the MIT License
D.A non-disclosure agreement (NDA)
AnswerC

Permissive licenses like the MIT License allow others to use, modify, and redistribute the code, including in proprietary products, with minimal conditions such as preserving the copyright notice. This matches the research group's requirement that companies can embed the tool without releasing their own source code.

Why this answer

Permissive licenses such as MIT grant broad reuse rights with minimal obligations, allowing proprietary embedding. Copyleft would force source disclosure, while a EULA or NDA would restrict distribution entirely, so only the permissive license satisfies the research group's goal.

Exam trap

The trap here is treating all open source licenses as equivalent and overlooking that copyleft licenses impose source-disclosure obligations that permissive licenses do not.

7
MCQmedium

A new administrator needs to grant a colleague the ability to run a specific backup script as root without sharing the root password, while keeping the action auditable and restricted to that one command. The server already has the sudo package installed and the colleague has a normal user account. Which approach best meets these requirements?

A.Create a dedicated sudoers rule using visudo that permits the colleague to execute only the backup script as root.
B.Place the colleague in the root group and give that group read and execute access to the script.
C.Change the script's file permissions to setuid root so the colleague can execute it with elevated privileges.
D.Add the colleague's account to the wheel group and rely on the default sudoers entry for that group.
AnswerA

Editing sudoers with visudo lets the administrator define a narrowly scoped rule, for example granting the colleague permission to run just the backup script as root. The visudo tool validates syntax before saving, preventing a broken sudoers file that could lock out all sudo access. Sudo also logs each invocation, satisfying the auditability requirement without sharing the root password.

Why this answer

Sudo is designed for delegating specific privileged commands with logging, and visudo safely edits the policy that defines those delegations. A targeted rule names the permitted user, the permitted command, and the target runas identity, which satisfies least privilege and auditability. Broad group membership and file-permission tricks either over-grant rights or fail to elevate privileges at all.

Exam trap

The trap here is believing that group membership or setuid on a shell script grants controlled root execution, when sudoers rules are what actually scope and log privileged commands.

8
MCQeasy

You need to prevent a standard user from accidentally deleting a critical configuration file owned by root. Which command ensures the file cannot be modified or deleted even by the root user?

A.chown root:root file.conf
B.chmod 400 file.conf
C.umask 000
D.chattr +i file.conf
AnswerD

`chattr +i` sets the immutable attribute in the ext4 inode, blocking writes, renames and unlinks at the filesystem layer — even for root, until the attribute is cleared. This satisfies the stem's constraint that the file survive deletion by root, which standard Unix permissions cannot enforce.

Why this answer

The 'chattr +i' command sets the immutable attribute on a file, which prevents any modification, deletion, renaming, or even linking — even by the root user — until the attribute is removed with 'chattr -i'. This is the only option that satisfies the requirement of protecting the file from root itself.

Exam trap

The trap is assuming root is all-powerful — candidates pick chmod 400 or chown root:root thinking root ownership or read-only permissions stop root, but only filesystem attributes like +i can override root.

How to eliminate wrong answers

Option A is wrong because changing ownership to root:root does not prevent root from modifying or deleting the file — root can always override permissions. Option B is wrong because chmod 400 makes the file read-only for the owner, but root can still write to it or delete it (deletion depends on directory permissions, and root bypasses them). Option C is wrong because umask 000 makes newly created files more permissive, the opposite of protection, and it does not affect existing files.

9
MCQmedium

A team is choosing a Linux distribution for a high-performance cluster (HPC). What is a primary consideration for this choice?

A.The distribution must not use the Linux kernel.
B.Ensuring the OS is pre-installed with popular office productivity software.
C.The availability of a user-friendly desktop environment for all cluster nodes.
D.The ability to optimize the kernel and libraries for specific hardware performance.
AnswerD

HPC workloads demand maximum throughput and low latency, so the ability to tune the kernel and libraries for specific hardware directly affects performance. This flexibility distinguishes distributions suited to clusters from general-purpose ones optimised for ease of use.

Why this answer

HPC clusters demand maximum throughput and low latency, so the ability to tune the kernel (scheduler, hugepages, NUMA, network stack) and compile libraries against specific CPU instruction sets (AVX-512, MPI implementations) is the decisive factor. Distributions like RHEL, Rocky, or specialized ones (e.g., with OFED drivers) are chosen for this tunability.

Exam trap

The trap is picking the 'user-friendly desktop' option because it sounds like a general best practice — but HPC nodes are headless and performance-tuned, so desktop environments are a liability, not a benefit.

How to eliminate wrong answers

Option A is wrong because every Linux distribution uses the Linux kernel — that is the definition of a Linux distro, so 'must not use the Linux kernel' is nonsensical. Option B is wrong because office productivity software (LibreOffice, etc.) is irrelevant on headless HPC compute nodes and would waste resources. Option C is wrong because HPC nodes are typically headless and accessed via SSH or a job scheduler (Slurm, PBS); a desktop environment adds overhead and attack surface without benefit.

10
Multi-Selectmedium

Which TWO of the following are reasons why companies often prefer Linux for server environments?

Select 2 answers
A.It requires no administration or maintenance
B.It can only be used on very expensive mainframes
C.It is not allowed to be used in the cloud
D.Superior scalability and performance for multi-user workloads
E.Strong security architecture and auditability
AnswersD, E

Linux's monolithic kernel, efficient scheduler and mature symmetric multiprocessing let a single host serve many concurrent users without licence-per-socket penalties. That architectural efficiency directly satisfies the multi-user workload constraint, unlike desktop-oriented systems tuned for single interactive sessions.

Why this answer

Option D is correct because Linux's modular kernel, efficient process scheduling, and lightweight footprint allow it to scale from small VMs to large multi-core servers, handling many concurrent users and heavy workloads with high throughput and low overhead. Option E is correct because Linux provides a strong security model built on discretionary and mandatory access controls (e.g., SELinux, AppArmor), fine-grained file permissions, and extensive logging and auditing tools such as auditd and syslog, which help organizations meet compliance and forensic requirements. Option A is incorrect because Linux servers still require patching, user management, monitoring, and configuration, so they are not maintenance-free.

Option B is incorrect because Linux runs on commodity x86-64 hardware, ARM, and embedded systems, not only expensive mainframes. Option C is incorrect because Linux is widely supported and dominant in cloud environments across AWS, Azure, and GCP.

Exam trap

The trap is that distractors use absolute or absurd claims ('no administration needed', 'only on mainframes', 'not allowed in cloud') — candidates who don't read carefully may pick a plausible-sounding but factually extreme option instead of the two genuinely technical benefits.

11
MCQmedium

A script named deploy.sh must run only when the preceding build command finishes without error. Which shell operator should you place between the two commands to achieve this?

A.||
B.|
C.&&
D.;
AnswerC

The && operator runs the right-hand command only if the left-hand command exits with status 0, which signals success. That matches the requirement exactly: deploy.sh runs only when the build succeeded. If the build fails, the shell skips deploy.sh and the overall exit status reflects the failure, which is useful in scripts.

Why this answer

Exit statuses drive shell control flow: zero means success, non-zero means failure. The && operator performs a logical AND on those statuses, executing its right operand only after a successful left operand. Chaining the build command with deploy.sh through && therefore guarantees deployment happens solely on a clean build, which is the standard idiom in shell scripts.

Exam trap

The trap here is treating the semicolon as a conditional separator, when it merely sequences commands and ignores whether the first one succeeded.

12
MCQeasy

A junior administrator needs to change the permissions of the file /home/bob/notes.txt so that the owner can read and write, the group can read, and others have no access. Which command accomplishes this?

A.chmod 660 /home/bob/notes.txt
B.chmod 640 /home/bob/notes.txt
C.chmod 644 /home/bob/notes.txt
D.chmod 604 /home/bob/notes.txt
AnswerB

The numeric mode 640 translates to rw- for the owner (6), r-- for the group (4), and --- for others (0). This precisely matches the requirement: owner read/write, group read-only, others no access. It is the standard way to set these permissions in one command.

Why this answer

The octal permissions 640 map exactly to owner read/write, group read, and others none. This is a direct application of the numeric notation, where each digit represents the sum of read (4), write (2), and execute (1) for the respective category. No other listed mode matches the specified access levels.

Exam trap

The trap here is mixing up the order of the octal digits, such as placing the others permission in the group position, which leads to an incorrect mode.

13
Multi-Selectmedium

Which TWO of the following commands can be used to view the contents of a file named 'data.txt'? (Choose two.)

Select 2 answers
A.wc data.txt
B.cat data.txt
C.less data.txt
D.grep data.txt
E.echo data.txt
AnswersB, C

The cat command concatenates and displays the entire contents of a file to standard output. It is a simple and common way to view file contents quickly, especially for short files. It directly shows the file's content without pagination or additional processing.

Why this answer

The cat and less commands both display the contents of a file. cat outputs the entire file at once, while less provides a paginated view. The other commands either search for patterns, count statistics, or print a literal string, none of which show the file's contents.

Exam trap

The trap here is assuming that any command that takes a filename as an argument will display the file's contents, such as grep or wc.

14
Multi-Selecthard

An administrator creates the directory /srv/dropbox and runs 'chmod 1777 /srv/dropbox'. Users report they can create files there, but cannot delete files created by other users. Which TWO statements correctly describe this configuration? (Choose two.)

Select 2 answers
A.The leading '1' sets the sticky bit, which restricts deletion or renaming of entries to the file's owner, the directory's owner, or root.
B.The sticky bit on a directory prevents any user other than root from writing new files into that directory.
C.The trailing '777' grants read, write, and execute to owner, group, and others, allowing any user to create files in the directory.
D.Because the directory mode includes the execute bit for others, any user may delete any file within the directory.
E.The mode 1777 is invalid syntax, and the shell silently drops the leading digit, leaving the directory at 777.
AnswersA, C

On a directory, the sticky bit restricts removal and renaming so that only the file's owner, the directory's owner, or root may delete or rename an entry. That is exactly why users can write new files yet cannot remove each other's files, matching the reported behavior in /srv/dropbox.

Why this answer

Mode 1777 on a directory combines world read/write/execute with the sticky bit. Write plus execute lets every user create entries, while the sticky bit limits deletion and renaming to the entry's owner, the directory's owner, or root. This is the classic shared drop-box pattern used by /tmp, balancing open creation with protection of existing files.

Exam trap

The trap here is believing the sticky bit blocks writing into a directory, when it actually only restricts deleting or renaming entries already inside it.

15
MCQmedium

You have a file 'notes.txt' and you want to ensure the group owner can read and write it, but nobody else can access it. Which chmod command works?

A.chmod 060 notes.txt
B.chmod 666 notes.txt
C.chmod 660 notes.txt
D.chmod 770 notes.txt
AnswerC

660 is rw-rw----.

Why this answer

chmod 660 notes.txt sets the permissions to rw-rw----, meaning the owner and group both have read and write access, while others have no permissions at all. This matches the requirement that the group owner can read and write and nobody else can access the file. The leading 6 (rw-) applies to owner, the second 6 (rw-) to group, and the 0 (---) to others.

Exam trap

The trap here is confusing the octal digit order — candidates often swap owner and group positions or forget that the third digit controls 'others', leading them to pick 060 or 770 instead of 660.

How to eliminate wrong answers

Option A (chmod 060) is wrong because it gives the owner no permissions at all (0), the group read/write (6), and others none — the owner would be locked out of their own file. Option B (chmod 666) is wrong because it grants read and write to everyone (owner, group, and others), violating the 'nobody else can access it' requirement. Option D (chmod 770) is wrong because it grants full rwx to both owner and group and no access to others, but the question only requires read and write for the group, not execute, and 770 also gives the owner execute permission unnecessarily.

16
MCQeasy

To navigate from your current directory to your home directory regardless of your current location, which command is most efficient?

A.cd ..
B.cd ~
C.cd /
D.cd /home
AnswerB

The tilde expands to the value of $HOME, so `cd ~` resolves to your home directory from any working directory in a single step. This satisfies the stem's "regardless of your current location" constraint without needing an absolute path or multiple commands.

Why this answer

The 'cd ~' command navigates directly to the current user's home directory from any location. The tilde (~) is a shell expansion that represents the home directory path, making it the most efficient and location-independent way to return home. 'cd' alone also works, but 'cd ~' is explicit and universally correct.

Exam trap

The trap is confusing the root directory (/) with the home directory (~) — candidates may pick 'cd /' thinking it goes home, but it actually goes to the filesystem root.

How to eliminate wrong answers

Option A is wrong because 'cd ..' moves up one directory level, not to the home directory, and its effect depends on the current location. Option C is wrong because 'cd /' changes to the root directory, not the home directory. Option D is wrong because 'cd /home' changes to the /home directory, which is the parent of user home directories, not the user's own home directory.

17
MCQhard

You are searching for a command that deals with 'groups' and want to see all manual pages that mention this term. Which command is most appropriate?

A.apropos groups
B.whatis groups
C.info groups
D.man -a groups
AnswerA

apropos searches the manual page name and short descriptions for a keyword, returning every page mentioning 'groups' across sections. Unlike man -k alternatives or locate, it queries the whatis database directly, satisfying the requirement to see all manual pages referencing the term.

Why this answer

The 'apropos' command searches the manual page names and short descriptions for a keyword, making it the correct tool to find all man pages that mention 'groups'. It is equivalent to 'man -k groups'. This allows the user to discover commands related to groups, such as 'groupadd', 'groupdel', etc.

Exam trap

The trap here is confusing 'apropos' with 'whatis' or 'man -a'; candidates may think 'whatis' searches broadly, but it only provides a short description for a specific command.

How to eliminate wrong answers

Option B is wrong because 'whatis groups' displays a one-line summary for the exact command 'groups' only, not all pages mentioning the term. Option C is wrong because 'info groups' opens the info documentation for the 'groups' command specifically, not a search across all manuals. Option D is wrong because 'man -a groups' displays all man pages named 'groups' in sequence, but does not search for the term across all manual pages.

18
MCQmedium

You need to determine the absolute path of the `python3` executable that would run if you typed `python3` at the prompt. Which command displays this path?

A.whereis python3
B.find / -name python3
C.locate python3
D.which python3
AnswerD

The which command searches the directories in the PATH environment variable and prints the full path of the first matching executable. This directly answers the question of which python3 would run. It is the standard tool for locating a command's executable in the current shell environment.

Why this answer

The which command resolves a command name using the PATH variable and prints the first executable found. whereis, locate, and find do not determine execution order based on PATH.

Exam trap

The trap here is assuming that whereis or locate show the executable that would run, but they do not consider PATH order.

19
MCQhard

A consultant is auditing a Linux workstation and finds that a regular user's home directory contains a file named .bashrc and a file named .profile. The user reports that environment variables set in .profile are not present in new interactive terminal windows opened from the desktop, yet aliases from .bashrc work. Which explanation best accounts for this behavior?

A.The .bashrc file overrides .profile completely, deleting any variables that .profile previously exported.
B.Environment variables can only be defined in files under /etc, so user-level files cannot affect a graphical session.
C.Graphical terminal emulators typically start non-login interactive shells, which read .bashrc rather than .profile.
D.The .profile file is only read by the display manager and never by shells, so its variables must be duplicated in .bashrc.
AnswerC

When a terminal emulator opens inside an existing graphical session, it usually launches a non-login interactive shell. Bash reads .bashrc for such shells and skips .profile, which is reserved for login shells. That is why aliases defined in .bashrc take effect while variables placed only in .profile do not appear in the new terminal windows.

Why this answer

Bash distinguishes login shells from non-login interactive shells when choosing startup files. Login shells read profile files such as .profile or .bash_profile, while non-login interactive shells read .bashrc. Terminal windows spawned inside a graphical session are typically non-login shells, so variables defined only in .profile are absent while aliases in .bashrc appear, exactly matching the report.

Exam trap

The trap here is assuming that both startup files are always read together, when the shell type determines which one is sourced.

20
MCQeasy

A user wants to display the current working directory in the shell. Which command should they use?

A.pwd
B.dir
C.cd
D.ls
AnswerA

The pwd command stands for 'print working directory' and outputs the absolute pathname of the current directory. It is a shell built-in in most shells and directly fulfills the requirement to display the current working directory.

Why this answer

The pwd command is specifically designed to print the absolute path of the current working directory. Other commands like cd change directories, ls lists contents, and dir is an alternative listing command. Only pwd directly answers the question of where the user currently is in the filesystem hierarchy.

Exam trap

The trap here is confusing commands that list directory contents with the command that reveals the current directory's path.

21
MCQmedium

What does the 'cat' command do when provided with multiple filenames as arguments?

A.It displays only the first file
B.It displays the contents of all files sequentially
C.It compares them
D.It merges them into one file
AnswerB

Concatenating multiple filenames makes `cat` read each file in the order given and write their contents to standard output without separation, so the files appear joined end-to-end. This directly satisfies the stem's requirement for handling several arguments at once, rather than processing only the first.

Why this answer

When cat is given multiple filenames, it reads each file in the order listed and writes their contents to standard output sequentially, effectively concatenating them. This is the core behavior that gives the command its name (concatenate).

Exam trap

The trap is assuming cat merges files into a new file by default; candidates forget that redirection (>) is required to actually create a merged file, and pick option D.

How to eliminate wrong answers

Option A is wrong because cat does not stop after the first file — it processes every argument in sequence. Option C is wrong because cat does not compare files; that is the job of diff or cmp. Option D is wrong because cat only merges files into one if you redirect the output (e.g., cat a b > c); by itself it just prints to stdout and does not create or modify a file.

22
MCQmedium

A junior administrator runs `chmod 4755 /usr/local/bin/maintenance.sh` on a shared production server. Later, a standard user executes the script and it performs actions that the user would not normally be permitted to do. Which statement explains this behavior?

A.The script is automatically executed with the privileges of the user who last modified it.
B.The script runs with the effective user ID of the file owner, which is root in this case.
C.The script inherits the group ownership of the directory in which it resides, granting elevated access.
D.The fourth digit enables the sticky bit, which allows any user to override file ownership checks.
AnswerB

The leading 4 in 4755 sets the SUID bit on the executable. When a standard user runs it, the process's effective UID becomes that of the file's owner, not the invoking user. Since the owner is root, the script gains root's privileges for the duration of its execution, which is exactly why the actions succeeded.

Why this answer

A leading 4 in a numeric mode sets the SUID bit on an executable. When run, the process takes on the effective user ID of the file's owner rather than the caller's. With root as owner, the script runs with root privileges, which explains why a standard user could perform restricted actions.

Exam trap

The trap here is confusing the leading 4 with the sticky bit or with SGID, when it specifically sets SUID on the file.

23
MCQmedium

You want to find lines in 'file.txt' that do NOT contain the word 'success'. Which command works?

A.grep -n 'success' file.txt
B.grep -v 'success' file.txt
C.grep -c 'success' file.txt
D.grep -i 'success' file.txt
AnswerB

The -v flag inverts grep's matching logic, printing only lines that fail to match the pattern. Applied to 'success' in file.txt, it returns every line not containing that word, precisely satisfying the requirement to exclude matching lines rather than select them.

Why this answer

The `-v` option inverts the match, so `grep -v 'success' file.txt` prints every line that does NOT contain the pattern 'success'. This is the standard way to filter out matching lines in Linux/Unix. The other options either show matching lines, count them, or ignore case, but none exclude them.

Exam trap

The trap here is confusing grep's output modes: candidates often think `-c` shows lines (it only counts) or that `-i` excludes case variants (it includes them), while `-v` is the only option that inverts the match to show non-matching lines.

How to eliminate wrong answers

Option A is wrong because `grep -n 'success' file.txt` prints lines that DO contain 'success' and prefixes them with line numbers; it does not exclude them. Option C is wrong because `grep -c 'success' file.txt` only counts the number of matching lines and outputs a single number, not the lines themselves. Option D is wrong because `grep -i 'success' file.txt` performs a case-insensitive search for 'success', still showing matching lines (e.g., 'Success', 'SUCCESS') rather than excluding them.

24
Multi-Selectmedium

Which THREE commands can be used to check user information or current session identity?

Select 3 answers
A.userdel
B.chage
C.whoami
D.id
E.groups
AnswersC, D, E

`whoami` prints the effective username tied to the current process's security context, resolving it from the token rather than the login session. This satisfies the stem's requirement to check current session identity, and works non-interactively in scripts where `who` would instead list all logged-in users.

Why this answer

Option C, whoami, is correct because it prints the effective username of the current session, directly answering the question of current session identity. Option D, id, is correct because it displays the current user's UID, GID, and all supplementary group memberships, giving a complete picture of the session's identity. Option E, groups, is correct because it lists the groups the current user (or a specified user) belongs to, which is user information relevant to session identity.

Option A, userdel, is not correct because it is an administrative command that deletes a user account and does not report identity. Option B, chage, is not correct because it manages password aging information for a user account rather than reporting current session identity.

Exam trap

The trap here is confusing account management commands (userdel, chage) with commands that query user identity, as both involve user-related operations but serve different purposes.

25
MCQeasy

What is the primary role of a 'Linux Distribution'?

A.To provide technical support for proprietary hardware manufacturers.
B.To package the kernel with user-space tools and manage software updates.
C.To develop the Linux kernel from scratch.
D.To force all users to use a single command line interface.
AnswerB

A Linux distribution bundles the kernel with user-space utilities, libraries and package management, producing a usable operating system. This satisfies the stem's focus on the distribution's primary role: integrating components and delivering software updates, rather than developing the kernel itself, which upstream kernel developers handle separately.

Why this answer

A Linux distribution bundles the upstream Linux kernel with user-space utilities (GNU coreutils, init system, package manager, libraries) and provides a mechanism for installing and updating software. It is the packaging and integration layer that makes the raw kernel usable, not a kernel development project.

Exam trap

The trap is confusing the distribution with the kernel itself — candidates may pick 'develop the kernel' because distros ship kernels, but distros integrate and package, they do not author the kernel.

How to eliminate wrong answers

Option A is wrong because distributions do not exist to provide vendor hardware support — that is the role of hardware manufacturers and kernel driver maintainers; distros merely ship the resulting drivers. Option C is wrong because the Linux kernel is developed upstream by Linus Torvalds and the kernel community; distributions consume kernel releases, they do not develop the kernel from scratch. Option D is wrong because distributions do not force a single CLI — most ship graphical environments (GNOME, KDE) alongside the shell, and users choose their interface freely.

26
Multi-Selecthard

Which THREE of the following commands are used for file manipulation?

Select 3 answers
A.cp
B.man
C.pwd
D.rm
E.mv
AnswersA, D, E

The `cp` command copies files and directories, directly satisfying the file manipulation requirement. Unlike viewing commands such as `cat` or `less`, which only read content, `cp` creates new filesystem entries, altering stored data. This write operation places it firmly among the manipulation utilities the question seeks.

Why this answer

The three commands used for file manipulation are cp, rm, and mv. Option A, cp, is correct because it copies files and directories from a source to a destination, creating new file content at the target path. Option D, rm, is correct because it removes (deletes) files and, with options like -r, directories from the filesystem.

Option E, mv, is correct because it moves or renames files and directories, changing their location or name within the filesystem. The unmarked options do not belong: man (B) displays manual pages for commands, and pwd (C) prints the current working directory path, so neither performs file manipulation.

Exam trap

The trap is that candidates see familiar commands like pwd and man and assume any command typed at the shell counts as 'file manipulation' — the exam expects you to distinguish commands that modify files from those that merely report or document.

27
MCQeasy

A community college instructor is preparing a course on Linux and wants students to understand how the GNU Project's licensing framework protects users' freedoms. A student asks which license was created by the GNU Project to guarantee that derived works remain free. Which license should the instructor identify?

A.GNU General Public License (GPL)
B.Apache License 2.0
C.BSD 3-Clause License
D.MIT License
AnswerA

The GNU GPL was authored by the GNU Project specifically to enforce copyleft: anyone distributing a modified version must release the source under the same terms. This matches the instructor's point about protecting users' freedoms and keeping derived works free, making it the license the GNU Project created for that purpose.

Why this answer

The GNU Project created the GNU General Public License to implement copyleft, ensuring that software and its derivatives remain free for all users. Permissive licenses such as Apache, MIT, and BSD allow derivatives to be relicensed under more restrictive terms, so they do not provide the guarantee the instructor is teaching.

Exam trap

The trap here is assuming that any widely used open source license, such as MIT or Apache, was created by the GNU Project or enforces copyleft.

28
Multi-Selectmedium

A new administrator is learning how Linux organizes its filesystem. She must identify which of the following statements about the Filesystem Hierarchy Standard (FHS) are correct. (Choose two.)

Select 2 answers
A./etc holds system-wide configuration files, and /var holds variable data such as logs and spool files.
B./bin is reserved exclusively for kernel modules that load at boot time.
C./usr must contain only user-created documents and personal media files.
D./tmp is guaranteed to persist across reboots and should be used for permanent application data.
E./home is intended for user home directories, while /root is the home directory for the root user.
AnswersA, E

This is correct: /etc is reserved for host-specific configuration, and /var contains data that changes during normal operation, including logs, mail queues, and spool directories. Recognizing this split helps administrators locate configuration versus runtime data, and it aligns with the FHS definitions tested by LPI.

Why this answer

The FHS defines /etc for configuration and /var for variable runtime data, and it places user homes under /home while reserving /root for the superuser. Statements about /bin holding kernel modules, /tmp being persistent, and /usr storing personal documents contradict the standard layout. Understanding these directory roles is essential for locating configuration, logs, and user data correctly.

Exam trap

The trap here is assuming familiar directory names like /bin and /tmp hold content that the FHS actually places elsewhere.

29
MCQhard

You need to see the last 20 lines of a file named 'access.log'. Which command is the most appropriate?

A.cat -n 20 access.log
B.less -n 20 access.log
C.head -n 20 access.log
D.tail -n 20 access.log
AnswerD

`tail -n 20 access.log` reads only the final 20 lines, satisfying the stem's requirement to view the last 20 lines without loading the whole file. Unlike `head`, which prints from the start, `tail` counts backwards from the end, making it the precise tool for this task.

Why this answer

tail -n 20 access.log prints the last 20 lines of the file, which is exactly what is needed to inspect recent log entries. The -n option specifies the number of lines, and tail reads from the end of the file, making it ideal for logs where the newest events are appended at the bottom.

Exam trap

The trap is mixing up head and tail — candidates under time pressure may read 'last 20 lines' and still select head because both commands share the -n syntax, so always confirm direction (first vs. last).

How to eliminate wrong answers

Option A (cat -n 20 access.log) is wrong because cat's -n option numbers all output lines; '20' would be interpreted as a filename, producing an error, and cat would still print the entire file. Option B (less -n 20 access.log) is wrong because less's -n option suppresses line numbers rather than limiting output, and less is a pager that shows the file from the beginning. Option C (head -n 20 access.log) is wrong because head prints the first 20 lines, the opposite of what is required for viewing the most recent log entries.

30
MCQeasy

A Linux administrator needs to determine if their distribution is based on Debian or RHEL. Which command or path is most indicative of this family?

A.Checking for the presence of the 'systemd' binary.
B.Checking for the existence of /etc/debian_version.
C.Running the 'uname -a' command.
D.Checking for the existence of /etc/sysconfig.
AnswerB

The presence of /etc/debian_version confirms a Debian-derived distribution, since Debian and its descendants write this file during installation. RHEL-family systems instead ship /etc/redhat-release, so checking this path directly distinguishes the two families without relying on package manager commands that may be absent.

Why this answer

The file /etc/debian_version is a Debian-specific artifact that exists on Debian and its derivatives (Ubuntu, Mint, Kali, etc.) but is absent on RHEL-family systems. Its presence is a reliable, low-level indicator of the Debian package management lineage. RHEL-family systems instead use /etc/redhat-release and /etc/system-release, making /etc/debian_version the clearest single-path discriminator between the two families.

Exam trap

The trap here is assuming that a widely-shared component like systemd or the kernel version (uname) can distinguish distro families, when in fact both Debian and RHEL have adopted systemd and share the same Linux kernel — only distro-specific release files like /etc/debian_version reveal the true lineage.

How to eliminate wrong answers

Option A is wrong because systemd is used by both Debian-family (since Debian 8/Jessie) and RHEL-family (since RHEL 7) distributions, so its presence tells you nothing about the distro family. Option C is wrong because 'uname -a' reports kernel-level information (kernel name, release, version, architecture, hostname) which is essentially identical across distro families since they all use the Linux kernel. Option D is wrong because /etc/sysconfig exists on RHEL-family systems (and is also present on some SUSE systems), but its absence alone does not confirm Debian lineage — the question asks for the most indicative path, and /etc/debian_version is the direct, positive indicator of Debian heritage.

31
MCQmedium

What is the result of 'echo $USER'?

A.It prints the current username.
B.It prints the path to the user home.
C.It returns an error.
D.It prints '$USER'.
AnswerA

The shell expands $USER to the value of the USER environment variable, which holds the login name of the account running the session. echo then writes that string to standard output, printing the current username.

Why this answer

$USER is a shell environment variable that holds the login name of the current user, so 'echo $USER' prints that username (e.g., 'alice'). The shell expands the variable before passing the argument to echo, so the literal string '$USER' is never printed.

Exam trap

The trap is confusing $USER with $HOME or thinking the shell prints the literal '$USER' — candidates must remember that unquoted variables are expanded by the shell before the command runs.

How to eliminate wrong answers

Option B is wrong because the home directory path is stored in $HOME, not $USER — a common confusion between the two variables. Option C is wrong because $USER is set by login shells (via PAM or /etc/profile) and echo of an unset variable would simply print an empty line, not an error; in practice $USER is always defined for interactive sessions. Option D is wrong because single quotes prevent expansion, but the question uses no quotes — the shell expands $USER, so the literal '$USER' is not printed.

32
MCQeasy

A developer is exploring a new project directory and wants to see the names of all files and directories, including those that start with a dot (hidden files). Which command should be used?

A.ls -h
B.ls -a
C.ls -l
D.ls -R
AnswerB

The -a option tells ls to list all entries, including those whose names begin with a dot (hidden files). By default, ls omits such files. Using ls -a in the project directory will display every file and directory, meeting the developer's need to see hidden items as well as regular ones.

Why this answer

The ls command lists directory contents, but by default it hides files whose names begin with a dot. The -a option overrides this and shows all entries, including hidden files. The other options modify output format or recursion but do not reveal hidden files, so they do not meet the stated requirement.

Exam trap

The trap here is assuming that any ls option will show hidden files, when only -a (or -A) includes dotfiles.

33
Multi-Selecteasy

Which TWO of the following are examples of common Linux filesystems?

Select 2 answers
A.FAT32
B.ext4
C.HFS
D.NTFS
E.XFS
AnswersB, E

Ext4 is a native Linux filesystem, satisfying the stem's requirement for common Linux filesystems. It serves as the default on many distributions, including Debian and Ubuntu, and supports journaling, extents and volumes up to one exbibyte. This makes it a canonical, widely deployed example rather than a cross-platform or non-Linux filesystem.

Why this answer

ext4 (B) is correct because it is the default, journaling, native Linux filesystem used by most Linux distributions, supporting extents, large volumes, and backward compatibility with ext2/ext3. XFS (E) is also correct because it is a high-performance 64-bit journaling filesystem developed for Linux (originally by SGI), commonly used on RHEL/CentOS for large files and parallel I/O. FAT32 (A) is not a Linux-native filesystem; it is a Microsoft/Windows-originated filesystem that Linux merely supports via drivers like vfat.

HFS (C) is Apple's legacy Mac OS filesystem, not a common Linux filesystem. NTFS (D) is Microsoft's Windows filesystem, supported by Linux through ntfs-3g but not a common Linux filesystem itself.

Exam trap

The trap here is confusing filesystems that Linux can mount (like FAT32, NTFS, HFS) with those that are native to Linux, leading candidates to select cross-platform options instead of the correct Linux-native ones.

34
Multi-Selectmedium

Which THREE of the following are common types of open source software licenses?

Select 3 answers
A.GPL (General Public License)
B.Secret Source License
C.MIT License
D.Apache License
E.EULA (End User License Agreement)
AnswersA, C, D

The most common strong copyleft license.

Why this answer

The GPL (General Public License) is a classic open source license, using copyleft terms to guarantee users the freedom to run, study, share, and modify the software, which is why option A is correct. The MIT License is a permissive open source license that allows reuse with minimal restrictions, requiring only preservation of the copyright and license notice, so option C is correct. The Apache License is also a permissive open source license, notably granting an express patent license and requiring preservation of notices, making option D correct.

Option B is not a recognized open source license type; 'secret source' is not a standard licensing category and contradicts open source principles. Option E, the EULA, is a proprietary end-user contract that typically restricts copying, modification, and redistribution, so it is not an open source license.

Exam trap

The trap is including EULA as an open source license — candidates may think any software license qualifies, but EULAs are proprietary and restrict freedoms, not grant them.

35
MCQmedium

A small design studio wants to release an internal font-editing tool as open source so other studios can improve it, but they also want any modified versions distributed publicly to remain open. Which licensing approach best matches this requirement while remaining a recognized free software license?

A.Release the tool under the Apache License 2.0
B.Release the tool under the MIT License
C.Release the tool under the GNU General Public License version 3 (GPLv3)
D.Release the tool under a custom 'All Rights Reserved' notice with public source downloads
AnswerC

The GPLv3 is a copyleft license: anyone who distributes a modified version must release the corresponding source under the same terms. This directly satisfies the studio's demand that public derivatives stay open. It is also recognized by both the Free Software Foundation and the Open Source Initiative, so the tool qualifies as free and open source software while preserving the reciprocity the studio wants.

Why this answer

The studio wants derivative works that are publicly distributed to stay open, which is precisely what a copyleft license enforces. The GPLv3 requires anyone distributing modified versions to provide the source under the same license, preserving reciprocity. Permissive licenses such as MIT and Apache 2.0 allow closed derivatives, and a custom all-rights-reserved notice grants no modification rights, so only the GPLv3 satisfies the requirement while remaining a recognized free software license.

Exam trap

The trap here is treating all open source licenses as equivalent, when the key distinction is whether the license enforces copyleft reciprocity or permits closed derivatives.

36
Multi-Selecteasy

Which TWO of the following are popular package management tools used in Linux?

Select 2 answers
A.APT
B.DiskManager
C.KernelUpdater
D.ServiceManager
E.DNF
AnswersA, E

APT (Advanced Package Tool) is Debian's native package manager, resolving dependencies and fetching .deb packages from configured repositories. It satisfies the question's requirement for a popular Linux package management tool, alongside DNF on RPM-based distributions.

Why this answer

APT (Advanced Package Tool) is correct because it is the standard package management tool on Debian-based distributions such as Debian, Ubuntu, and Linux Mint, handling .deb packages and resolving dependencies via repositories. DNF (Dandified YUM) is correct because it is the default package manager on Fedora, RHEL 8+, and related RPM-based distributions, replacing YUM and resolving dependencies through RPM repositories. The other options do not belong: DiskManager is not a Linux package manager (disk partitioning is handled by tools like fdisk, parted, or gparted), KernelUpdater is not a standard package management tool (kernel updates are delivered through APT, DNF, or similar), and ServiceManager is not a package manager (services are managed by systemd's systemctl or SysV init scripts).

Exam trap

The trap is the plausible-sounding fake names — DiskManager, KernelUpdater, and ServiceManager sound like real system tools, so candidates who don't recognize the actual distro-specific package managers may be lured by familiar-sounding but nonexistent options.

37
MCQeasy

A system administrator needs to identify the numerical ID (UID) of the user 'jdoe'. Which file should be checked?

A./etc/shadow
B./etc/profile
C./etc/passwd
D./etc/group
AnswerC

The /etc/passwd file stores one colon-separated record per account, and its third field holds the numeric UID. Reading it directly reveals jdoe's UID, satisfying the requirement to identify the numerical identifier rather than a username or group ID.

Why this answer

The /etc/passwd file stores one line per user account, with colon-separated fields where the third field is the numerical UID. Checking this file (or running getent passwd jdoe) reveals the UID assigned to 'jdoe'. It is world-readable, unlike /etc/shadow, so it is the standard place to look up account identifiers.

Exam trap

The trap is confusing /etc/passwd with /etc/shadow — candidates remember that shadow holds 'password info' and wrongly assume it also holds the UID, but the UID lives in the world-readable passwd file.

How to eliminate wrong answers

Option A (/etc/shadow) is wrong because it stores hashed passwords and password-aging data, not UIDs, and is readable only by root. Option B (/etc/profile) is wrong because it is a shell initialization script that sets environment variables and PATH for login shells, containing no user account data. Option D (/etc/group) is wrong because it maps group names to GIDs and lists group members, not the UID of individual users.

38
MCQmedium

You want to delete a file but you are worried about accidentally deleting the wrong one. Which flag should you use with 'rm' for confirmation?

A.rm -f
B.rm -v
C.rm -i
D.rm -R
AnswerC

The -i flag makes rm prompt interactively before removing each file, letting you confirm or decline deletion. This satisfies the requirement to avoid accidentally deleting the wrong file, since removal only proceeds after explicit confirmation.

Why this answer

The -i flag on rm stands for 'interactive' and prompts the user for confirmation before deleting each file. This is exactly the safeguard needed when you want to avoid accidentally removing the wrong file.

Exam trap

The trap is conflating -f (force, no prompt) with -i (interactive, prompt) — candidates who assume 'f' means 'friendly' or 'safe' pick the wrong flag.

How to eliminate wrong answers

Option A is wrong because rm -f forces deletion without any prompt, which is the opposite of what is needed for safety. Option B is wrong because rm -v enables verbose output, showing what was deleted, but it does not ask for confirmation. Option D is wrong because rm -R (or -r) enables recursive deletion of directories and their contents; it does not add a confirmation prompt and is actually more dangerous.

39
Multi-Selecthard

Which TWO of the following are valid ways to search for files?

Select 2 answers
A.man
B.cat
C.find
D.grep
E.locate
AnswersC, E

The find command traverses directory trees recursively, locating files by name, type, size, permissions or timestamps. It is a valid command-line search method, satisfying the question's requirement for legitimate ways to search for files on a Linux system.

Why this answer

Option C, find, is correct because it is the standard Linux/Unix command for searching the filesystem for files by name, path, size, permissions, timestamps, and other attributes (e.g., find / -name "*.conf"). Option E, locate, is correct because it searches a prebuilt filename database (typically /var/lib/mlocate/mlocate.db, updated by updatedb) and returns matching file paths quickly. Option A, man, is not a file-search tool; it displays manual pages for commands.

Option B, cat, is used to concatenate and display file contents, not to search for files. Option D, grep, searches for text patterns inside file contents rather than locating files themselves.

Exam trap

The trap is confusing filename search with content search — candidates often pick `grep` because it 'searches,' but grep searches inside files, not for files themselves.

40
MCQmedium

An auditor asks how to confirm which groups the currently logged-in user belongs to, including supplementary groups, from a shell prompt. Which single command displays this information for the invoking user?

A.newgrp
B.groupmod
C.groups
D.chgrp
AnswerC

Invoked without arguments, the groups command prints the group names associated with the current effective user, covering both the primary group and any supplementary groups. That directly answers the auditor's request to verify the logged-in user's group memberships from a shell prompt in one step.

Why this answer

The groups command, run without arguments, reports the group set for the current effective user, including the primary group and supplementary groups. That makes it the correct single command for confirming the invoking user's memberships during an audit, without needing to inspect /etc/group manually.

Exam trap

The trap here is reaching for groupmod, which edits group definitions, instead of groups, which simply reports the caller's memberships.

41
MCQhard

A user needs to view the first few lines of a large log file to confirm its format before processing it. Which command displays the beginning of the file by default?

A.head /var/log/syslog
B.tail /var/log/syslog
C.less /var/log/syslog
D.cat /var/log/syslog
AnswerA

'head' displays the first ten lines of a file by default, which is exactly what is needed to view the beginning and confirm the format. It is the standard counterpart to 'tail' and can be adjusted with '-n' to show a different number of lines. This directly meets the requirement.

Why this answer

The 'head' command prints the first ten lines of a file by default, making it ideal for quickly inspecting the start of a large log to verify its format. The 'tail' command shows the end, 'cat' dumps the whole file, and 'less' opens an interactive pager, so none of them matches the simple default behavior requested.

Exam trap

The trap here is confusing 'head' and 'tail', which show opposite ends of a file despite having similar names.

42
MCQmedium

A user wants to redirect the standard error of a command to a file named errors.txt while still displaying standard output on the terminal. Which redirection is correct?

A.command &> errors.txt
B.command 2> errors.txt
C.command 2>&1 > errors.txt
D.command > errors.txt
AnswerB

The notation 2> redirects file descriptor 2, which is standard error, to the specified file. Standard output (file descriptor 1) remains connected to the terminal, so normal output is still displayed. This exactly matches the requirement.

Why this answer

To redirect only standard error, use 2> filename. This leaves standard output untouched on the terminal. The > operator redirects only standard output, 2>&1 > file redirects error to the terminal and output to file, and &> redirects both streams to the file.

Exam trap

The trap here is confusing the order of redirections in 2>&1 > file, which does not achieve the same as 2> file.

43
MCQmedium

A help-desk analyst needs to see which processes are consuming the most CPU and memory in real time, and must be able to sort and kill a runaway process interactively. Which utility best fits this requirement?

A.free -h
B.top
C.ps aux
D.uptime
AnswerB

top provides a continuously refreshing, interactive view of running processes with CPU and memory usage, and it accepts keystrokes such as P to sort by CPU, M to sort by memory, and k to send a signal to a process. That combination of live monitoring and in-session process termination matches the analyst's stated needs.

Why this answer

top is the classic interactive process viewer on Linux: it refreshes on an interval and lets the operator sort by CPU or memory and send signals to processes without leaving the utility. That single-tool workflow of live observation plus immediate corrective action is what the analyst needs.

Exam trap

The trap here is assuming a static snapshot tool like ps aux provides continuous monitoring just because it lists the same process fields.

44
MCQmedium

A support technician must read a very large log file, /var/log/messages, and only wants the portion that begins with the line containing the timestamp 'Mar 14 09:15' and continues to the end of the file. Which command should the technician run?

A.grep -c 'Mar 14 09:15' /var/log/messages
B.sed -n '/Mar 14 09:15/,$p' /var/log/messages
C.tail -n 50 /var/log/messages
D.head -n 50 /var/log/messages
AnswerB

The sed range address starts at the first line matching the timestamp pattern and the $ address extends the range to the last line of the file. The -n flag suppresses automatic printing, and the p command prints only the selected range, which is exactly the requested section.

Why this answer

Stream editors such as sed can select a range defined by a pattern and a terminating address. Using the timestamp as the starting address and the end-of-file symbol as the closing address prints precisely the tail portion that begins at the matching line, which is what the technician needs when the log is too large to page through manually.

Exam trap

The trap here is reaching for tail with a line count when the real requirement is to start at a pattern match rather than at a fixed number of lines from the end.

45
MCQmedium

A user needs to change their own password on a Linux system. Which command should they use?

A.usermod -p
B.shadow
C.chage
D.passwd
AnswerD

The passwd command allows a user to change their own password. When run without arguments, it prompts for the current password and then the new password. It is the standard utility for password changes and is available to all users, not just root.

Why this answer

The passwd command is the correct tool for users to change their own passwords. It handles the secure update of the password hash in /etc/shadow. Other commands like usermod and chage are administrative tools for managing accounts and policies, not for self-service password changes.

Exam trap

The trap here is thinking that any command related to user accounts can change passwords, but only passwd is designed for users to change their own passwords.

46
MCQeasy

A technician must create a new local account named 'intern' on a Linux workstation and wants the command to also create the home directory and skeleton files automatically. Which command accomplishes this with a single invocation on a typical distribution?

A.useradd -m intern
B.passwd -m intern
C.usermod -m intern
D.groupadd -m intern
AnswerA

The useradd command creates the account, and the -m flag instructs it to create the home directory and populate it from /etc/skel. On most distributions this is the direct, single-command way to add a user with a usable home directory, satisfying the requirement without a separate mkdir or copy step.

Why this answer

The useradd utility provisions a new account entry in /etc/passwd and /etc/shadow, and the -m option additionally creates the home directory, copying default files from /etc/skel. It is the standard single-step method for adding a local user with an immediately usable environment, which is precisely what the scenario requires.

Exam trap

The trap here is confusing usermod, which alters existing accounts, with useradd, which creates new ones.

47
MCQmedium

A small design studio wants to install a Linux distribution on its workstations. The staff have no Linux experience, and the studio wants a distribution that includes a graphical installer, a curated set of desktop applications, and a community forum where beginners can ask questions. Which type of distribution best fits this scenario?

A.A source-based distribution such as Gentoo, because compiling software from source gives the studio full control over optimization flags.
B.An enterprise distribution such as Red Hat Enterprise Linux, because it is certified for business use and includes commercial support contracts.
C.A minimal server distribution such as Debian netinst, because a minimal install reduces the attack surface and lets the studio add only what it needs.
D.A beginner-friendly distribution such as Linux Mint, because it offers a graphical installer, preinstalled desktop applications, and active community support.
AnswerD

Linux Mint is designed for users migrating from other operating systems. It ships with a graphical installer, a curated set of desktop applications such as a browser, office suite, and media tools, and has an active community forum where newcomers can get help. This directly satisfies every requirement in the scenario.

Why this answer

The studio needs a distribution that is easy to install, comes with a usable desktop and applications out of the box, and has beginner-oriented community support. A beginner-friendly distribution such as Linux Mint is built precisely for this audience, bundling a graphical installer and desktop apps while maintaining active forums for new users. The other distribution types target advanced users, servers, or enterprise environments.

Exam trap

The trap here is assuming that any well-known distribution will work for beginners, when server-focused or source-based distributions require expertise the studio does not have.

48
MCQeasy

A new user wants to display the contents of the file /etc/hostname on the terminal. Which command will print the file's contents to standard output?

A.file /etc/hostname
B.touch /etc/hostname
C.cat /etc/hostname
D.chmod /etc/hostname
AnswerC

The cat command concatenates and writes file contents to standard output, so running it on /etc/hostname prints the hostname to the terminal. This is the simplest and most direct way to display a small text file's contents as requested.

Why this answer

Displaying a text file's contents on the terminal is the primary purpose of cat, which reads the file and writes it to standard output. The touch command manages timestamps and empty files, chmod alters permissions, and file identifies a file's type. Only cat outputs the actual data contained in /etc/hostname.

Exam trap

The trap here is that file sounds like it should show file contents, but it only reports the file type, not the data inside.

49
MCQmedium

A small business owner wants to replace a proprietary office suite with LibreOffice on Linux workstations. A consultant explains that LibreOffice is distributed under the Mozilla Public License 2.0. Which characteristic of this license matters most for the business owner's decision to adopt and modify the software internally?

A.The MPL 2.0 requires that any file-level modifications be made available under the MPL when distributed, but it permits combining MPL files with proprietary files in a larger work.
B.The MPL 2.0 is a strong copyleft license identical in effect to the GNU GPL, so any internal proprietary integration would be a license violation.
C.The MPL 2.0 grants no patent rights, so the business would risk patent litigation by deploying LibreOffice in its operations.
D.The MPL 2.0 prohibits internal modification of the source code, allowing only unmodified redistribution of the original package.
AnswerA

The MPL 2.0 is a file-level copyleft license: modified MPL-covered files must remain under the MPL when redistributed, yet larger works may include proprietary files alongside them. This gives the business flexibility to integrate LibreOffice components with internal proprietary tools without forcing the whole product open, which directly supports the adoption decision.

Why this answer

The Mozilla Public License 2.0 balances copyleft and permissiveness by applying obligations per file. Modified MPL files must remain MPL-licensed when distributed, but they can be combined with proprietary files in a larger work. For a business integrating LibreOffice with internal tools, this file-level approach avoids forcing disclosure of unrelated proprietary code, making adoption and customization practical.

Exam trap

The trap here is lumping all copyleft licenses together; the MPL's file-level scope is far less restrictive than the GPL's whole-work approach.

50
MCQhard

A user wants to create a symbolic link named latest.conf in the current directory that points to /etc/app/versions/v2.conf. Which command creates this link correctly?

A.ln -s latest.conf /etc/app/versions/v2.conf
B.ln -s /etc/app/versions/v2.conf latest.conf
C.ln /etc/app/versions/v2.conf latest.conf
D.ln -h /etc/app/versions/v2.conf latest.conf
AnswerB

The ln command creates links, and -s selects a symbolic link instead of a hard link. The first pathname is the target and the second is the new link name, so this invocation creates latest.conf in the current directory pointing at the absolute path /etc/app/versions/v2.conf, which remains valid from any working directory.

Why this answer

Creating a symbolic link requires the -s option, and the argument order is target first, link name second. Using the absolute target path makes the link resolve correctly regardless of the directory from which it is later accessed. Omitting -s yields a hard link, reversing the arguments misplaces the link, and -h does not select symbolic link creation.

Exam trap

The trap here is reversing the target and link-name arguments or forgetting -s, which silently produces a hard link instead of a symbolic one.

51
MCQmedium

You need to determine the UUID of a partition to add it to /etc/fstab. Which command should you use?

A.ls -l
B.find
C.blkid
D.mount
AnswerC

`blkid` reads the filesystem superblock metadata directly from block devices and prints each partition's UUID, which is exactly the identifier `/etc/fstab` requires. Unlike `lsblk`, which reports device topology and mountpoints but not UUIDs by default, `blkid` satisfies the stem's constraint of retrieving the UUID for fstab entries.

Why this answer

The blkid command queries block device attributes including UUID, LABEL, and TYPE, which is exactly what is needed to reference a partition in /etc/fstab by UUID. Running blkid /dev/sda1 returns the UUID= value that can be pasted into fstab. This is the standard Linux tool for retrieving filesystem UUIDs.

Exam trap

The trap is confusing tools that show mounted filesystems (mount) or list devices (ls -l) with the specific utility that reads filesystem UUIDs from block devices (blkid).

How to eliminate wrong answers

Option A (ls -l) is wrong because it lists directory contents and inode metadata, not filesystem UUIDs. Option B (find) is wrong because it searches for files by name/attributes in a directory tree, not block device identifiers. Option D (mount) is wrong because it displays currently mounted filesystems and mount options, but does not reliably show the UUID of an unmounted partition.

52
MCQeasy

A journalist is writing an article about software licensing and wants to explain the key difference between the GNU General Public License (GPL) and the MIT License. Which statement accurately describes that difference?

A.The GPL requires derivative works to be distributed under the same license, while the MIT License permits derivative works to be relicensed under proprietary terms.
B.The GPL applies only to operating system kernels, while the MIT License applies only to web applications and libraries.
C.The GPL prohibits commercial use of the software, while the MIT License allows companies to sell the software for profit.
D.The GPL requires users to pay a fee for each copy, while the MIT License requires attribution in the source code only.
AnswerA

The GPL is a copyleft license: any distributed derivative work must also be licensed under the GPL, preserving the freedoms of the original. The MIT License is permissive, allowing derivative works to be closed and relicensed. This is the core legal distinction the journalist needs to explain accurately.

Why this answer

The GPL is a copyleft license that mandates derivative works be distributed under the same terms, keeping software free for downstream users. The MIT License is permissive, allowing derivative works to be relicensed, including as proprietary software. This contrast between copyleft and permissive licensing is the essential point the journalist must convey.

Exam trap

The trap here is confusing the GPL's copyleft requirement with a ban on commercial use, when in fact the GPL allows selling software as long as the source and freedoms are preserved.

53
MCQmedium

A server hosts a directory /srv/dropbox that many users write into. The administrator wants every new file created inside it to automatically belong to the group 'projects' rather than each creator's primary group, without changing anyone's account settings. Which action achieves this?

A.Run chgrp projects /srv/dropbox and rely on the default umask for inheritance.
B.Add every user to the projects group and set their primary group with newgrp.
C.Run chmod g+s /srv/dropbox so new entries inherit the directory's group.
D.Run chmod u+s /srv/dropbox so new entries inherit the directory's owner.
AnswerC

Setting the setgid bit on a directory makes the kernel assign that directory's group to every file and subdirectory created within it. Because /srv/dropbox is group-owned by projects, all new entries inherit projects automatically, and the setgid bit is also propagated to new subdirectories. No per-user account change is needed, which matches the requirement exactly.

Why this answer

The setgid bit on a directory is the standard Linux mechanism for group inheritance: files and subdirectories created inside take the directory's group, and the bit is copied to new subdirectories. Setting it on a directory already group-owned by projects satisfies the requirement without editing /etc/passwd or /etc/group for individual users.

Exam trap

The trap here is confusing the setuid bit with the setgid bit, since both appear as an s in ls output but only setgid governs directory group inheritance.

54
MCQeasy

What is the primary purpose of the /etc/shadow file?

A.It stores all user login shells.
B.It stores system-wide cron jobs.
C.It stores user group membership lists.
D.It stores encrypted password hashes.
AnswerD

The /etc/shadow file stores password hashes separately from /etc/passwd, which remains world-readable. This separation restricts hash access to root, satisfying the security constraint that ordinary users must not read password hashes. Hashes are salted and hashed, not merely "encrypted", though the option's intent matches the file's core purpose.

Why this answer

The /etc/shadow file stores encrypted password hashes along with password aging information for local user accounts. It is readable only by root, unlike /etc/passwd, which is world-readable and historically held the hashes.

Exam trap

The trap is confusing /etc/passwd (which holds user account info like UID, GID, home, and shell) with /etc/shadow (which holds the actual password hashes) — candidates who remember 'passwd has passwords' pick the wrong file.

How to eliminate wrong answers

Option A is wrong because login shells are stored in /etc/passwd (the seventh field), not /etc/shadow. Option B is wrong because system-wide cron jobs live in /etc/crontab and /etc/cron.d/, not /etc/shadow. Option C is wrong because group membership is stored in /etc/group (and /etc/gshadow for group passwords), not /etc/shadow.

55
MCQmedium

A user reports that a script located in their home directory will not run when they type its name, even though the file exists and has execute permission. The user is currently in that home directory. Which action explains why the script is not found and how to run it?

A.The script must be moved to /usr/local/bin before it can be executed.
B.The script lacks the setuid bit, so it must be run with sudo scriptname.
C.The execute permission must be granted with chmod +x scriptname first.
D.The current directory is not in the PATH, so the script must be invoked as ./scriptname.
AnswerD

On Linux, the shell searches only directories listed in PATH for commands, and the current directory is normally absent for security reasons. Prefixing the script name with ./ explicitly specifies the current directory as the path, allowing the shell to locate and execute the file that already has execute permission.

Why this answer

The shell resolves bare command names by searching the directories in the PATH variable, and the current working directory is deliberately excluded from the default PATH to prevent accidental execution of malicious files. Supplying a relative path with ./ tells the shell exactly where to find the script, which resolves the command-not-found error without relocating or re-permissioning the file.

Exam trap

The trap here is assuming a permission problem whenever a script fails to start, when the actual symptom of a missing PATH entry is a command-not-found error rather than a permission-denied error.

56
Multi-Selecthard

A Linux administrator is working in a directory with many files and wants to identify files by their type and permissions without opening them. Which TWO commands can provide this information? (Choose two.)

Select 2 answers
A.stat
B.cat
C.ls -l
D.file
E.less
AnswersC, D

ls -l lists files in long format, showing permissions, number of links, owner, group, size, and modification time. This directly reveals file type through the first character (e.g., - for regular file, d for directory, l for symlink) and permissions through the rwx string. It satisfies the requirement to identify type and permissions without opening files.

Why this answer

To identify file type and permissions without opening files, ls -l provides permissions and type indicators, while file determines the content type. Together they cover both needs. cat and less open file contents, which is not desired, and stat focuses on metadata like permissions but does not classify content type as file does. Thus, ls -l and file are the two appropriate commands.

Exam trap

The trap here is assuming stat is equivalent to file for type detection, when stat only shows mode bits and not content-based file type classification.

57
MCQmedium

A developer runs `ls -l report.txt` and sees `-rw-r----- 1 alice devs 2048 May 10 09:15 report.txt`. The file must be readable by all members of the `devs` group, but currently only alice can read it. The file's group ownership is already correct. Which command will grant read access to the `devs` group without changing any other permission bits?

A.chmod g+r report.txt
B.chmod +r report.txt
C.chmod o+r report.txt
D.chmod u+r report.txt
AnswerA

This adds the read bit to the group permission set using symbolic mode. The g selects the group category, +r adds read, and all other bits (owner rw, others none) remain untouched. The file already belongs to the devs group, so group members gain read access exactly as required, and no execute or write permissions are introduced.

Why this answer

Symbolic chmod lets you manipulate one permission category at a time. Because group ownership is already correct and only the group read bit is missing, selecting the group category and adding read yields exactly the intended access. The other forms either target the wrong category or widen access to all users, which the scenario explicitly does not want.

Exam trap

The trap here is assuming a bare +r affects only the group, when it actually applies to owner, group, and others.

58
MCQmedium

You need to ensure that a server's time is synchronized with an external time source to prevent authentication errors. Which daemon is responsible for this?

A.cron
B.chronyd
C.sshd
D.rsyslogd
AnswerB

Chronyd implements the Network Time Protocol to discipline the system clock against external time servers, correcting drift continuously. This directly satisfies the requirement to synchronise server time with an external source, preventing the Kerberos authentication failures caused by clock skew exceeding the default five-minute tolerance.

Why this answer

chronyd is the NTP daemon on modern RHEL/CentOS/Fedora and many other distributions, responsible for synchronizing the system clock with external time sources. Accurate time is critical for Kerberos authentication, TLS certificate validation, and log correlation. The other daemons handle scheduling, remote access, and logging, not time synchronization.

Exam trap

The trap is confusing daemons by function — candidates may pick cron (scheduling) or rsyslogd (logging), forgetting that only chronyd (or ntpd/systemd-timesyncd) handles time synchronization.

How to eliminate wrong answers

Option A is wrong because cron schedules recurring jobs; it has no role in setting or synchronizing the system clock. Option C is wrong because sshd is the OpenSSH server daemon handling remote login sessions, unrelated to time. Option D is wrong because rsyslogd collects and forwards system log messages; it does not synchronize time, though accurate time helps log ordering.

59
MCQeasy

You need to display the contents of a file named 'config.txt' directly to your terminal screen. Which command should you use?

A.head config.txt
B.cat config.txt
C.echo config.txt
D.grep config.txt
AnswerB

cat reads the file sequentially and writes its contents to standard output, which is the terminal, satisfying the requirement to display config.txt directly on screen. It requires no pager or editor and outputs the raw file contents.

Why this answer

The `cat` command (concatenate) reads one or more files and writes their contents to standard output, which by default is the terminal. Running `cat config.txt` therefore prints the entire file to the screen in one pass, exactly matching the requirement to display file contents directly. It is the canonical tool for this purpose on Linux.

Exam trap

The trap is the word 'display' — candidates may pick head thinking it 'shows' the file, but head only shows the first 10 lines, and the question asks for the file's contents, which cat provides in full.

How to eliminate wrong answers

Option A is wrong because `head config.txt` displays only the first 10 lines by default, not the full file contents — it is a partial viewer, not a full display tool. Option C is wrong because `echo config.txt` simply prints the literal string 'config.txt' to the terminal; echo does not read files at all, it only outputs its arguments. Option D is wrong because `grep config.txt` treats 'config.txt' as the search pattern and waits for input from stdin (or errors), rather than displaying the file's contents.

60
Multi-Selecteasy

Which TWO of the following commands can be used to display the contents of a text file?

Select 2 answers
A.cd
B.mkdir
C.cat
D.less
E.mv
AnswersC, D

`cat` concatenates files and writes them to standard output, so passing a single filename prints that file's entire contents to the terminal. This directly satisfies the stem's requirement to display a text file's contents, and it is one of the two commands the question expects.

Why this answer

Option C, cat, is correct because the cat command concatenates and prints file contents directly to standard output, making it the standard way to display a text file's contents. Option D, less, is correct because it is a pager that displays a text file's contents one screen at a time, allowing scrolling and searching through the file. The unmarked options do not belong: cd changes the current working directory, mkdir creates a new directory, and mv moves or renames files or directories—none of these display file contents.

Exam trap

The trap is that multiple commands touch files (mv, mkdir, cd), so candidates must distinguish commands that display content from those that manipulate filesystem structure or location.

61
Multi-Selectmedium

Which THREE of the following are valid ways to get help on a command?

Select 3 answers
A.help command
B.search command
C.info command
D.command --help
E.man command
AnswersC, D, E

The info command opens GNU Info documentation, a hypertext manual system providing detailed help for commands, satisfying the requirement for a valid help method. It reads .info files, typically installed under /usr/share/info, and offers navigation between nodes.

Why this answer

Option C (info command) is correct because GNU Info pages provide detailed, hyperlinked documentation for many commands and utilities, invoked as 'info <command>'. Option D (command --help) is correct because most GNU/Linux commands support the '--help' flag, which prints a concise usage summary and available options directly to standard output. Option E (man command) is correct because the 'man' utility displays the system manual pages for a command, covering its syntax, options, and description.

Options A and B are not valid: 'help command' is not a general help mechanism (the 'help' builtin only works for shell builtins, not arbitrary commands), and 'search command' is not a help command at all.

Exam trap

The trap is accepting 'help command' as universally valid — it only works for shell builtins, not external commands, so candidates who overgeneralize pick it incorrectly.

62
MCQeasy

A career counselor is advising a student who wants to work as a Linux systems administrator. Which skill area is most directly relevant to that entry-level role?

A.Designing printed circuit boards for embedded hardware.
B.Writing marketing copy for software product launches.
C.Negotiating real estate leases for data center space.
D.Managing user accounts, file permissions, and system services from the command line.
AnswerD

User account administration, permission management, and service control are daily tasks for a Linux systems administrator. Command-line proficiency with tools for these jobs is the foundational skill employers expect, so this area is the most directly relevant to an entry-level administration role.

Why this answer

Entry-level Linux administration centers on operating the system: creating and managing accounts, setting file permissions, and controlling services. Command-line competence in these areas is what employers screen for. Hardware design, marketing, and facilities negotiation fall outside the role's core technical responsibilities.

Exam trap

The trap here is choosing a broadly IT-related or data-center-related activity instead of the hands-on system management tasks that define the role.

63
Multi-Selecthard

Which TWO of the following regex patterns are valid for grep to match the beginning or end of a line?

Select 2 answers
A.$
B.\
C..
D.*
E.^
AnswersA, E

End of line.

Why this answer

Option E, the caret (^), is correct because in grep's basic regular expressions it is the anchor that matches the start of a line, so a pattern like ^root matches lines beginning with 'root'. Option A, the dollar sign ($), is correct because it is the anchor that matches the end of a line, so a pattern like bash$ matches lines ending in 'bash'. Option C, the dot (.), is not an anchor; it matches any single character.

Option D, the asterisk (*), is a quantifier meaning zero or more repetitions of the preceding element, not a line anchor. Option B, the backslash (\), is an escape character used to remove the special meaning of the following character, not a beginning- or end-of-line anchor.

Exam trap

The trap here is confusing regex metacharacters with anchors — candidates often pick . or * because they look like 'special' regex symbols, forgetting that only ^ and $ denote line boundaries in grep.

64
Multi-Selecteasy

Which THREE of the following tools can be used for text processing?

Select 3 answers
A.awk
B.grep
C.sed
D.cat
E.ls
AnswersA, B, C

awk is a complete pattern-scanning and field-processing language: it splits each input record into fields, applies pattern-action rules and can reformat or summarise text. This satisfies the text-processing requirement alongside stream editors and search tools.

Why this answer

awk (A) is a full-featured text-processing language and utility that scans input line by line, splits fields, and performs pattern-action processing, making it a core text-processing tool. grep (B) is a text-processing tool because it searches input streams or files for lines matching a regular expression and prints the matching lines. sed (C) is a stream editor that performs text transformations such as substitution, deletion, and insertion on input streams, so it is also a text-processing tool. The unmarked options do not belong: cat (D) simply concatenates and outputs file contents without transforming or analyzing text, and ls (E) lists directory entries rather than processing text.

Exam trap

The trap is including `cat` as a text-processing tool because it is often used in pipelines — but cat only outputs data, it does not transform or filter it like awk, grep, or sed.

65
MCQeasy

A new Linux user is exploring career paths and learns that Linux skills are in demand. Which of the following is a primary reason why Linux is widely used in cloud computing and web servers?

A.Linux is proprietary software, ensuring vendor support and reliability.
B.Linux is free to use, modify, and distribute, which reduces costs and encourages customization.
C.Linux requires powerful hardware, making it ideal for high-performance servers.
D.Linux is the only operating system that supports virtualization.
AnswerB

The open source nature of Linux allows anyone to use, modify, and distribute it without licensing fees. This reduces total cost of ownership and enables organizations to tailor the OS to their needs. This flexibility and cost-effectiveness are major reasons for its dominance in cloud and web server environments, where scalability and customization are critical.

Why this answer

Linux's open source licensing allows free use, modification, and distribution, which lowers costs and provides unmatched flexibility. This has led to its widespread adoption in cloud computing and web servers, where scalability and customization are essential. The other options contain factual errors about Linux's licensing, hardware requirements, or virtualization support.

Exam trap

The trap here is equating Linux's popularity in servers solely with performance or proprietary support, when its open source licensing and cost benefits are the primary drivers.

66
MCQmedium

When using the 'man' command, how do you navigate to the next page of the manual entry?

A.Enter
B.Page Up
C.Right Arrow
D.Spacebar
AnswerD

Pressing the spacebar advances the pager one full screen, satisfying the requirement to reach the next page of a manual entry. The `man` command pipes output through a pager such as `less`, where Space scrolls forward a page, whereas Enter moves a single line.

Why this answer

The 'man' command uses the 'less' pager by default, and in 'less', pressing the Spacebar scrolls forward by one full page. This is a standard navigation convention in Unix pagers, allowing quick reading of long manual pages. The Spacebar is the correct key to advance to the next page of the manual entry.

Exam trap

The trap here is confusing the Spacebar with the Enter key or Page Down, as many candidates assume Enter advances a page, but in 'less' it only scrolls one line.

How to eliminate wrong answers

Option A is wrong because the Enter key scrolls forward by only one line, not a full page. Option B is wrong because Page Up scrolls backward, not forward. Option C is wrong because the Right Arrow scrolls horizontally to the right, which is useful for long lines but does not navigate pages vertically.

67
MCQhard

A colleague's shell script contains the line: find /var/log -name '*.log' -exec rm {} \; You need to explain what this line does before approving it. What is the effect of the -exec primary here?

A.It deletes each matching file one at a time by invoking rm once per file.
B.It prompts the user for confirmation before deleting each file.
C.It prints the names of matching files without deleting them.
D.It collects all matching files and passes them to a single rm invocation.
AnswerA

With -exec ... \;, find runs the specified command separately for every file that matches, substituting each path for the {} placeholder. The escaped semicolon terminates the command list for find rather than the shell. So each .log file under /var/log is passed individually to rm and removed, one invocation per match.

Why this answer

The -exec primary runs an external command for each file find locates, replacing the {} placeholder with the pathname. Terminating that command with an escaped semicolon makes find invoke it once per match, whereas a plus sign would batch multiple paths into fewer invocations. Understanding that terminator is essential before approving destructive one-liners in production scripts.

Exam trap

The trap here is overlooking the escaped semicolon terminator, which changes -exec from batching many files into one command to running the command separately for every match.

68
MCQmedium

A system administrator needs to check the version of the Linux kernel installed on a production server. Which command is most appropriate?

A.check-kernel
B.ls /boot
C.uname -r
D.cat /etc/version
AnswerC

uname -r prints the kernel release string, giving the exact running kernel version. Other uname flags show hardware or system name, so -r directly satisfies the need to verify the installed kernel on the production server.

Why this answer

The `uname -r` command prints the kernel release version, which is exactly what the administrator needs. `uname` is a standard Unix/Linux utility that displays system information, and the `-r` flag specifically outputs the kernel release. This is the most direct and appropriate command for checking the kernel version on a production server.

Exam trap

The trap here is confusing OS version with kernel version; candidates might pick `cat /etc/version` or `ls /boot` thinking they show the kernel, but only `uname -r` directly reports the running kernel release.

How to eliminate wrong answers

Option A is wrong because 'check-kernel' is not a standard Linux command; it does not exist on typical systems. Option B is wrong because listing the contents of /boot may show kernel image filenames (e.g., vmlinuz-5.4.0-42-generic), but it does not directly report the running kernel version and may include multiple kernels, making it ambiguous. Option D is wrong because /etc/version is not a standard file for kernel version; while some distributions have /etc/os-release or /etc/issue for OS version, they do not provide kernel version, and /etc/version is not a reliable source.

69
MCQeasy

Which command is used to display the current working directory in the terminal?

A.pwd
B.dir
C.cd
D.ls
AnswerA

pwd prints the absolute path of the directory the shell is currently in, reading it from the shell's tracked location rather than the filesystem. It directly answers the question of where you are, requiring no arguments.

Why this answer

The `pwd` command stands for 'print working directory' and is specifically designed to output the absolute path of the current directory in a Linux/Unix terminal. It reads the current directory from the kernel and displays it, making it the correct choice for this task. This is a fundamental command in the Linux Essentials (010-160) exam domain.

Exam trap

The trap here is confusing commands that list directory contents (`ls`, `dir`) with the command that displays the current directory path (`pwd`), or mixing up navigation (`cd`) with reporting (`pwd`).

How to eliminate wrong answers

Option B is wrong because `dir` is a command primarily used in Windows/DOS environments to list directory contents, not to display the current working directory; in Linux, it is often an alias for `ls` but does not show the path. Option C is wrong because `cd` (change directory) is used to navigate to a different directory, not to display the current one. Option D is wrong because `ls` lists the files and directories within the current directory, but does not print the working directory path itself.

70
MCQhard

A security auditor wants to give a contractor temporary read-only access to a single log file /var/log/app/audit.log without adding the contractor to any group and without granting access to the rest of the directory. Which approach best matches least-privilege practice?

A.Use setfacl to add a read ACL entry for the contractor on the file only.
B.Change the file's group to a new group containing only the contractor and set the mode to 640.
C.Set the file mode to 644 so any user on the system can read it.
D.Run chmod o+r /var/log/app and rely on directory execute permission to limit access.
AnswerA

POSIX ACLs let you grant permissions to a named user on one file, independent of the traditional owner/group/others triads. A read ACL entry for the contractor gives exactly the required access to the single log while leaving the directory and other files untouched, which is the least-privilege outcome. It also avoids changing group membership.

Why this answer

POSIX ACLs express per-user and per-group permissions on individual files, which is precisely what the scenario needs: read access for one named contractor on one log file. The traditional mode bits cannot represent a single extra user without widening the group or others categories, so setfacl is the least-privilege tool.

Exam trap

The trap here is reaching for group changes or world-readable modes when a per-user ACL expresses the requirement without broadening access.

71
MCQhard

Why do many enterprise Linux distributions choose to delay the inclusion of the absolute latest kernel version?

A.Because the latest kernel is always incompatible with proprietary software.
B.Because they are legally required to wait 12 months.
C.Because they lack the technical staff to compile new kernels.
D.Because they prioritize stability and extensive testing to ensure production uptime.
AnswerD

Enterprise distributions backport security fixes onto a frozen kernel ABI, so drivers and vendor modules keep working. Deferring the newest kernel until it has survived months of upstream and distribution testing satisfies the stem's production-uptime constraint, avoiding regressions that bleeding-edge releases introduce.

Why this answer

Enterprise distributions such as RHEL, SLES, and Ubuntu LTS deliberately backport fixes to older, well-tested kernels rather than shipping the newest upstream release. This prioritizes stability, hardware/driver compatibility, and predictable behavior so that production workloads and certified ISV applications continue to run without regression. Extensive QA, regression testing, and vendor certification cycles take time, which is why enterprise kernels lag mainline.

Exam trap

The trap is assuming enterprise lag stems from inability or legal constraint; the exam wants you to recognize it as a deliberate stability-versus-currency trade-off driven by testing and certification.

How to eliminate wrong answers

Option A is wrong because the latest kernel is not inherently incompatible with proprietary software; incompatibility arises from specific ABI or driver changes, not from newness itself. Option B is wrong because no law mandates a 12-month delay; the lag is a business and engineering decision, not a legal requirement. Option C is wrong because enterprise vendors like Red Hat and SUSE employ large kernel engineering teams — the delay is intentional policy, not a staffing limitation.

72
MCQmedium

Which command removes a group named 'tempgroup' from the system?

A.groupdel tempgroup
B.usermod -r tempgroup
C.grouprm tempgroup
D.removegroup tempgroup
AnswerA

`groupdel tempgroup` directly deletes the group entry from `/etc/group`, satisfying the requirement to remove the group from the system. Unlike `gpasswd -d`, which only removes a member, or `usermod`, which modifies membership, `groupdel` eliminates the group itself. It fails only if the group is a user's primary group.

Why this answer

The groupdel command is the standard Linux utility used to remove a group from the system. It deletes the group entry from /etc/group and /etc/gshadow, and is the correct tool for this task.

Exam trap

The trap is confusing usermod options with group management commands, or inventing non-existent commands like grouprm or removegroup.

How to eliminate wrong answers

Option B is wrong because usermod -r is not a valid option for removing groups; usermod modifies user accounts, and -r is used with useradd to create a system account, not to delete groups. Option C is wrong because grouprm is not a standard Linux command. Option D is wrong because removegroup is not a standard Linux command.

73
MCQhard

A junior administrator is documenting the governance of a Linux distribution for an internal wiki. She needs to describe how a community-driven distribution typically makes technical decisions, contrasting it with a single-vendor model. Which statement accurately describes the community-driven governance model?

A.Decisions are made through elected or appointed councils and open mailing-list discussion, with contributions from many independent developers and organizations
B.A single paid maintainer owns the source tree and approves every commit before release
C.Decisions are made exclusively by the distribution's largest corporate sponsor, which also owns the trademark
D.Technical direction is set by a rotating committee of end users who are not developers and cannot modify source code
AnswerA

Community-driven distributions such as Debian and Fedora rely on project-wide bodies, technical committees, and public mailing lists where maintainers debate and vote on direction. Contributors come from many employers and volunteer backgrounds, and the project's constitution or governance documents define how disputes are resolved. This distributed, transparent model is what distinguishes community governance from a single company dictating roadmap and policy.

Why this answer

Community-driven distributions distribute authority through open mailing lists, project constitutions, technical committees, and elections, with contributors from many independent organizations. This transparency and shared control contrast with single-vendor models, where one company sets the roadmap and holds decisive authority. The accurate description is therefore the one emphasizing councils, open discussion, and broad independent participation, not concentrated ownership by a sponsor or a non-developer user panel.

Exam trap

The trap here is assuming that because a company sponsors a community distribution, that company also governs it, when sponsorship and governance are separate concerns.

74
MCQmedium

A hospital IT team is evaluating a Linux distribution for its patient-record servers. The team wants a distribution whose packages are maintained by a vendor that offers commercial support contracts, certified hardware compatibility, and long-term security updates, rather than relying solely on community volunteers. Which type of distribution best fits these requirements?

A.An enterprise Linux distribution such as Red Hat Enterprise Linux or SUSE Linux Enterprise Server
B.A live-only distribution intended for USB troubleshooting
C.A bleeding-edge rolling release community distribution
D.A minimal distribution built from source by the hospital's own staff
AnswerA

Enterprise distributions are backed by commercial vendors that sell support subscriptions, publish long life-cycle update policies, and maintain hardware certification programs. For a hospital needing guaranteed security patches and vendor accountability, this model matches the requirements directly. Community distributions may be technically excellent but typically lack the contractual support and formal compatibility guarantees that regulated environments often demand.

Why this answer

The hospital needs vendor accountability, formal support contracts, certified hardware, and a defined long-term security update stream. Commercial enterprise distributions such as RHEL and SLES are built around exactly that business model, with subscription-based access to patches and support. Rolling releases, self-built systems, and live-only images all lack the contractual maintenance guarantees required in a regulated healthcare environment.

Exam trap

The trap here is equating technical quality or popularity with enterprise readiness, when the deciding factor is the availability of commercial support and a long-term maintenance commitment.

75
MCQmedium

A junior Linux administrator is documenting the origins of the software running on company servers. The administrator notes that the Linux kernel is developed and released by a large, distributed community rather than a single company. Which statement best describes how the Linux kernel project is governed and maintained?

A.Kernel development is managed by a rotating committee of distribution vendors who vote on each patch before it is accepted into any release.
B.The Linux Foundation owns the copyright to all kernel code and directly employs every developer who contributes patches to the mainline tree.
C.Any contributor may push code directly to the mainline kernel repository without review, since the kernel is a purely decentralized project with no release authority.
D.Linus Torvalds acts as the final maintainer and releases official kernel versions, while subsystem maintainers review and merge patches into their areas before changes reach the mainline tree.
AnswerD

The Linux kernel uses a hierarchical, meritocratic model: subsystem maintainers review patches for their areas and send pull requests to Linus Torvalds, who tags official releases. This layered trust structure lets thousands of contributors participate while keeping quality control and release authority centralized, which explains how a distributed community ships a coherent kernel.

Why this answer

The kernel follows a layered maintainer model. Contributors submit patches, subsystem maintainers review and merge them into their trees, and Linus Torvalds pulls those trees to produce official releases. This structure combines open participation with disciplined review, allowing a global community to collaborate while maintaining a single, coherent mainline kernel that distributions can package.

Exam trap

The trap here is equating the Linux Foundation's stewardship role with ownership or direct control of kernel development decisions.

Page 1 of 5

Page 2

All pages