Courseiva

LPI Linux Essentials (010-160, v1.6) (010-160) (010-160) — Questions 76–150

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

Page 1

Page 2 of 5

Page 3
76
MCQhard

A user runs the command `grep '^root' /etc/passwd` and sees only the line starting with 'root'. They now want to find all lines that do NOT start with 'root'. Which command should they use?

A.grep -i '^root' /etc/passwd
B.grep -v '^root' /etc/passwd
C.grep -n '^root' /etc/passwd
D.grep -c '^root' /etc/passwd
AnswerB

The -v option inverts the match, so grep prints lines that do not match the pattern. With the anchor ^root, it selects all lines that do not begin with 'root'. This is exactly what the user needs. The command is efficient and standard for excluding lines based on a pattern.

Why this answer

To invert a match in grep, the -v option is used. Combined with the anchored pattern ^root, it prints all lines that do not begin with 'root'. The other options either change case sensitivity, add line numbers, or count matches, but none of them invert the selection to exclude the matched lines.

Exam trap

The trap here is forgetting that grep's -v option inverts the match, or confusing it with -i for case-insensitivity.

77
MCQhard

A systems administrator is evaluating a new open source backup tool for a company's Linux servers. The tool's license includes a clause that states any modifications must be released under the same license. The administrator plans to modify the tool for internal use only. Which action is required by this license?

A.The administrator must provide the original authors with a copy of the modifications.
B.The administrator must publish the modified source code on a public repository.
C.No action is required because the modifications are for internal use only and not distributed.
D.The administrator must pay a royalty to the original authors for each internal modification.
AnswerC

Copyleft licenses such as the GNU GPL require that modified source code be made available only when the modified software is distributed to others. Internal use within an organization does not count as distribution, so the administrator is free to modify the tool without releasing the changes. This allows businesses to customize open source software for their own needs without legal obligations.

Why this answer

The copyleft clause in licenses like the GPL triggers obligations only upon distribution. Modifying software for internal use does not constitute distribution, so no source code release is required. The administrator can customize the backup tool freely for the company's internal servers without publishing changes, paying royalties, or notifying authors.

This highlights the distinction between internal use and distribution.

Exam trap

The trap here is assuming that any modification to copyleft software automatically requires public release, when in fact the obligation is triggered only by distribution to third parties.

78
Multi-Selectmedium

Which THREE of the following represent ways to refer to the home directory?

Select 3 answers
A.~
B...
C.$HOME
D./home/user
E./
AnswersA, C, D

The tilde character is expanded by the shell to the current user's home directory path, so `cd ~` or `ls ~/docs` resolves correctly. It satisfies the stem because it is a shell-level shorthand, distinct from the environment variable and the literal path forms.

Why this answer

Option A (~) is correct because the tilde is the shell's standard shorthand for the current user's home directory, expanded by the shell before command execution. Option C ($HOME) is correct because HOME is the environment variable that stores the absolute path of the current user's home directory, and referencing $HOME resolves to that path. Option D (/home/user) is correct because on typical Linux systems the home directory for a user named 'user' is literally located at /home/user, making it a valid absolute path reference.

Option B (..) is not correct because it refers to the parent directory of the current working directory, not the home directory. Option E (/) is not correct because it denotes the root of the filesystem, which is distinct from a user's home directory.

Exam trap

The trap here is confusing the home directory with the root directory or parent directory. Candidates might think '..' or '/' refer to home, but they do not.

79
MCQhard

A user is in /home/bob and wants to copy the file notes.txt from /data/reports into the current directory, keeping the same filename. Which command performs this operation?

A.cp /data/reports/notes.txt .
B.cp . /data/reports/notes.txt
C.mv /data/reports/notes.txt .
D.cp -r /data/reports/notes.txt /home/bob
AnswerA

The cp command takes a source followed by a destination. The single dot denotes the current working directory, /home/bob, so this copies the source file into it while preserving the name notes.txt. This is the standard, unambiguous way to copy a file into the directory the user is currently in.

Why this answer

Copying a file into the current directory is expressed with cp source . where the dot stands for the working directory. The copy leaves the original intact in /data/reports and creates notes.txt in /home/bob. Moving the file, reversing the operands, or using a recursive option for a single regular file all fail to match the stated requirement.

Exam trap

The trap here is confusing mv with cp, since both accept a source and destination and both appear to place a file where the user wants it.

80
MCQmedium

You want to delete a directory named 'temp_backup' that contains several files. Which command will successfully remove it and its contents?

A.rm -r temp_backup
B.rm temp_backup
C.rmdir temp_backup
D.rm -f temp_backup
AnswerA

The `-r` flag makes `rm` recurse into the directory, deleting its files and subdirectories before removing `temp_backup` itself. Without it, `rm` refuses to act on directories. This satisfies the stem's requirement to remove a non-empty directory and all its contents in one command.

Why this answer

`rm -r temp_backup` recursively removes the directory and all its contents, which is required because `rm` by default refuses to delete directories. The -r (recursive) flag descends into subdirectories and deletes files before removing the directory itself. This is the standard way to delete a non-empty directory.

Exam trap

The trap is choosing `rmdir` (which sounds like 'remove directory') or `rm -f` (which sounds forceful) — 010-160 tests whether you know that only -r enables recursive directory deletion.

How to eliminate wrong answers

Option B is wrong because `rm temp_backup` without -r fails with 'cannot remove: Is a directory' — rm does not delete directories by default. Option C is wrong because `rmdir temp_backup` only removes empty directories and will fail with 'Directory not empty' when files are present. Option D is wrong because `rm -f temp_backup` forces removal without prompting but still does not recurse into directories — it will still fail on a directory.

81
Multi-Selecthard

Which TWO of the following commands can be used to redirect input from a file?

Select 2 answers
A.&&
B.cat file | command
C.<
D.>
E.>>
AnswersB, C

Piping cat's output into another command feeds that command's standard input from the file's contents, achieving input redirection indirectly. This satisfies the stem's requirement by supplying data via a pipe rather than the shell's < operator.

Why this answer

Option B (cat file | command) is correct because piping the output of cat file into another command feeds that file's contents to the command's standard input, effectively redirecting input from the file. Option C (<) is correct because the input redirection operator < explicitly redirects a command's standard input to come from a file, as in command < file. The unmarked options do not belong: && is a logical AND operator that conditionally chains commands based on exit status, while > and >> are output redirection operators that send standard output to a file (truncating and appending, respectively), not input.

Exam trap

The trap is mixing up input and output redirection operators — candidates often pick `>` or `>>` because they remember 'redirection' but forget those are for STDOUT, while `<` is the input operator.

82
MCQeasy

A user wants to see the manual page for the 'passwd' command, but is unsure which section contains the command documentation. Which command displays the manual page for 'passwd' from section 1?

A.man -k passwd
B.man 5 passwd
C.man 1 passwd
D.man -f passwd
AnswerC

The syntax 'man 1 passwd' explicitly requests section 1 of the manual, which contains user commands. Since 'passwd' exists in multiple sections, specifying the section number ensures the command documentation is displayed rather than the file format or other entries, directly satisfying the user's need.

Why this answer

Manual pages are organized into numbered sections, and section 1 holds user commands. Because 'passwd' also appears in section 5 as a file format, explicitly specifying section 1 with 'man 1 passwd' guarantees the command documentation is shown, which is exactly what the user requested.

Exam trap

The trap here is forgetting that the same manual page name can exist in multiple sections, so omitting the section number may open the wrong page.

83
Multi-Selecteasy

Which TWO of the following are commands to delete files or directories?

Select 2 answers
A.rmdir
B.rm
C.ls
D.cp
E.mv
AnswersA, B

`rmdir` removes empty directories, satisfying the stem's requirement for a deletion command. Unlike `rm -r`, which recurses through populated trees, `rmdir` refuses non-empty directories, so it deletes only the directory entry itself. This precise, non-recursive behaviour makes it one of the two valid deletion commands listed.

Why this answer

Option A, rmdir, is correct because it is the standard Linux/Unix command used to remove empty directories from the filesystem. Option B, rm, is correct because it is the standard command for deleting files and, with the -r (recursive) flag, directories and their contents. The other options do not delete anything: ls lists directory contents, cp copies files or directories, and mv moves or renames files or directories without removing them.

Exam trap

The trap is that candidates may include mv because it can 'remove' a file from its original location, but mv relocates rather than deletes — the exam expects only true deletion commands.

84
MCQeasy

A user is at the shell prompt and wants to display the current working directory. Which command should be used?

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

pwd stands for 'print working directory' and outputs the absolute path of the current directory. It is a shell built-in in most shells, so it reflects the shell's internal notion of the current directory, which may differ from the kernel's if symbolic links are involved.

Why this answer

The pwd command prints the absolute pathname of the current working directory. Other commands like cd change directories, ls lists contents, and dir is not the standard tool for this purpose. pwd is a fundamental command for orientation in the filesystem.

Exam trap

The trap here is confusing listing directory contents with displaying the directory's path; ls shows files, while pwd shows where you are.

85
MCQeasy

While troubleshooting a service, a technician runs `ps aux` and sees a process in state `Z`. The process's parent is PID 1. Which statement best describes what the technician is observing?

A.The process is sleeping and is waiting for a signal to wake it.
B.The process is running in the foreground and has high CPU priority.
C.The process is stopped by a job control signal and can be resumed with `fg`.
D.The process has terminated, but its exit status has not yet been read by its parent.
AnswerD

A zombie process has finished execution, but the parent has not yet called wait() to collect its exit status. The kernel keeps a minimal process table entry until the parent reaps it. Because the parent here is PID 1 (init/systemd), it normally reaps children quickly; a lingering zombie usually indicates a bug or a stuck reaping loop.

Why this answer

A process in state Z is a zombie: it has already terminated, but its parent has not yet collected its exit status. The kernel retains a small entry until the parent calls wait(). Since the parent is PID 1, which normally reaps promptly, a lingering zombie points to a reaping problem rather than a running or stopped process.

Exam trap

The trap here is assuming that a Z state means the process is still running or merely paused, when it actually indicates an exited process awaiting reaping.

86
MCQmedium

How do you rename a file named 'oldname' to 'newname' using the command line?

A.rn oldname newname
B.ren oldname newname
C.cp oldname newname
D.mv oldname newname
AnswerD

The `mv` command renames a file when both arguments are paths in the same directory, moving the source to the destination name without copying data. This satisfies the stem's requirement to rename 'oldname' to 'newname' in a single command-line operation, unlike `cp`, which duplicates the file.

Why this answer

The 'mv' command moves or renames files; when the source and destination are in the same directory, it effectively renames the file. Running 'mv oldname newname' renames oldname to newname in place, preserving the inode and all file attributes. This is the standard POSIX way to rename files on Linux and Unix systems.

Exam trap

The trap is picking 'cp' as a rename, forgetting that cp leaves the original file in place — only mv removes the old name and assigns the new one.

How to eliminate wrong answers

Option A is wrong because 'rn' is not a standard Linux command — it does not exist in default shells and would return 'command not found'. Option B is wrong because 'ren' is a Windows/DOS command, not a Linux command; Linux uses mv for renaming. Option C is wrong because 'cp oldname newname' creates a copy and leaves the original file intact, which is not a rename — the original still exists under its old name.

87
MCQeasy

Which command is used to clear the terminal screen?

A.clean
B.clear
C.wipe
D.reset
AnswerB

The `clear` command writes the terminal's terminfo capability to erase the visible screen and relocate the cursor to the top-left, satisfying the requirement to clear the terminal display. It operates on the terminal emulator's buffer directly, unlike commands that merely scroll existing output out of view.

Why this answer

The `clear` command is the standard Unix/Linux utility that clears the terminal screen by sending the appropriate escape sequence (typically `\033[H\033[2J` or `\033[3J`) to the terminal emulator. It is part of the ncurses package and works by consulting the `TERM` environment variable to determine the correct control characters for the current terminal type. This makes it the correct and portable choice for clearing the screen in a shell session.

Exam trap

The trap here is confusing `clear` with `reset` or assuming that `clean` or `wipe` are standard screen-clearing commands; candidates may pick `reset` because it also clears the screen, but the question asks for the command specifically used to clear the terminal screen, which is `clear`.

How to eliminate wrong answers

Option A is wrong because `clean` is not a standard Linux command for clearing the screen; it is typically a custom script or an unrelated utility (e.g., in some build systems) and does not perform terminal clearing. Option C is wrong because `wipe` is a secure file deletion tool (from the `wipe` package) that overwrites file contents, not a screen-clearing command. Option D is wrong because `reset` reinitializes the terminal, resetting its state and clearing the screen as a side effect, but its primary purpose is to recover a garbled terminal, not simply to clear the screen; it is heavier and not the intended command for routine screen clearing.

88
MCQeasy

Which symbol represents the current user's home directory in the shell?

A..
B.~
C...
D.$
AnswerB

The tilde character is expanded by the shell to the absolute path of the invoking user's home directory, so ~/file resolves correctly regardless of username. This satisfies the requirement for a portable shorthand referencing the current user's home.

Why this answer

The tilde symbol (~) is a shell metacharacter that expands to the absolute path of the current user's home directory (e.g., /home/username on Linux or /Users/username on macOS). It is recognized by the shell before command execution, so commands like cd ~ or ls ~/Documents work regardless of the current working directory. This is a standard feature in POSIX shells like Bash, Zsh, and Dash.

Exam trap

The trap here is confusing the single dot (.) with the tilde (~), as both are shorthand notations in the shell; candidates often mistakenly think . represents the home directory because it's used in relative paths like ./script, but it actually means the current directory.

How to eliminate wrong answers

Option A is wrong because a single dot (.) represents the current working directory, not the home directory. Option C is wrong because two dots (..) represent the parent directory of the current working directory. Option D is wrong because the dollar sign ($) is used to denote a shell variable (e.g., $HOME) or the command prompt for regular users, but it does not directly represent the home directory.

89
MCQmedium

You need to change the environment variable PATH to include the directory '/opt/bin'. Which command is standard?

A.set PATH=$PATH:/opt/bin
B.env PATH=$PATH:/opt/bin
C.export PATH=$PATH:/opt/bin
D.PATH=$PATH:/opt/bin
AnswerC

The export builtin marks PATH for export to child processes, and $PATH:/opt/bin appends the new directory while preserving existing entries. This is the standard POSIX shell syntax for persistently modifying PATH within the current session, matching the stem's requirement to include /opt/bin.

Why this answer

The export command marks a shell variable for inclusion in the environment of subsequently executed child processes, so 'export PATH=$PATH:/opt/bin' both appends /opt/bin to PATH and ensures the change propagates to child processes. This is the standard, portable way to modify PATH in bash and other POSIX shells. Without export, the change would remain local to the current shell.

Exam trap

The trap is forgetting that assignment alone (PATH=...) does not export the variable — candidates must remember that export is required for child processes to see the change.

How to eliminate wrong answers

Option A is wrong because 'set' in bash sets shell options or positional parameters, not environment variables — 'set PATH=...' does not export PATH and behaves differently across shells (in some it merely sets a shell variable). Option B is wrong because 'env PATH=$PATH:/opt/bin' runs a command named PATH=... in a modified environment; it does not persist the change in the current shell and would fail as a command invocation. Option D is wrong because 'PATH=$PATH:/opt/bin' assigns the variable in the current shell but does not export it, so child processes (including newly launched commands) would not inherit the updated PATH.

90
MCQhard

You notice a file has permissions listed as '-rwsr-xr-x'. What does the 's' in the owner's position indicate?

A.The file is a setgid binary.
B.The file is a setuid binary.
C.The file is immutable.
D.The file is a sticky directory.
AnswerB

The 's' in the owner's execute position denotes setuid: when executed, the process runs with the file owner's effective UID rather than the invoking user's. This satisfies the stem's '-rwsr-xr-x' string, where the owner's execute bit is replaced by 's' to signal that privilege elevation.

Why this answer

The 's' in the owner's execute position (the fourth character of the permission string) indicates the setuid bit is set. When a setuid binary is executed, the process runs with the effective UID of the file's owner rather than the invoking user, which is how tools like /usr/bin/passwd let ordinary users modify /etc/shadow. The lowercase 's' means the underlying execute bit is also set; an uppercase 'S' would mean setuid is set but execute is not.

Exam trap

The trap here is confusing the position of the special permission bits: candidates often assume any 's' means setgid, forgetting that setuid lives in the owner field, setgid in the group field, and sticky as 't' in the other field.

How to eliminate wrong answers

Option A is wrong because setgid would appear as an 's' in the group's execute position (the seventh character), not the owner's position. Option C is wrong because immutability is an extended attribute (chattr +i) and does not appear in the standard rwx permission string at all. Option D is wrong because the sticky bit appears as a 't' in the other/world execute position (the tenth character), typically on shared directories like /tmp.

91
MCQeasy

Which shell variable typically contains the directories searched for command executables?

A.$SHELL
B.$USER
C.$PATH
D.$HOME
AnswerC

$PATH holds a colon-separated list of directories the shell searches, in order, when resolving a bare command name. This directly satisfies the stem: it is the variable consulted to locate command executables, so editing it changes which binary runs.

Why this answer

The $PATH environment variable holds a colon-separated list of directories that the shell searches, in order, when you type a command without a path. It is the standard mechanism for locating executables like ls, grep, or custom scripts.

Exam trap

The trap is mixing up common environment variables — candidates may pick $SHELL or $HOME because they relate to the shell environment, but only $PATH controls executable lookup.

How to eliminate wrong answers

Option A is wrong because $SHELL stores the path to the user's default login shell (e.g., /bin/bash), not the executable search path. Option B is wrong because $USER contains the current username, used for prompts and scripts, not command lookup. Option D is wrong because $HOME points to the user's home directory (e.g., /home/alice), which is unrelated to where the shell looks for binaries.

92
MCQhard

You have added a new hard drive to your Linux server, but the system does not automatically recognize the device. What is the first step you should take to verify if the kernel detects the hardware?

A.Reinstall the operating system.
B.Examine the output of dmesg.
C.Run the top command.
D.Edit the /etc/fstab file.
AnswerB

Examining `dmesg` reveals kernel ring-buffer messages, including hardware detection events logged when the kernel probes the new drive. This directly satisfies the stem's requirement to verify kernel recognition, since `dmesg` records device discovery, driver binding and any SCSI or ATA attachment errors at boot or hotplug time.

Why this answer

The `dmesg` command prints the kernel ring buffer, which contains messages from the kernel during boot and runtime, including hardware detection events. When a new hard drive is added, the kernel logs its detection (or failure to detect) there, making `dmesg` the first place to verify whether the kernel recognized the device. This is the standard first diagnostic step for hardware recognition issues.

Exam trap

The trap is jumping to filesystem or mount configuration (fstab) or OS-level fixes before verifying hardware detection — candidates forget that the kernel must first recognize the device, and dmesg is the authoritative source for that.

How to eliminate wrong answers

Option A is wrong because reinstalling the OS is a drastic, unnecessary action that would not help diagnose whether the kernel detects the drive and would destroy data. Option C is wrong because `top` displays running processes and CPU/memory usage, not hardware detection events. Option D is wrong because /etc/fstab defines mount points for filesystems; editing it does not verify hardware detection and could cause boot failures if misconfigured.

93
MCQhard

You need to move a file named 'data.txt' from the current directory to '/var/logs' but want to be prompted if a file with the same name already exists in the destination. Which option should you add to 'mv'?

A.mv -i
B.mv -n
C.mv -f
D.mv -v
AnswerA

The -i flag puts mv into interactive mode, prompting for confirmation before overwriting an existing destination file. This directly satisfies the stem's constraint of being warned when a file of the same name already exists in /var/logs, preventing accidental data loss.

Why this answer

The 'mv -i' option enables interactive mode, prompting the user for confirmation before overwriting an existing file in the destination. This directly satisfies the requirement to be prompted if a file with the same name already exists. Without -i, mv silently overwrites by default.

Exam trap

The trap is confusing -i (interactive prompt) with -n (no-clobber, silent skip) — both prevent overwriting but only -i prompts the user, which is the specific requirement here.

How to eliminate wrong answers

Option B is wrong because 'mv -n' (no-clobber) silently skips overwriting without prompting — it does not ask for confirmation. Option C is wrong because 'mv -f' (force) removes the destination file without prompting, the opposite of what is needed. Option D is wrong because 'mv -v' (verbose) only prints what is being done; it does not prompt before overwriting.

94
MCQeasy

You are the administrator of a shared Linux workstation. A new employee needs to be added to the existing group 'research' so they can access group-owned project files. Which command accomplishes this?

A.groupmod -a newemployee research
B.useradd -G research newemployee
C.usermod -aG research newemployee
D.chgrp research newemployee
AnswerC

The usermod command modifies an existing user account. The -aG options append the user to the supplementary group 'research' without removing them from other groups. This is the correct and standard way to add a user to an additional group while preserving existing memberships.

Why this answer

To add an existing user to an additional group, use usermod with the -aG options. The -a flag ensures the user is appended rather than replacing all current supplementary groups, and -G specifies the target group. This grants the needed access without disrupting other memberships.

Exam trap

The trap here is using useradd or groupmod for an existing account, when the correct tool for modifying group membership is usermod with -aG.

95
MCQeasy

A support technician is helping a user install a new desktop environment on a Linux workstation. The user asks which organization maintains the GNOME desktop project and how its community governance generally operates. Which answer is most accurate?

A.GNOME is maintained by the GNOME Foundation, a non-profit organization that supports the project's community and releases.
B.GNOME is a proprietary product owned by Canonical and is only available on Ubuntu systems.
C.GNOME is maintained by the Linux Foundation, which also holds the copyright to all GNOME source code.
D.GNOME is governed by the IEEE under a formal standards process and is not considered open source software.
AnswerA

The GNOME Foundation is a non-profit entity that provides governance, financial support, and coordination for the GNOME project. It helps with releases, infrastructure, and community events. This matches the user's question about who maintains GNOME and how its community governance operates, distinguishing it from a single corporate vendor or a standards body.

Why this answer

The GNOME desktop is a free software project supported by the GNOME Foundation, a non-profit that coordinates releases, infrastructure, and community activities. It is not owned by a single vendor or standards body. Understanding the role of foundations helps technicians explain how community-driven projects are sustained and governed in the Linux ecosystem.

Exam trap

The trap here is conflating the Linux Foundation, which hosts many projects, with the GNOME Foundation, which specifically supports the GNOME desktop.

96
MCQmedium

A support engineer is handed a Linux server and needs to determine which user account is currently logged in on a remote SSH session before performing maintenance, so they can notify the right person. Which command most directly reports the usernames of users currently logged into the system?

A.id
B.whoami
C.who
D.groups
AnswerC

The who command reads the system's login records and lists each currently logged-in user along with the terminal or remote origin and login time. It directly shows the usernames of active sessions, including remote SSH logins, which is exactly the information the engineer needs before notifying the affected person.

Why this answer

The who utility consults the utmp login records and reports active sessions with usernames, terminals, and login times, including remote connections. That directly satisfies the need to identify who is logged in before maintenance. The alternative commands report identity, group membership, or the invoking user rather than enumerating current sessions.

Exam trap

The trap here is reaching for an identity command such as whoami or id and forgetting that it describes the invoking account, not the set of logged-in users.

97
MCQhard

When evaluating Linux distributions, what distinguishes a 'rolling release' distribution from a 'fixed release' distribution?

A.Fixed releases are only available for server environments.
B.Rolling releases provide continuous updates, while fixed releases use a versioned lifecycle.
C.Rolling releases require a complete wipe and reinstall for every update.
D.Rolling releases are always more secure than fixed releases.
AnswerB

Rolling releases continuously push new package versions with no fixed version number, whereas fixed releases freeze at a version and receive discrete point updates. This lifecycle difference is the defining distinction the stem asks for.

Why this answer

A rolling release distribution provides continuous updates to the latest software versions without distinct version numbers, while a fixed release distribution has periodic versioned releases with defined support lifecycles. This is the key distinction.

Exam trap

The trap is assuming rolling releases are always better or more secure, or that fixed releases are only for servers. Candidates might also think rolling releases require reinstallation, which is false.

How to eliminate wrong answers

Option A is wrong because fixed releases are used for both server and desktop environments; they are not limited to servers. Option C is wrong because rolling releases do not require a complete wipe and reinstall for updates; they update incrementally. Option D is wrong because rolling releases are not inherently more secure; security depends on timely updates and configuration, and fixed releases can be equally secure with backported patches.

98
MCQmedium

You are configuring a temporary directory where multiple users save files. To ensure that users can only delete their own files and not files created by others, what must you set?

A.chown root /tmp/shared
B.chmod 777 /tmp/shared
C.umask 077
D.chmod +t /tmp/shared
AnswerD

The sticky bit on a directory restricts deletion and renaming to each file's owner, the directory owner, or root. Setting chmod +t on the shared directory enforces exactly the constraint that users cannot delete others' files.

Why this answer

The sticky bit (chmod +t) on a shared directory ensures that only the file's owner (or root) can delete or rename files within it, even if the directory is world-writable. This is exactly the behaviour needed for /tmp-style shared drop boxes where multiple users write files but must not remove each other's data. The kernel enforces this by checking the file owner against the deleting user before permitting unlink or rename.

Exam trap

The trap is assuming that world-writable (777) permissions alone provide safe multi-user sharing; candidates forget that 777 actually enables cross-user deletion, and only the sticky bit restricts it.

How to eliminate wrong answers

Option A is wrong because chown root /tmp/shared only changes directory ownership to root; it does not restrict who can delete files inside, so any user with write permission could still remove others' files. Option B is wrong because chmod 777 grants full read/write/execute to everyone, which actually makes the problem worse — any user can delete any file. Option C is wrong because umask 077 only affects the default permission mask for newly created files by the current shell; it does not retroactively protect an existing shared directory or prevent cross-user deletion.

99
MCQmedium

A system administrator needs to identify which process is listening on TCP port 80 on a Linux server. Which command is most appropriate?

A.ps aux | grep httpd
B.ss -tuln
C.ifconfig -a
D.netstat -tulpn | grep :80
AnswerD

The netstat command with options -tulpn displays TCP and UDP listening sockets, including the PID and program name for each. Piping to grep :80 filters for port 80, directly showing which process is bound to that port. This is a standard and reliable method for identifying the service listening on a specific port, provided netstat is installed.

Why this answer

To find the process listening on a specific port, the command must display both the socket and the owning process. netstat with -tulpn provides that mapping, and filtering for port 80 pinpoints the service. Alternatives like ps or ifconfig lack port-to-process association, and ss without -p omits the process name.

Exam trap

The trap here is thinking that any command showing network or process information will reveal the port owner, when only those that correlate sockets with PIDs will work.

100
MCQeasy

You want to find all occurrences of the string 'ERROR' within the 'syslog' file. Which command is most appropriate?

A.cat 'ERROR' syslog
B.find 'ERROR' syslog
C.grep 'ERROR' syslog
D.sed 'ERROR' syslog
AnswerC

grep searches file contents line by line for a pattern, printing matching lines. Given the constraint of locating every 'ERROR' occurrence inside the syslog file, grep 'ERROR' syslog is the direct tool; alternatives like find or locate operate on filenames, not file contents.

Why this answer

'grep' (global regular expression print) searches a file or input stream for lines matching a pattern and prints them. Running 'grep ERROR syslog' scans the syslog file and outputs every line containing 'ERROR', which is exactly the task described.

Exam trap

The trap is that 'find' and 'grep' are both search commands, but 'find' searches the filesystem for files while 'grep' searches file contents for text — candidates who conflate the two pick 'find' for a content-search task.

How to eliminate wrong answers

Option A is wrong because 'cat' concatenates and prints entire files — 'cat ERROR syslog' would try to open a file literally named 'ERROR' and then print syslog in full, not filter it. Option B is wrong because 'find' searches the filesystem for files matching criteria like name or size; it does not search file contents for a string. Option D is wrong because 'sed' is a stream editor used for substitution, deletion, and transformation — 'sed ERROR syslog' would treat 'ERROR' as a sed script and likely error out, not search for the string.

101
MCQhard

An administrator creates a directory `/srv/dropbox` with mode 1777 so that several contractors can deposit files. Later, one contractor reports that a file they uploaded vanished, and `ls -l /srv/dropbox` shows the directory still has its sticky bit set. Which statement best explains the situation?

A.The sticky bit prevents deletion only by non-owners, so the file's owner or the directory owner could still remove it.
B.Files in a sticky directory are moved to a hidden trash folder when the session ends.
C.The sticky bit only takes effect when the directory is also setgid, so it had no protective effect here.
D.The sticky bit was cleared by the upload and the directory now behaves as a normal world-writable directory.
AnswerA

On a directory, the sticky bit restricts deletion so that only the file's owner, the directory's owner, or root may unlink an entry. A contractor who owns the removed file, or the administrator who owns the directory, can legitimately delete it. The sticky bit therefore does not guarantee permanence; it only blocks unrelated users from removing other people's files.

Why this answer

The sticky bit on a directory limits deletion to the file's owner, the directory's owner, and root. Because contractors own their uploaded files and the administrator owns the directory, either could have unlinked the missing entry through normal means. The bit was never a guarantee against removal by those parties, so the disappearance is consistent with the directory's configured behavior.

Exam trap

The trap here is treating the sticky bit as absolute protection against deletion, when it merely excludes users who neither own the file nor the directory.

102
Multi-Selectmedium

Which TWO of the following are valid ways to view system logs?

Select 2 answers
A.lsmod
B.ifconfig
C.top
D.journalctl
E.dmesg
AnswersD, E

`journalctl` reads the systemd journal, exposing kernel and service messages through one queryable interface. It satisfies the stem's requirement for a valid log-viewing method on systemd-based Linux distributions, supporting filters by unit, priority and time. This contrasts with plain text files such as `/var/log/syslog`, which lack structured querying.

Why this answer

Option D (journalctl) is correct because it is the systemd utility for querying the systemd journal, allowing you to view system and service logs (e.g., journalctl -u sshd, journalctl -b). Option E (dmesg) is correct because it prints the kernel ring buffer, showing kernel and hardware-related log messages such as boot and driver events. The unmarked options do not belong: lsmod lists loaded kernel modules, ifconfig configures/displays network interfaces, and top shows live process and resource usage — none of these display system logs.

Exam trap

010-160 often tests the difference between monitoring tools and log-viewing tools, so candidates pick top or ifconfig because they are familiar diagnostic commands, missing that they do not display logs.

103
MCQeasy

An administrator wants to view the current system load and active processes. Which utility is the most appropriate for a real-time monitor?

A.df -T
B.ps aux
C.cat /proc/cpuinfo
D.top
AnswerD

top provides a continuously refreshing real-time view of system load, CPU and memory usage, and active processes, satisfying the stem's real-time monitor constraint. Alternatives like ps or uptime give only static snapshots, so top is the appropriate utility here.

Why this answer

The `top` command provides a real-time, continuously updating view of system load, CPU usage, memory usage, and active processes, refreshing by default every few seconds. It is the standard interactive utility for live monitoring of system load and processes on Linux. This matches the requirement for a real-time monitor.

Exam trap

The trap is confusing a static snapshot (`ps aux`) with a real-time monitor (`top`) — candidates may pick ps because it also shows processes, but it does not update continuously or show system load in real time.

How to eliminate wrong answers

Option A is wrong because `df -T` reports disk space usage and filesystem types, not system load or processes. Option B is wrong because `ps aux` gives a static snapshot of processes at the moment it is run, not a real-time updating monitor. Option C is wrong because `cat /proc/cpuinfo` displays static CPU hardware information, not dynamic load or process activity.

104
Multi-Selecthard

Which TWO of the following locations or methods are commonly used to define where a user's home directory is located?

Select 2 answers
A.The useradd -d flag
B./etc/passwd file
C.The /etc/profile file
D.The /etc/group file
E.The /etc/shadow file
AnswersA, B

The useradd -d flag explicitly sets the home directory path at account creation, overriding the default /home/username convention. It writes that value into the new user's /etc/passwd entry, satisfying the requirement to define the location.

Why this answer

Option A (the useradd -d flag) is correct because useradd -d /path/to/home explicitly sets the home directory field (field 6) for the new account when the user is created, writing that value into the account database. Option B (/etc/passwd file) is correct because the passwd file stores the home directory as the sixth colon-separated field of each user entry, and this is the authoritative location from which login programs read the user's home directory. Option C (/etc/profile) is not correct because it is a shell startup script that sets environment variables and login behavior, not the home directory definition.

Option D (/etc/group) is not correct because it defines group membership, not user home directories. Option E (/etc/shadow) is not correct because it stores password hashes and aging information, not the home directory path.

Exam trap

The trap is confusing files that store user metadata (/etc/passwd) with files that configure shell environment (/etc/profile) or group/password data (/etc/group, /etc/shadow).

105
MCQmedium

You are in the directory '/home/alex/projects' and want to switch to the parent directory of your current location using a relative path. Which command accomplishes this?

A.cd /
B.cd .
C.cd ..
D.cd ~
AnswerC

The double dot represents the parent directory in a relative path. Running 'cd ..' from '/home/alex/projects' moves you up one level to '/home/alex'. This directly satisfies the requirement to switch to the parent directory using a relative path, without needing an absolute path.

Why this answer

In relative path notation, '..' denotes the parent directory. Executing 'cd ..' from '/home/alex/projects' changes the working directory to '/home/alex', which is exactly the parent of the current location. The other options either stay in place, jump to root, or jump to the home directory.

Exam trap

The trap here is mixing up the single dot, which means the current directory, with the double dot, which means the parent directory.

106
Multi-Selecteasy

Which TWO of the following are recognized categories of Linux distributions based on their purpose?

Select 2 answers
A.Hardware-exclusive distributions
B.Closed-source kernel distributions
C.General Purpose distributions
D.Specialized distributions
E.Proprietary-Only distributions
AnswersC, D

General Purpose distributions form a recognised Linux category, covering systems built for everyday desktop, server and workstation use rather than a narrow niche. This satisfies the stem's requirement for purpose-based categories, sitting alongside specialised types such as embedded or security-focused distributions.

Why this answer

Option C (General Purpose distributions) is correct because Linux distributions are commonly categorized by purpose, and general-purpose distros such as Ubuntu, Fedora, and Debian are designed for broad desktop, server, and workstation use across many workloads. Option D (Specialized distributions) is also correct because this category covers distros built for a specific purpose, such as Kali Linux for penetration testing, pfSense for firewalling/routing, or Raspbian for Raspberry Pi hardware. Options A, B, and E are not recognized purpose-based categories: 'hardware-exclusive' is not a standard classification (hardware-targeted distros fall under specialized), the Linux kernel is open source so 'closed-source kernel distributions' is not a valid category, and 'proprietary-only' is not a recognized distribution category since most distros mix open-source and some proprietary components.

Exam trap

The trap is that plausible-sounding but invented categories ('hardware-exclusive', 'proprietary-only') tempt candidates who don't know the official LPI taxonomy, which recognizes only general-purpose and specialized distributions as purpose-based categories.

107
MCQmedium

A junior administrator runs `chmod g+s /srv/reports` on a directory that is owned by root:finance and then creates a file inside it as the user `alice`, who is a member of the finance group. Which ownership will the newly created file have?

A.root:finance, because the directory owner's group is inherited and the owner is root
B.alice:root, because the file inherits the group of the parent process's effective user
C.alice:alice, because the creating user's primary group is always used
D.alice:finance, because SGID on a directory forces group inheritance from the directory
AnswerD

Setting the SGID bit on a directory makes every file and subdirectory created inside it inherit the directory's group instead of the creator's primary group. Since alice creates the file in /srv/reports, which is owned by root:finance, the file becomes alice:finance. This is exactly the behaviour chmod g+s is used to achieve for shared project directories.

Why this answer

The SGID bit on a directory changes group inheritance: files and subdirectories created within it receive the directory's group rather than the creator's primary group. Because /srv/reports is owned by root:finance, alice's new file is recorded as alice:finance. This is the standard mechanism for keeping shared project directories consistently group-owned so that all members of finance retain access.

Exam trap

The trap here is confusing the SGID bit on a directory, which controls group inheritance, with the SGID bit on an executable, which controls the effective group ID during execution.

108
MCQeasy

A user named bob has a primary group of users and is also a member of the group auditors. He creates a new file called notes.txt in his home directory. The system's default umask is 022. Which command would change the group ownership of notes.txt to auditors without altering its permissions?

A.chmod g+auditors notes.txt
B.usermod -g auditors notes.txt
C.chown auditors notes.txt
D.chgrp auditors notes.txt
AnswerD

chgrp changes the group ownership of a file. Since bob is a member of the auditors group, he can change the group of his own file to auditors, provided the file's permissions allow it. This command does not modify the mode bits, so the existing permissions remain intact, which matches the requirement exactly.

Why this answer

To change only the group ownership of a file, the correct tool is chgrp. Because bob is a member of the auditors group, he has the necessary privilege to assign that group to his own file. The chgrp command leaves all permission bits untouched, satisfying the requirement to change group ownership without altering permissions.

Exam trap

The trap here is confusing chown and chgrp, or assuming that chmod can assign a group name, when only chgrp or chown with a colon can change group ownership.

109
MCQhard

A user runs `umask` and sees `0022`. They create a new regular file with `touch report.txt`. Which permissions will the new file most likely have, and why?

A.-rw-------, because the umask removes all group and other access on files.
B.-rw-rw-r--, because the umask is added to the base mode rather than subtracted.
C.-rwxr-xr-x, because the umask is subtracted from a base of 777 for all new objects.
D.-rw-r--r--, because the umask is subtracted from a base of 666 for regular files.
AnswerD

Regular files are created without execute permission, so the starting mode is 666. Clearing the bits set in umask 022 removes group and other write, leaving 644, displayed as rw-r--r--. This matches the observed behavior for touch and most file-creating programs that do not request a different mode.

Why this answer

For regular files, the requested creation mode is 666 because the kernel withholds execute bits from the base; the umask is then used to clear the corresponding bits. With umask 0022, group and other write are cleared, yielding 644, which ls shows as rw-r--r--. Directories differ because their base is 777, which is why the same umask produces rwxr-xr-x on a new directory.

Exam trap

The trap here is assuming the umask is subtracted arithmetically from 777 for every object, when regular files actually start from 666 and directories from 777.

110
MCQhard

A developer is writing an application that performs heavy system-level calls. Why would they choose to use Linux for this development?

A.Because the source code is transparent, allowing for deep optimization and debugging.
B.Because it is the only operating system that supports multi-threading.
C.Because Linux has a graphical user interface that is mandatory for all applications.
D.Because Linux only runs on x86 hardware.
AnswerA

Open-source code lets the developer inspect and modify kernel and library internals, so heavy system-level calls can be traced and optimised directly. This transparency satisfies the need for deep debugging and tuning that closed-source platforms restrict.

Why this answer

Linux's open-source nature means developers can inspect, modify, and rebuild the kernel and system libraries, which is invaluable for debugging system-level calls, profiling performance, and optimizing code paths. This transparency enables deep visibility that closed-source operating systems cannot offer without vendor support.

Exam trap

The trap is selecting an option that sounds like a Linux advantage but is actually a universal OS feature (multi-threading) or a false absolute ('only OS', 'mandatory GUI', 'only x86') — absolutes are almost always wrong on Linux exams.

How to eliminate wrong answers

Option B is wrong because multi-threading is supported by virtually all modern operating systems, including Windows and macOS — Linux is not unique in this regard. Option C is wrong because a graphical user interface is not mandatory on Linux; many servers run headless without any GUI, and applications do not require one. Option D is wrong because Linux runs on a vast range of architectures including x86, ARM, RISC-V, POWER, and s390x, far beyond just x86 hardware.

111
MCQmedium

A user wants to run a command that will continue running even after the terminal is closed. Which command should be used to achieve this?

A.nohup ./long_script.sh &
B.screen ./long_script.sh
C.bg ./long_script.sh
D.disown ./long_script.sh
AnswerA

The nohup command makes a process immune to hangup signals, so it continues running after the terminal closes. The ampersand (&) runs it in the background. This combination ensures the script persists beyond the session, which is exactly what the user needs.

Why this answer

To keep a process running after the terminal closes, use nohup to ignore hangup signals and & to run it in the background. This detaches the process from the terminal's session. The other commands either do not start a new process, require a different syntax, or do not prevent termination on terminal close.

Exam trap

The trap here is confusing job control commands like bg and disown with process detachment tools, or misusing screen syntax.

112
Multi-Selecteasy

Which TWO of the following are valid ways to get help on a Linux system?

Select 2 answers
A.search
B.man
C.findhelp
D.help
E.explain
AnswersB, D

The man command displays the system's reference manual pages, giving authoritative documentation for commands, configuration files and system calls. It satisfies the stem's requirement for a valid way to obtain help on a Linux system.

Why this answer

Option B, `man`, is correct because the manual page system is the standard Linux documentation interface, invoked as `man <command>` to display the reference manual for a command, system call, or configuration file. Option D, `help`, is correct because it is a valid built-in command in shells like Bash that prints usage information for shell built-ins (e.g., `help cd`), and it also appears as a common `--help` option on many utilities. The other options are not valid Linux help mechanisms: `search` is not a help command (it resembles Windows' `search` or unrelated tools), `findhelp` is not a standard Linux command, and `explain` is not a Linux help utility.

Exam trap

The trap is assuming that any plausible-sounding word ('search', 'findhelp', 'explain') is a real Linux command — the exam tests whether you know the actual standard tools: 'man', 'info', 'help', and '--help'.

113
MCQmedium

A small business owner wants to reduce licensing costs and gain the ability to inspect and customize the software running on point-of-sale terminals. Which combination of characteristics best describes the type of software she should adopt?

A.Software released under a shared-source license that forbids commercial use
B.Software provided as free-of-charge binaries without source code
C.Software distributed with source code that permits modification and redistribution
D.Software licensed per device with vendor-controlled update channels
AnswerC

Open source software is distributed with its source code and a license that allows inspection, modification, and redistribution. This directly enables the owner to audit the code for security, adapt it to her point-of-sale needs, and avoid recurring license fees. It matches both of her stated goals: lower cost and the freedom to customize the terminals.

Why this answer

The owner needs two things at once: no licensing fees and the freedom to inspect and change the software. Only software distributed with source code under a license permitting modification and redistribution delivers both. Freeware, per-device proprietary licensing, and restricted shared-source models each block at least one of those requirements.

Exam trap

The trap here is equating 'free of charge' with 'open source', when the defining feature is the freedom to inspect, modify, and redistribute the source code.

114
Multi-Selectmedium

Which TWO of the following are common benefits of using open source software in an enterprise environment?

Select 2 answers
A.The inability to modify software
B.Reduced total cost of ownership (TCO) compared to proprietary alternatives
C.Avoidance of vendor lock-in
D.Mandatory inclusion of proprietary drivers
E.Guaranteed 100% bug-free performance
AnswersB, C

Open source removes per-seat licence fees and often lowers support and integration costs, directly delivering the reduced total cost of ownership the stem asks about. Enterprises can deploy at scale without recurring proprietary licensing charges, making TCO reduction a commonly cited benefit of open source adoption.

Why this answer

Option B is correct because open source software is typically available at no licensing cost and can be deployed on commodity hardware, which lowers acquisition, maintenance, and upgrade expenses and thus reduces total cost of ownership (TCO) versus proprietary alternatives. Option C is correct because open source code and open standards let an enterprise inspect, modify, and migrate the software, so it is not contractually or technically tied to a single vendor's roadmap, pricing, or proprietary formats, thereby avoiding vendor lock-in. Option A is wrong because open source licenses explicitly permit modification of the source code, which is the opposite of the stated inability.

Option D is wrong because proprietary drivers are not a mandatory part of open source software; many projects use open drivers or optional binary blobs. Option E is wrong because no software, open or proprietary, can guarantee 100% bug-free performance.

Exam trap

The trap is the absolutist framing — options like 'guaranteed bug-free' or 'inability to modify' sound plausible to candidates who conflate open source with 'free but unsupported' or who assume all software has hidden restrictions.

115
MCQmedium

To add a new user named 'guest' and set their home directory to '/home/guest', which command is correct?

A.useradd -m -d /home/guest guest
B.usermod -d /home/guest guest
C.useradd -h /home/guest guest
D.addhome guest
AnswerA

The `-m` flag creates the home directory, while `-d /home/guest` explicitly sets its path, satisfying the requirement to both add the user and define the home directory in one command. Without `-m`, `useradd` would not create the directory, leaving the specified path absent.

Why this answer

useradd -m -d /home/guest guest creates the account 'guest', sets its home directory to /home/guest via -d, and -m ensures the directory is actually created and populated with skeleton files from /etc/skel. Without -m, useradd would record the home path but not create it.

Exam trap

The trap is the -d versus -m distinction: candidates assume specifying -d is enough to create the home directory, but on RHEL-based systems you must also pass -m or the directory will not exist.

How to eliminate wrong answers

Option B (usermod -d /home/guest guest) is wrong because usermod modifies an existing account; it cannot create the 'guest' user, and without -m it will not create the directory either. Option C (useradd -h /home/guest guest) is wrong because useradd has no -h option for home directory — -h is not a valid flag (it would be rejected), and the correct flag is -d. Option D (addhome guest) is wrong because no such standard command exists; it is a fabricated distractor.

116
MCQmedium

A file named payroll.csv has permissions -rw-r-----. The user owner is carol, and the group owner is hr. A user named dave, who is not carol and not a member of hr, attempts to read the file. What will happen?

A.Dave will be granted read access because the owner has read permission and all users inherit owner permissions.
B.Dave will be denied access because the file is not world-readable, regardless of group membership.
C.Dave will be granted read access because the group has read permission and he is a regular user.
D.Dave will be denied access because he falls into the 'others' category, which has no read permission.
AnswerD

The permission string -rw-r----- indicates that the owner has read and write, the group has read only, and others have no permissions. Since dave is neither the owner nor a member of the hr group, he is classified as 'others'. The absence of any permission bits for others means the kernel will deny his read attempt with a permission denied error.

Why this answer

Linux evaluates file permissions by checking the most specific category that applies to the user: owner first, then group, then others. Dave is not the owner and not in the hr group, so he falls into the others category, which has no permissions. Consequently, the kernel denies his read request, and he receives a permission denied error.

Exam trap

The trap here is assuming that group permissions apply to all users, when in fact they apply only to users who are members of the file's group.

117
MCQhard

A user wants to create a compressed archive of the directory /home/user/project, including all its subdirectories, and name the archive project.tar.gz. Which command should be used?

A.zip -r project.tar.gz /home/user/project
B.tar -czf project.tar.gz /home/user/project
C.gzip -r /home/user/project
D.tar -xzf project.tar.gz /home/user/project
AnswerB

The tar command with -c creates a new archive, -z compresses it with gzip, and -f specifies the archive filename. Including the directory path archives the entire directory tree. This command correctly creates project.tar.gz containing the project directory and its contents.

Why this answer

To create a gzip-compressed tar archive, the tar command with -c, -z, and -f options is used. The -c flag creates a new archive, -z applies gzip compression, and -f specifies the output filename. Providing the directory path archives the entire directory tree.

Other commands either extract, compress individual files, or create a different archive format.

Exam trap

The trap here is confusing the -c (create) and -x (extract) options of tar, or assuming that zip with a .tar.gz name produces a tar.gz file.

118
Multi-Selectmedium

You are reviewing a shell script and need to identify commands that are handled internally by the shell rather than by launching a separate executable. Which two of the following are shell builtins? (Choose two.)

Select 2 answers
A.cd
B.tar
C.grep
D.export
E.ls
AnswersA, D

Changing the current working directory affects the shell process itself, so cd must be implemented as a builtin. A separate executable could change only its own working directory and then exit, leaving the parent shell unchanged. That is why cd appears in the shell's builtin list and cannot be replaced by an external binary in normal use.

Why this answer

Builtins execute inside the shell process because they must alter shell state or avoid process overhead. cd changes the working directory of the shell itself, and export modifies the environment inherited by child processes. Neither effect could persist if the command ran as a separate executable, which is why both are implemented internally alongside others such as echo, pwd, and read.

Exam trap

The trap here is assuming any frequently typed command must be a builtin, when commands like ls and grep are external binaries that merely happen to be convenient.

119
Multi-Selecthard

Which THREE of the following are components of a standard network configuration?

Select 3 answers
A.Subnet mask
B.IP address
C.Shell prompt
D.Kernel version
E.Default gateway
AnswersA, B, E

A subnet mask is a fundamental component of a standard network configuration because it defines which portion of an IP address identifies the network and which identifies the host. This enables devices to determine whether a destination is local or must be reached through a gateway, satisfying the requirement for basic IP addressing configuration.

Why this answer

A standard network configuration on a host requires an IP address (B) to uniquely identify the interface on the network, a subnet mask (A) to define which portion of the address is the network prefix and which is the host portion (enabling local vs. remote delivery decisions), and a default gateway (E) so that traffic destined for networks outside the local subnet is forwarded to the next-hop router. These three values are the classic IPv4 host parameters (often delivered via DHCP or set statically with ip addr/ip route or ifconfig/route). By contrast, the shell prompt (C) is just the command-line interface indicator and has no bearing on network reachability, and the kernel version (D) describes the OS build rather than any addressing or routing parameter, so neither belongs in a network configuration.

Exam trap

The trap is including plausible-but-irrelevant system attributes — shell prompt and kernel version sound technical, so candidates may assume they belong to network configuration, but only IP address, subnet mask, and default gateway are the actual addressing components.

120
MCQhard

You are setting up a local network and need to verify the path traffic takes to reach a remote host. Which command should you use?

A.traceroute
B.nmap
C.ping
D.dig
AnswerA

Traceroute maps the hop-by-hop path to a remote host by sending packets with incrementally increasing TTL values, forcing each router along the route to reply. This directly satisfies the requirement to verify the path traffic takes, unlike ping, which only confirms reachability.

Why this answer

`traceroute` is designed to map the path packets take to a remote host by sending probes with incrementally increasing TTL values and collecting ICMP Time Exceeded responses from each hop. This directly answers the question of which routers traffic traverses to reach the destination.

Exam trap

The trap is confusing reachability tools (ping) with path-discovery tools (traceroute) — candidates who see 'verify path' may think ping because it tests connectivity, but only traceroute enumerates intermediate hops.

How to eliminate wrong answers

Option B is wrong because `nmap` is a port scanner and network mapper — it discovers open ports and services on hosts, not the hop-by-hop path to a destination. Option C is wrong because `ping` only verifies reachability and round-trip time to a single host using ICMP Echo; it does not reveal intermediate hops. Option D is wrong because `dig` is a DNS query tool that resolves names and records; it has nothing to do with network path discovery.

121
MCQeasy

Which of these is a common advantage of using a Linux-based operating system in a professional development environment?

A.It prevents developers from making any syntax errors.
B.It automatically deploys code to production servers without testing.
C.It has native compatibility with standard development tools like GCC, Git, and Docker.
D.It is the only OS that allows writing Python code.
AnswerC

Linux distributions ship with GCC, Git and Docker readily available through native package managers, so developers install and run these tools without compatibility layers or emulation. This satisfies the stem's requirement for a common advantage in professional development environments, where toolchain friction directly slows delivery.

Why this answer

Linux distributions ship with or easily install the standard toolchain developers rely on, including GCC, Git, Docker, Python, and package managers like apt or yum. This native compatibility makes Linux the default environment for many development, CI/CD, and container workflows. The other options describe impossible or nonsensical benefits.

Exam trap

The trap is selecting an exaggerated or magical benefit (like preventing syntax errors or auto-deploying code) instead of the realistic, well-known compatibility advantage of Linux in development.

How to eliminate wrong answers

Option A is wrong because no operating system prevents syntax errors; that is the job of compilers, linters, and IDEs, not the OS. Option B is wrong because automatic deployment without testing is a dangerous anti-pattern, not a feature of Linux, and deployment requires configured CI/CD pipelines. Option D is wrong because Python runs on Windows, macOS, and Linux; Linux is not the only OS that supports it.

122
MCQmedium

A systems administrator is documenting a server and wants to record which kernel release is currently running, including any distribution-specific patch level, for compatibility checks with a third-party driver. Which command should be used to display this information?

A.lsb_release -a
B.uname -r
C.hostnamectl status
D.cat /etc/os-release
AnswerB

uname -r prints the kernel release string, which includes the upstream version and often the distribution's patch or build suffix. This is exactly the value driver vendors ask for when checking compatibility. It is the standard, concise way to report the running kernel release without extra system details.

Why this answer

The kernel release string, including distribution patch suffixes, is obtained with uname -r. Distribution identification tools and files describe the OS release rather than the kernel. When a third-party driver requires the exact running kernel release, uname -r is the direct and correct source.

Exam trap

The trap here is mixing up distribution version information with the running kernel release string.

123
Multi-Selecteasy

Which TWO of the following are common types of Linux career roles?

Select 2 answers
A.Site Reliability Engineer (SRE)
B.System Administrator
C.Desktop Operating System Developer
D.Proprietary Software Sales Manager
E.Database Hardware Architect
AnswersA, B

Site Reliability Engineer is a recognised Linux-oriented role, applying software engineering to operations, automation, monitoring and incident response on Linux-based infrastructure. It appears alongside System Administrator and DevOps Engineer as a standard career path in the Linux professional landscape.

Why this answer

Option A, Site Reliability Engineer (SRE), is correct because SRE is a well-established Linux-centric role that applies software engineering to operations, typically managing large-scale Linux fleets with automation, monitoring (e.g., Prometheus), and configuration management tools like Ansible or Terraform. Option B, System Administrator, is correct because administering Linux servers—user/group management, package management via apt/yum/dnf, systemd services, permissions, and networking—is one of the most common and traditional Linux career paths. Option C, Desktop Operating System Developer, is not a standard Linux career category; desktop development is a niche software-engineering specialization rather than a common Linux role.

Option D, Proprietary Software Sales Manager, is a sales/business role unrelated to Linux technical administration or engineering. Option E, Database Hardware Architect, is a specialized hardware/database design role and not a commonly recognized Linux career track.

Exam trap

The trap here is that candidates might confuse niche technical roles (e.g., Desktop OS Developer) as common Linux careers, or overlook that sales and hardware architecture are not core Linux roles.

124
MCQmedium

A system administrator needs to change the permissions of a script named backup.sh so that the owner can read, write, and execute it, while group members and others can only read and execute it. Which command accomplishes this?

A.chmod 644 backup.sh
B.chmod 755 backup.sh
C.chmod 777 backup.sh
D.chmod 750 backup.sh
AnswerB

The numeric mode 755 sets owner permissions to read, write, and execute (7), and group and others to read and execute (5). This exactly matches the requirement: the owner gets full control, while group and others can read and execute but not write. It is a standard way to make a script executable for everyone while restricting write access.

Why this answer

The requirement is owner read/write/execute (7), group read/execute (5), others read/execute (5). Numeric mode 755 represents exactly that combination. The other modes either omit execute permissions, grant excessive write access, or remove permissions from others entirely, so they do not match the specified access policy.

Exam trap

The trap here is confusing the numeric values for read, write, and execute, or forgetting that the three digits correspond to owner, group, and others in that order.

125
MCQeasy

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

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

pwd prints the absolute path of the current working directory to standard output, directly answering the requirement to display the current directory path. Commands such as ls list directory contents instead, and cd changes directory rather than reporting it.

Why this answer

The 'pwd' command (print working directory) outputs the absolute path of the directory the shell is currently in. It reads the shell's current directory state and prints it to standard output, which is exactly what the question asks for.

Exam trap

The trap is confusing directory-listing commands (ls, dir) with directory-path commands (pwd) — candidates who skim the question may pick 'ls' because it is the most familiar directory-related command.

How to eliminate wrong answers

Option A is wrong because 'ls' lists the contents of a directory (files and subdirectories), not the directory's own path. Option B is wrong because 'dir' is a DOS/Windows command that lists directory contents; on Linux it exists only as an alias for 'ls' in some shells and still does not print the path. Option D is wrong because 'cd' changes the current directory rather than displaying it — running 'cd' with no argument goes to $HOME, and 'cd /path' moves into that path.

126
MCQeasy

A user wants to change the permissions of a file named 'data.txt' so that the owner can read and write, the group can read, and others have no access. Which command achieves this?

A.chmod 644 data.txt
B.chmod 640 data.txt
C.chmod 600 data.txt
D.chmod 604 data.txt
AnswerB

The numeric mode 640 sets permissions as follows: owner read and write (6), group read (4), and others none (0). This matches the requirement exactly. The chmod command with a three-digit octal number applies these permissions to the file, making it the correct choice for this scenario.

Why this answer

The octal permission 640 translates to rw- for the owner, r-- for the group, and --- for others. This precisely matches the requested access: owner read/write, group read, others none. The other modes either grant others access, omit group read, or both, so they do not fulfill the requirement.

Exam trap

The trap here is mixing up the order of permission digits, leading to granting access to the wrong class of users.

127
Multi-Selecthard

Which THREE of the following are fundamental freedoms guaranteed by the Free Software Definition?

Select 3 answers
A.Freedom to run the program for any purpose
B.Freedom to study how the program works
C.Freedom to redistribute copies to others
D.Freedom to forbid others from copying the code
E.Freedom to make the program proprietary
AnswersA, B, C

Running the program for any purpose is Freedom 0 of the Free Software Definition, requiring no restriction on use by any person or organisation. This satisfies the stem's demand for a guaranteed fundamental freedom, as the definition explicitly lists unrestricted execution as the first of its four freedoms.

Why this answer

Option A is correct because the Free Software Definition's Freedom 0 guarantees the freedom to run the program as you wish, for any purpose. Option B is correct because Freedom 1 guarantees the freedom to study how the program works and change it, with access to the source code being a precondition. Option C is correct because Freedom 2 guarantees the freedom to redistribute copies to others, and Freedom 3 covers distributing modified versions.

Option D is not part of the definition because forbidding others from copying directly contradicts the freedom to redistribute copies. Option E is not part of the definition because making the program proprietary would restrict the freedoms to study, modify, and redistribute, which the Free Software Definition requires.

Exam trap

The trap here is conflating 'free software' with 'freeware' or 'open source' — candidates may incorrectly think freedom means the ability to restrict others (proprietary) rather than the obligation to preserve user freedoms.

128
Multi-Selecteasy

Which THREE of the following represent ways to gain practical experience with Linux?

Select 3 answers
A.Installing and configuring Linux in a virtual machine
B.Buying a pre-configured, locked-down appliance
C.Setting up a home lab server
D.Contributing code to an open source project
E.Only reading documentation without using the terminal
AnswersA, C, D

Installing Linux in a virtual machine provides hands-on exposure to partitioning, package management and system configuration without risking existing hardware. This directly satisfies the stem's requirement for practical experience, since the learner performs real installation and administration tasks rather than merely reading about Linux concepts.

Why this answer

Option A is correct because installing and configuring Linux in a virtual machine (e.g., using VirtualBox, VMware, or KVM) gives hands-on practice with partitioning, package management, bootloaders, and system configuration in a safe, disposable environment. Option C is correct because setting up a home lab server (for example, running services like SSH, Apache/Nginx, Samba, or DNS on a spare machine or Raspberry Pi) builds real operational skills in networking, permissions, and service management. Option D is correct because contributing code to an open source project requires working with Linux-based toolchains such as git, make, gcc, and shell scripting, and often involves reading and modifying real codebases under Linux.

Option B is not correct because a pre-configured, locked-down appliance hides the underlying Linux internals and offers little to no administrative or configuration practice. Option E is not correct because passively reading documentation without using the terminal does not develop the practical command-line and troubleshooting experience the question asks for.

Exam trap

The trap is choosing passive or appliance-based options that sound convenient but do not actually build the hands-on skills the question asks for.

129
Multi-Selectmedium

Which TWO of the following commands help you move within the directory structure?

Select 2 answers
A.cat
B.ls
C.cd
D.mv
E.popd
AnswersC, E

The cd built-in changes the shell's current working directory, which is precisely the act of moving within the directory structure. It accepts absolute paths, relative paths, .., and ~, satisfying the stem's requirement for navigation rather than file listing or content display.

Why this answer

Option C, cd, is correct because it is the shell built-in that changes the current working directory, allowing you to move up, down, or across the directory tree (e.g., cd /var/log or cd ..). Option E, popd, is correct because it removes the top entry from the directory stack and changes the current working directory to the newly exposed directory, effectively moving you within the directory structure. Option A, cat, is wrong because it concatenates and displays file contents rather than changing your location.

Option B, ls, is wrong because it only lists directory contents without changing the working directory. Option D, mv, is wrong because it moves or renames files and directories, not the shell's current working directory.

Exam trap

The trap is confusing file-manipulation commands (mv, cat) with directory-navigation commands (cd, popd) — candidates who think mv 'moves you' pick the wrong answer.

130
Multi-Selectmedium

Which THREE of the following are common shell built-in command types?

Select 3 answers
A.echo
B.cd
C.grep
D.tar
E.export
AnswersA, B, E

echo is a shell built-in implemented within the shell itself rather than as a separate executable, so it runs without spawning a child process. This matches the stem's criterion for common shell built-in command types, alongside cd and export.

Why this answer

echo (A) is a shell built-in because most shells implement it internally to print arguments to standard output, and it is listed among the shell's built-in commands. cd (B) must be a built-in since changing the current working directory affects the shell process itself, and an external program could not alter its parent shell's directory. export (E) is a built-in because it sets or modifies environment variables in the current shell's environment, which external commands cannot do for the parent shell. grep (C) and tar (D) are external utilities located as separate executables (e.g., /usr/bin/grep, /bin/tar) rather than shell built-ins, so they do not belong.

Exam trap

The trap is assuming any command you type at the prompt is a built-in — candidates forget that grep and tar are external binaries, and that the defining test is whether the command must run inside the shell process to affect shell state.

131
Multi-Selectmedium

Which THREE of the following commands are used for viewing file metadata or status?

Select 3 answers
A.ls -l
B.stat
C.file
D.cat
E.cd
AnswersA, B, C

`ls -l` satisfies the metadata-viewing requirement by reading directory entries and printing each file's inode attributes: permission bits, hard-link count, owner, group, byte size, and modification timestamp. This long-format listing exposes exactly the status fields the stem requests, unlike plain `ls`, which shows only names.

Why this answer

Option A, `ls -l`, is correct because the long-listing format displays file metadata such as permissions, hard-link count, owner, group, size, and modification timestamp for each file. Option B, `stat`, is correct because it explicitly reports file status/metadata including inode number, size, block count, access/modify/change times, and device information. Option C, `file`, is correct because it inspects file content and reports the file type (e.g., ASCII text, ELF binary, directory), which is file status information.

Option D, `cat`, is not correct because it concatenates and prints file contents rather than showing metadata. Option E, `cd`, is not correct because it changes the shell's current working directory and displays no file metadata or status.

Exam trap

The trap here is confusing commands that display file *contents* (cat, less, head) with commands that display file *metadata* (ls -l, stat, file) — candidates often pick cat because it 'shows the file'.

132
MCQmedium

A Linux administrator needs to check which shell is currently assigned to the user account 'jdoe' in the system's user database, without logging in as that user. Which command will display this information?

A.grep jdoe /etc/passwd
B.echo $SHELL
C.ps -u jdoe
D.whoami
AnswerA

The /etc/passwd file contains one line per user account, with fields separated by colons; the seventh field is the login shell. Searching for the username jdoe displays that account's entry, including the assigned shell, without requiring a login as that user. This directly answers the administrator's question and is a standard method for inspecting user account attributes on Linux systems.

Why this answer

User account information, including the login shell, is stored in the /etc/passwd file. Searching that file for the username jdoe reveals the shell assigned to that account. Other commands either report the current user's environment, current identity, or running processes, none of which reliably show another user's configured login shell from the system database.

Exam trap

The trap here is confusing the current session's $SHELL variable with the login shell stored in the user database for a different account.

133
MCQhard

You are managing a Linux server running an application that uses libraries licensed under the LGPL (Lesser General Public License). What is the primary implication of this license?

A.You can link your proprietary code to the library without open-sourcing the proprietary code.
B.You must release your proprietary application's source code if you link it against the library.
C.You are prohibited from using the library in any commercial product.
D.You must pay a royalty fee for every installation of the software.
AnswerA

The LGPL permits linking proprietary code against the licensed library provided users can relink with a modified version of that library. This differs from the GPL, which would require releasing the whole combined work, so proprietary code stays closed under the stem's LGPL constraint.

Why this answer

The LGPL (Lesser General Public License) allows you to link proprietary code against LGPL-licensed libraries without requiring you to open-source your proprietary application. This is the key difference from the GPL, which would require the entire derivative work to be GPL-licensed. The LGPL is designed to encourage the use of free libraries in proprietary software.

Exam trap

The trap is confusing LGPL with GPL — candidates often assume any 'GPL' license requires open-sourcing proprietary code, but the LGPL specifically allows proprietary linking.

How to eliminate wrong answers

Option B is wrong because that is the requirement of the GPL, not the LGPL — the LGPL explicitly permits linking with proprietary code. Option C is wrong because the LGPL does not prohibit commercial use; many commercial products use LGPL libraries. Option D is wrong because the LGPL does not require royalty fees; it is a free software license.

134
MCQeasy

A user named alice is working in /home/alice/projects and wants to navigate to the parent directory of her current location. Which command should she execute?

A.cd ..
B.cd ~
C.cd /
D.cd -
AnswerA

The special directory entry '..' always refers to the parent of the current directory, so running cd .. from /home/alice/projects moves alice up one level to /home/alice. This is the standard, portable way to move to the parent directory in any POSIX-compliant shell, and it does not depend on knowing the absolute path.

Why this answer

The parent directory is represented by the special entry '..', which exists in every directory on a Linux filesystem. Issuing cd .. from /home/alice/projects therefore moves the shell's working directory to /home/alice. The other commands change to different locations: the previous directory, the home directory, or the filesystem root, none of which specifically means 'one level up'.

Exam trap

The trap here is confusing the tilde, which expands to the home directory, with the double-dot entry, which denotes the parent directory.

135
Multi-Selecteasy

Which THREE of the following are components of a standard Linux file path?

Select 3 answers
A.Root directory (/)
B.Terminal color
C.User password
D.Directory names
E.Filename
AnswersA, D, E

The root directory (/) anchors every absolute Linux path, acting as the topmost node from which all other directories descend. Since the question asks for components of a standard file path, the root satisfies this directly: every absolute path begins at /, making it an essential structural element.

Why this answer

A standard Linux file path is built from a starting point and a sequence of names that lead to a target. Option A, the root directory (/), is correct because every absolute path begins at the filesystem root, which is the top of the directory hierarchy. Option D, directory names, is correct because intermediate path components are directory names separated by forward slashes (e.g., /usr/bin), and each names a directory traversed along the way.

Option E, the filename, is correct because the final component of a path identifies the target file (or directory) itself, such as /etc/hosts. The unmarked options do not belong: terminal color (B) is a display/terminal-emulator setting unrelated to path syntax, and a user password (C) is authentication data stored in files like /etc/shadow, not a component of a path.

Exam trap

The trap here is confusing filesystem path syntax with unrelated shell or terminal settings (like color), causing candidates to select non-path items such as terminal color or passwords.

136
Multi-Selecteasy

Which TWO of the following are valid commands for displaying file contents?

Select 2 answers
A.cat
B.touch
C.chmod
D.grep
E.less
AnswersA, E

`cat` concatenates and writes files to standard output, directly displaying a file's contents in the terminal. It satisfies the stem's requirement for a valid display command, and remains one of the two expected answers alongside `less`. Its core purpose is reading files sequentially, making it correct here.

Why this answer

Option A, cat, is correct because the cat command concatenates and prints file contents to standard output, making it a standard way to display a file's contents. Option E, less, is correct because less is a pager that displays file contents one screen at a time and allows scrolling through the file. Option B, touch, is not correct because touch creates empty files or updates file timestamps rather than displaying contents.

Option C, chmod, is not correct because chmod changes file permission modes and does not read or display file data. Option D, grep, is not correct because grep searches for and prints matching lines from input or files, which is a filtering operation rather than a general file-content display command.

Exam trap

The trap is confusing tools that manipulate files (touch, chmod) with tools that display contents, and mistaking grep (a search filter) for a general-purpose viewer.

137
MCQmedium

A user is in '/var/log' and wants to copy the file 'app.log' to '/tmp/archive' while preserving its original permissions, ownership, and timestamps. Which command accomplishes this?

A.mv -a app.log /tmp/archive/
B.cp -a app.log /tmp/archive/
C.cp app.log /tmp/archive/
D.ln -s app.log /tmp/archive/
AnswerB

The -a (archive) option to cp enables recursive copying while preserving mode, ownership, timestamps, and other metadata, effectively combining -dR --preserve=all. Copying a single file with cp -a app.log /tmp/archive/ retains the original attributes, exactly matching the requirement. This is the standard way to duplicate files without losing metadata.

Why this answer

Preserving permissions, ownership, and timestamps during a copy requires cp with the archive option, which bundles recursive copying and full attribute preservation. A plain copy resets attributes, moving removes the source, and creating a symbolic link does not duplicate data. Only the archive-mode copy produces an independent file with metadata intact.

Exam trap

The trap here is believing a basic cp automatically retains ownership and timestamps instead of applying umask-based defaults.

138
MCQhard

A systems engineer is evaluating a Linux distribution for a company that needs long-term stability, commercial support options, and certification for third-party enterprise applications. The company also wants the ability to obtain paid support contracts. Which distribution characteristic best aligns with these requirements?

A.A hobbyist distribution maintained by a single volunteer with no formal release schedule or security response team.
B.An enterprise-focused distribution with a defined support lifecycle, vendor backing, and certification for commercial software.
C.A minimal distribution built from source with no package manager, requiring manual compilation of all software.
D.A community-driven rolling release distribution that receives frequent kernel and library updates with no fixed support lifecycle.
AnswerB

Enterprise distributions such as Red Hat Enterprise Linux or SUSE Linux Enterprise offer defined lifecycles, commercial support contracts, and certification from independent software vendors. This directly matches the company's requirements for stability, paid support, and application certification, making it the best fit for a production enterprise environment.

Why this answer

The company needs long-term stability, commercial support contracts, and certification for third-party applications. Enterprise-focused distributions provide defined lifecycles, vendor support, and ISV certification programs that meet these needs. Rolling releases, source-based builds, and hobbyist projects do not offer the same guarantees, making the enterprise distribution the appropriate choice.

Exam trap

The trap here is equating frequent updates with enterprise readiness; stability, lifecycle guarantees, and vendor certification matter more than having the newest packages.

139
MCQeasy

You are browsing a directory and need to see hidden files alongside regular files. Which command achieves this?

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

The -a flag makes ls list all entries, including dotfiles such as .bashrc and .gitignore that are hidden by default. This directly satisfies the stem's requirement to view hidden files alongside regular ones within the current directory listing.

Why this answer

The 'ls -a' command lists all directory entries, including hidden files (those whose names begin with a dot, like .bashrc or .gitignore). This is the standard way to reveal hidden files alongside regular ones.

Exam trap

The trap is confusing ls flags that sound similar — candidates may pick -l thinking 'long listing shows everything' or -R thinking 'recursive includes hidden', but only -a (or -A) reveals dotfiles.

How to eliminate wrong answers

Option A is wrong because 'ls -R' recursively lists subdirectories but does not show hidden files unless combined with -a. Option B is wrong because 'ls -h' enables human-readable sizes (e.g., 1K, 234M) and has nothing to do with hidden files. Option D is wrong because 'ls -l' produces a long-format listing with permissions, owner, size, and date, but still omits hidden files by default.

140
MCQmedium

A junior administrator is troubleshooting a script and needs to know the exact location of the executable that runs when the command 'grep' is typed, without executing it. Which command should be used?

A.locate grep
B.whereis grep
C.which grep
D.find / -name grep
AnswerC

The which command searches the directories listed in the PATH environment variable and prints the full path of the executable that would be run when the command is invoked. This directly answers the administrator's need to know the exact location without executing the command, and it respects the current shell's PATH order, making it the most appropriate choice.

Why this answer

The which command is designed to locate a command's executable by searching the directories in the PATH environment variable in order, returning the first match that would be executed. This directly addresses the need to identify the exact binary without running it, and it respects the shell's command resolution behavior, unlike broader search tools that may return multiple or irrelevant results.

Exam trap

The trap here is assuming that any file-finding command will reveal the executable that the shell actually uses, when only which respects PATH order and resolves the command as the shell would.

141
Multi-Selecthard

A Linux administrator is auditing user accounts and needs to identify which files store local user account and hashed password information on a typical distribution. (Choose two.)

Select 2 answers
A./etc/passwd
B./etc/sudoers
C./etc/group
D./etc/login.defs
E./etc/shadow
AnswersA, E

/etc/passwd contains one line per local user account with fields for username, UID, GID, home directory, and login shell, so it is a primary source for account auditing. Password hashes are typically replaced by an x placeholder that points to /etc/shadow, but the account metadata itself remains authoritative here.

Why this answer

Local authentication data is split between /etc/passwd, which holds account attributes, and /etc/shadow, which holds the hashed passwords and aging policy. Together they form the complete local user database consulted by tools such as login, su, and passwd. The group file, login defaults, and sudo policy govern membership, defaults, and privilege delegation rather than storing credentials.

Exam trap

The trap here is assuming /etc/passwd still contains password hashes, when on modern systems it holds only an x placeholder and the hashes live in the root-only /etc/shadow.

142
MCQeasy

A developer needs to know the kernel version currently running on the server. Which command provides this information?

A.uname -r
B.ver
C.hostnamectl
D.cat /etc/issue
AnswerA

uname -r prints only the kernel release number, exactly the running kernel version the developer needs. Other uname flags report hardware name, node name or processor type, so they would not satisfy the specific requirement for the kernel version.

Why this answer

`uname -r` prints the kernel release version (e.g., 5.15.0-91-generic) by invoking the uname() system call, which reads kernel information directly. The -r flag specifically returns the kernel release, while -a returns all fields. This is the canonical way to check the running kernel version on Linux.

Exam trap

The trap is picking `hostnamectl` or `/etc/issue` because they also show version-like information — 010-160 tests whether you know the direct, authoritative command for the running kernel.

How to eliminate wrong answers

Option B is wrong because `ver` is a DOS/Windows command that displays the OS version; it does not exist on Linux. Option C is wrong because `hostnamectl` displays hostname and OS information (including kernel version as a side effect on systemd systems), but it is not the standard command for kernel version — the question asks for the kernel version specifically, and `uname -r` is the direct answer. Option D is wrong because `cat /etc/issue` prints the login banner text (e.g., 'Ubuntu 22.04'), which is a static file and may not reflect the actual running kernel.

143
MCQhard

You are trying to troubleshoot why a user cannot connect to your server via SSH. You want to see if the SSH daemon is listening on the appropriate port. Which command should you run?

A.host
B.ping
C.ss -tulpn
D.ip link
AnswerC

The ss -tulpn invocation lists listening TCP and UDP sockets with numeric ports and owning processes, revealing whether sshd is bound to port 22. That directly answers whether the daemon is listening, which ping or netstat alternatives would not confirm as precisely.

Why this answer

The `ss -tulpn` command is the correct choice because it displays all listening TCP and UDP ports along with the associated process names and PIDs. The flags `-t` (TCP), `-u` (UDP), `-l` (listening), `-p` (processes), and `-n` (numeric ports) together provide a comprehensive view of which services are bound to which ports. This directly answers whether the SSH daemon (typically `sshd`) is listening on port 22 (or a custom port).

Exam trap

The trap here is confusing network diagnostic tools: candidates might pick `ping` to test connectivity or `ip link` to check interface status, but neither reveals listening ports; the exam expects you to know that `ss` (or `netstat`) is the correct tool for inspecting open ports and associated services.

How to eliminate wrong answers

Option A is wrong because `host` is a DNS lookup utility used to resolve domain names to IP addresses, not to inspect local listening ports. Option B is wrong because `ping` only tests ICMP reachability to a host and cannot reveal whether a specific TCP port is open or a daemon is listening. Option D is wrong because `ip link` shows the state of network interfaces (e.g., up/down, MAC addresses) but does not list open ports or listening services.

144
MCQmedium

You have created a script but it is not executable. Which command should you use to give the owner execute permissions?

A.chown u+x
B.chgrp u+x
C.chmod u+x
D.chperm u+x
AnswerC

`chmod u+x` adds execute permission for the file's owner only, using the symbolic `u` (user) class and `+x` to grant execution. This directly satisfies the stem's constraint of giving the owner execute rights without altering group or other permissions, unlike numeric modes such as `755` that also widen access.

Why this answer

The 'chmod u+x' command adds execute permission for the user (owner) of the file. 'chmod' is the correct command to change file mode bits, and 'u+x' specifies adding execute permission for the user category. This is the standard way to make a script executable for its owner.

Exam trap

The trap here is confusing commands that modify ownership (chown, chgrp) with those that modify permissions (chmod); candidates may pick 'chown u+x' thinking it grants execute permission.

How to eliminate wrong answers

Option A is wrong because 'chown' changes file ownership, not permissions. Option B is wrong because 'chgrp' changes group ownership, not permissions. Option D is wrong because 'chperm' is not a valid Linux command; permissions are managed with 'chmod'.

145
MCQmedium

A small business owner wants to deploy a free operating system on a point-of-sale terminal but is unsure whether the software's license permits selling the hardware with the OS preinstalled. Which characteristic of open source software licenses directly addresses this concern?

A.The license grants the freedom to distribute copies of the software, including selling them.
B.The license provides a warranty that the software will be free of defects for a specified period.
C.The license requires that the source code be kept secret to protect the vendor's trade secrets.
D.The license requires that any derivative works be distributed under the same license terms.
AnswerA

The freedom to distribute copies, including for a fee, is a fundamental principle of open source licenses as defined by the Open Source Initiative. This directly permits the business owner to sell hardware with the software preinstalled, provided the license terms are met. It ensures that commercial use and redistribution are allowed without requiring royalty payments to the original author.

Why this answer

The freedom to distribute copies, including selling them, is a cornerstone of open source software. It allows businesses to preinstall and sell hardware with open source operating systems without paying royalties. The other options describe unrelated or incorrect license characteristics, such as copyleft, warranty, or secrecy, which do not grant the specific permission needed for commercial redistribution.

Exam trap

The trap here is confusing the freedom to distribute (which allows selling) with copyleft provisions that govern derivative works, leading to an incorrect focus on license inheritance rather than commercial redistribution rights.

146
Multi-Selecthard

A Linux administrator is preparing a machine that must run headless as a file server. She needs to identify which of the following are characteristics of a Linux server installation rather than a typical desktop installation. (Choose two.)

Select 2 answers
A.It commonly runs without a graphical desktop environment, exposing services over the network instead.
B.It cannot run the same Linux kernel as a desktop distribution.
C.It always includes a full office productivity suite installed by default.
D.It requires a dedicated physical display and keyboard to be administered.
E.It prioritizes long-term stability and security updates over receiving the newest upstream software versions.
AnswersA, E

Server installations typically omit a graphical desktop to reduce resource usage and attack surface, and they are managed remotely over SSH or a console. Services such as Samba, NFS, or a web daemon are what matter on such a host, so this accurately describes a headless file server deployment.

Why this answer

Server installations are characterized by headless operation, where services are exposed over the network and administration happens remotely, and by a conservative update philosophy that favors stability and timely security fixes over the newest upstream versions. Those two traits reflect how production file servers are actually built and maintained.

Exam trap

The trap here is equating a server with extra bundled software or special hardware, when the defining traits are headless operation and a stability-focused update policy.

147
Multi-Selectmedium

Which TWO of the following commands help in identifying hardware on a system?

Select 2 answers
A.lspci
B.pwd
C.lsusb
D.whoami
E.date
AnswersA, C

lspci enumerates devices attached to the PCI bus, listing controllers, network adapters and GPUs with vendor and device identifiers. This directly satisfies the stem's goal of identifying hardware, since PCI enumeration reveals installed components without querying higher-level configuration.

Why this answer

lspci (option A) is correct because it enumerates the PCI bus and lists all PCI/PCIe devices such as GPUs, network adapters, and storage controllers, directly identifying hardware on the system. lsusb (option C) is correct because it queries the USB subsystem and lists connected USB devices (vendor and product IDs), which is another direct way to identify hardware. The remaining options do not identify hardware: pwd (B) prints the current working directory, whoami (D) prints the effective username, and date (E) displays the system date and time.

Exam trap

The trap is mixing up system-information commands; candidates may pick pwd or whoami because they are familiar, without checking whether the command actually queries hardware buses.

148
MCQmedium

You suspect that a process is consuming too much CPU. Which command allows you to sort active processes by CPU usage?

A.kill
B.nice
C.top
D.ps -ef
AnswerC

The top command displays a live, continuously refreshed process list sorted by CPU utilisation by default, letting you immediately identify the heaviest consumer. This directly satisfies the requirement to sort active processes by CPU usage, unlike ps, which needs explicit sort flags.

Why this answer

`top` is an interactive process viewer that by default sorts processes by CPU usage in descending order, refreshing every few seconds. It shows PID, user, priority, %CPU, %MEM, and other metrics, making it the go-to tool for spotting CPU-hungry processes in real time.

Exam trap

The trap is picking `ps -ef` because it lists processes — but the question asks specifically for sorting by CPU usage, which `ps -ef` does not do by default; only `top` (or `ps` with an explicit --sort flag) satisfies that requirement.

How to eliminate wrong answers

Option A is wrong because `kill` sends signals to terminate or otherwise affect processes — it does not display or sort them. Option B is wrong because `nice` adjusts a process's scheduling priority; it does not list or sort processes by CPU. Option D is wrong because `ps -ef` produces a static snapshot of all processes in a fixed format and does not sort by CPU usage (you would need `ps aux --sort=-%cpu` for that).

149
MCQmedium

You need to append the output of a command to an existing file without overwriting it. Which operator should you use?

A.|
B.>
C.&
D.>>
AnswerD

The >> operator opens the target file in append mode, writing command output to the end without truncating existing content. A single > would overwrite the file, so >> satisfies the requirement to preserve prior data while adding new output.

Why this answer

The >> operator redirects standard output and appends it to the end of an existing file, preserving the file's current contents. This is the standard shell mechanism for adding output without truncating the file. Using >> is the correct way to log or accumulate command results over time.

Exam trap

The trap is the single vs. double angle bracket — candidates who don't read 'without overwriting' carefully pick > and silently destroy file contents, which is exactly the mistake the question is testing.

How to eliminate wrong answers

Option A is wrong because the pipe (|) sends the output of one command as input to another command, not to a file. Option B is wrong because the single > operator redirects output but truncates (overwrites) the target file, destroying existing content. Option C is wrong because & is used to run a command in the background (or as part of && for conditional execution), not for output redirection.

150
MCQhard

A Linux administrator is reviewing the boot process on a server that uses systemd. She wants to determine which target the system will boot into by default and confirm the current default setting. Which command should she use?

A.systemctl list-units --type=target
B.cat /etc/inittab
C.runlevel
D.systemctl get-default
AnswerD

systemctl get-default queries systemd for the default target, which is usually a symbolic link such as graphical.target or multi-user.target. This directly answers which target the system will start by default, and it is the supported way to confirm the setting before changing it. It reads the /etc/systemd/system/default.target link.

Why this answer

In systemd, the default boot target is stored as a symbolic link and queried with systemctl get-default. Listing active targets or using legacy SysV tools does not reveal the configured default for future boots. This command is the authoritative, supported method to confirm which target the system will start by default.

Exam trap

The trap here is relying on legacy SysV runlevel concepts when the server actually uses systemd targets.

Page 1

Page 2 of 5

Page 3

All pages