Courseiva

LPI Linux Essentials (010-160, v1.6) (010-160) (010-160) — Questions 151190

190 questions total · 3pages · All types, answers revealed

Page 2

Page 3 of 3

151
Multi-Selecthard

Which TWO statements regarding the 'umask' command are correct?

Select 2 answers
A.It can only be set by root.
B.It sets default permissions for new files.
C.It is stored in /etc/shadow.
D.It applies to existing files immediately.
E.It masks bits from being set on new files.
AnswersB, E

Defines what permissions are removed.

Why this answer

Umask defines default permissions for new files and directories, and it acts as a mask by subtracting bits from the maximum possible permission.

152
MCQmedium

To sort the lines of a text file numerically instead of alphabetically, which flag do you use?

A.sort -n
B.sort -f
C.sort -u
D.sort -r
AnswerA

-n treats values as numbers.

Why this answer

-n enables numeric sorting.

153
MCQeasy

Which command-line tool is used to display the groups a specific user belongs to?

A.groups
B.id
C.listgroups
D.whoami
AnswerA

Lists all groups for the user.

Why this answer

The 'groups' command lists all group memberships for a specified username.

154
Multi-Selecteasy

Which TWO of the following are valid ways to list directory contents?

Select 2 answers
A.pwd
B.cd
C.ls
D.cat
E.dir
AnswersC, E

The standard command.

Why this answer

ls and dir are both valid commands for listing files.

155
MCQhard

You want to delete a user account named 'baduser' and also remove their home directory. Which command is correct?

A.deluser --remove baduser
B.userdel -f baduser
C.userdel -r baduser
D.rm -rf /home/baduser && userdel baduser
AnswerC

-r flag performs the removal of home and mail files.

Why this answer

The '-r' flag with 'userdel' removes the user's home directory and mail spool.

156
Multi-Selectmedium

Which THREE of the following represent ways to manipulate command output in a pipe?

Select 3 answers
A.grep
B.cd
C.pwd
D.wc
E.sed
AnswersA, D, E

Filtering by pattern.

Why this answer

grep, sed, and wc are standard stream processing tools.

157
MCQhard

You want to replace every occurrence of 'old' with 'new' in the file 'data.txt' and view the result in the terminal. Which command achieves this?

A.sed 's/old/new/g' data.txt
B.sed 's/old/new/' data.txt
C.grep 's/old/new/g' data.txt
D.sed 'r/old/new/g' data.txt
AnswerA

The 's' command performs substitution with global flag 'g'.

Why this answer

sed 's/old/new/g' replaces all instances of 'old' with 'new' globally in the stream.

158
MCQeasy

Which file permission represents read, write, and execute for the owner, and read-only for group and others?

A.755
B.644
C.700
D.744
AnswerD

744 is rwxr--r--.

Why this answer

7 (rwx) + 4 (r--) + 4 (r--) = 744.

159
Multi-Selectmedium

Which TWO of the following tools allow you to manage disk partitions?

Select 2 answers
A.fdisk
B.parted
C.cat
D.sed
E.grep
AnswersA, B

A common partition management tool.

Why this answer

fdisk and parted are standard tools for disk partition management.

160
MCQmedium

A junior admin is confused about the difference between software RAID and hardware RAID. Which of the following is a primary characteristic of software RAID?

A.It is managed by the OS and kernel.
B.It is always faster than hardware RAID.
C.It is configured in the BIOS.
D.It requires a dedicated controller card.
AnswerA

Software RAID is kernel-based management.

Why this answer

Software RAID is managed by the Linux kernel via the mdadm utility, relying on the host CPU.

161
MCQhard

A user's account has been compromised. Which command is the most effective way to lock the user account immediately while preserving their files?

A.usermod -L jdoe
B.userdel jdoe
C.killall -u jdoe
D.chsh -s /bin/false jdoe
AnswerA

Locks the password without removing user data.

Why this answer

The usermod -L command locks the password, preventing the user from logging in, while keeping the user's home directory and files intact.

162
MCQeasy

A file is owned by root and has permissions 600. What happens if a regular user tries to read this file?

A.The user is prompted for a password.
B.The user can only read but not write.
C.Access is granted.
D.Access is denied.
AnswerD

The user lacks the required read permission.

Why this answer

Permission 600 (rw-------) allows only the owner (root) to read or write. A regular user (not root) will be denied access (Permission denied).

163
MCQmedium

You need to change the ownership of a file to user 'admin'. Which command is the correct way to do this?

A.usermod admin file
B.chown admin file
C.chmod admin file
D.chgrp admin file
AnswerB

chown changes the owner of the file.

Why this answer

The chown command is used to change file ownership.

164
MCQeasy

Which of the following describes the core philosophy of 'Open Source' as defined by the Open Source Initiative?

A.The source code must be available for modification and redistribution.
B.The software must be provided for free without any charge.
C.The code must be written in C or C++.
D.The software must only be used for non-profit purposes.
AnswerA

This is the primary requirement for a license to be considered open source.

Why this answer

The core of open source is the freedom to access, modify, and distribute the source code for any purpose.

165
MCQmedium

You are managing a Linux server and need to confirm the IP address assigned to the eth0 interface. Which command is most appropriate on modern distributions?

A.ifconfig
B.ip addr
C.route -n
D.netstat -rn
AnswerB

ip addr is the recommended command for showing IP configurations.

Why this answer

The ip addr command is the modern standard for displaying network interface configurations.

166
MCQeasy

Which entity is responsible for the overall maintenance and development of the Linux kernel?

A.Debian Project
B.Free Software Foundation
C.Canonical
D.Linux Foundation
AnswerD

The Linux Foundation provides the infrastructure and support for Linux development.

Why this answer

The Linux Foundation and Linus Torvalds coordinate the development of the Linux kernel.

167
Multi-Selecthard

Which THREE of the following files/commands are involved in system startup or services?

Select 3 answers
A./etc/hosts
B./etc/init.d
C.systemd
D./proc/cpuinfo
E.init
AnswersB, C, E

Legacy directory for service scripts.

Why this answer

systemd, init, and the /etc/init.d directory are all standard components of the service management architecture in Linux.

168
MCQhard

An administrator needs to monitor network traffic in real-time on a specific interface. Which tool is commonly used to capture and display packets?

A.netstat
B.tcpdump
C.iptables
D.nmap
AnswerB

tcpdump allows real-time packet capture.

Why this answer

tcpdump is the standard command-line utility for packet capture and analysis.

169
MCQmedium

You are currently in '/home/user/docs' and need to move to '/etc'. Which command is correct?

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

Absolute paths start with /.

Why this answer

cd /etc uses an absolute path to jump directly to the target directory.

170
Multi-Selecthard

Which THREE of the following are types of manual page sections?

Select 3 answers
A.Network protocols (10)
B.User commands (1)
C.System calls (2)
D.File formats (5)
E.Kernel hardware (20)
AnswersB, C, D

Section 1.

Why this answer

User commands, system calls, and file formats are core man page sections.

171
Multi-Selectmedium

Which THREE commands are used to manage user account lifecycle?

Select 3 answers
A.passwd
B.groupadd
C.useradd
D.userdel
E.usermod
AnswersC, D, E

Creates user.

Why this answer

useradd creates, usermod changes, and userdel removes accounts.

172
Multi-Selectmedium

Which THREE of the following are valid flags for the 'tar' command?

Select 3 answers
A.-q
B.-z
C.-x
D.-c
E.-p
AnswersB, C, D

Use gzip compression.

Why this answer

-c, -x, and -z are standard tar flags.

173
MCQmedium

You are copying a directory named 'source' to 'destination' and want to ensure all subdirectories and file attributes are preserved. Which flag is essential?

A.cp -a
B.cp -p
C.cp -v
D.cp -r
AnswerA

-a (archive) preserves everything and is recursive.

Why this answer

The -a (archive) flag is the most efficient way to preserve attributes, permissions, and handle recursive copies.

174
MCQmedium

In the context of the open source community, what is the significance of the term 'fork'?

A.A type of software license that forbids distribution.
B.A project that diverges from the original source to move in a new direction.
C.A way to kill a process in the Linux terminal.
D.A method for merging two disparate codebases into one.
AnswerB

This allows community members to adapt software when they disagree with the project's direction.

Why this answer

A fork occurs when developers take a copy of source code and start a new, independent project.

175
Multi-Selectmedium

Which THREE of the following are environment variables commonly seen in a Linux shell?

Select 3 answers
A.USER
B.ROOT
C.HOME
D.FILE
E.PATH
AnswersA, C, E

Current user name.

Why this answer

PATH, USER, and HOME are core environment variables.

176
MCQmedium

A system administrator wants to check the partition table of a specific disk. Which tool is used for this?

A.fsck
B.df
C.mkfs
D.fdisk
AnswerD

fdisk is used to display or modify partition tables.

Why this answer

fdisk is a common command-line utility used to view and manipulate partition tables.

177
MCQeasy

You are logged into a terminal and want to identify your current working directory. Which command should you execute?

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

pwd prints the name of the current working directory.

Why this answer

The pwd command displays the absolute path of the directory you are currently in.

178
Multi-Selecthard

Which THREE of the following items are typically found in the /etc directory?

Select 3 answers
A./etc/tmp
B./etc/fstab
C./etc/passwd
D./etc/hosts
E./etc/bin
AnswersB, C, D

This defines filesystem mount points.

Why this answer

The /etc directory contains system-wide configuration files, such as passwd, hosts, and fstab.

179
MCQeasy

To see the contents of a directory, which command is standard?

A.ls
B.dir
C.list
D.cat
AnswerA

ls is the standard tool for listing contents.

Why this answer

The ls command is the standard tool for listing directory contents.

180
MCQeasy

What is the primary role of the 'Free Software Foundation' (FSF)?

A.Manufacturing servers and hardware for Linux.
B.Providing commercial support for Linux users globally.
C.Advocating for computer user freedom and maintaining the GNU project.
D.Developing Linux distribution patches for security.
AnswerC

The FSF is the legal and ethical steward of the GNU project.

Why this answer

The FSF promotes software freedom and maintains the GNU project, including licenses like the GPL.

181
MCQeasy

Which of the following is considered a 'downstream' consumer of the Linux kernel?

A.An Ubuntu Linux distribution
B.Linus Torvalds
C.The GCC Compiler project
D.The Linux Kernel Mailing List
AnswerA

Ubuntu integrates the kernel into a usable OS package.

Why this answer

Linux distributions take the upstream kernel and bundle it with other software, making them downstream consumers.

182
MCQhard

You want to search for a file named 'notes.txt' starting from the root directory. Which command is most efficient?

A.grep -r notes.txt /
B.find / -name notes.txt
C.search notes.txt /
D.ls -R / | grep notes.txt
AnswerB

find / searches from root for the specified name.

Why this answer

The 'find' command searches the filesystem tree.

183
MCQeasy

What is the purpose of the /proc directory in Linux?

A.To store configuration files for boot.
B.To store user passwords.
C.To provide information about kernel and processes.
D.To store temporary system files.
AnswerC

/proc is a virtual filesystem for kernel/process data.

Why this answer

The /proc directory is a virtual filesystem that provides an interface to kernel data structures and process information.

184
Multi-Selectmedium

Which TWO commands are commonly used to check network connectivity to a host?

Select 2 answers
A.arp
B.fdisk
C.ping
D.traceroute
E.ssh
AnswersC, D

ping is essential for basic connectivity tests.

Why this answer

ping and traceroute are the primary tools for diagnosing network connectivity issues.

185
MCQmedium

A user reports they cannot execute a script named 'deploy.sh' even though the file permissions are set to 644. What must you change to enable execution for the owner?

A.chmod 655 deploy.sh
B.chmod 744 deploy.sh
C.chown u+x deploy.sh
D.chmod +w deploy.sh
AnswerB

744 provides rwx for the user and r-- for group/others.

Why this answer

Permission 644 (rw-r--r--) lacks the execute bit. Changing the mode to 744 (rwxr--r--) adds execution rights for the owner.

186
Multi-Selectmedium

Which TWO of the following options can be used with 'rm' to ensure safe operation?

Select 2 answers
A.-I
B.-v
C.-r
D.-f
E.-i
AnswersA, E

Prompts once if deleting more than 3 files.

Why this answer

-i and -I provide safety measures during deletion.

187
MCQeasy

What is the primary difference between 'man' pages and 'info' pages?

A.man is graphical, info is text-based
B.man pages are obsolete
C.man is for system files, info is for users
D.info contains more detailed, hyperlinked documentation
AnswerD

Info is designed as a hypertext system.

Why this answer

Info pages are generally more detailed, hierarchical, and often contain hyperlinks, whereas man pages are typically concise, technical summaries.

188
MCQeasy

A small business owner wants to implement a server that allows for long-term support and stability for critical financial applications. Which distribution strategy should they prioritize?

A.Choosing a distribution that offers an LTS version with a long support lifecycle.
B.Using a desktop-focused distribution for ease of installation.
C.Compiling the kernel from source to match the specific hardware.
D.Selecting a rolling release distribution for frequent kernel updates.
AnswerA

LTS versions are designed for stability in enterprise environments.

Why this answer

Long Term Support (LTS) distributions prioritize stability and security updates over cutting-edge features.

189
Multi-Selectmedium

Which THREE of the following are valid directory navigation commands?

Select 3 answers
A.ls
B.mkdir
C.pushd
D.pwd
E.cd
AnswersC, D, E

pushd changes directory while saving the location on a stack.

Why this answer

cd, pwd, and pushd are all used for directory management.

190
MCQeasy

A technician needs to identify the amount of RAM installed in a server without opening the chassis. Which command provides this information from the command line?

A.uptime
B.lsblk
C.free -m
D.df -h
AnswerC

free -m displays memory usage in megabytes.

Why this answer

The free command displays the total, used, and free physical memory and swap space in the system.

Page 2

Page 3 of 3

All pages