View Full LPI 010-160 Exam Dumps and Practice Test Dumps.
Question 121
Which command is used to remove an installed software package while retaining its configuration files on Debian-based systems?
- apt-get remove
- apt-get purge
- dpkg -P
- apt-get clean
Correct Answer: 1
Explanation
The apt-get remove command is utilized on Debian-based distributions to uninstall specified software packages while intentionally retaining their local configuration files on the filesystem. This approach ensures that if the software is reinstalled later, custom settings are preserved. Conversely, apt-get purge completely deletes both the package binaries and its associated configuration files, ensuring a thorough cleanup. Other commands like apt-get clean clear cached package archives from local storage repositories. Understanding the distinction between remove and purge operations is essential for system administrators managing software lifecycles, application upgrades, and system configurations efficiently across production Debian server environments.
Question 122
Which directory in the Linux filesystem hierarchy typically houses variable data files such as system logs, mail spools, and databases?
- /etc
- /bin
- /var
- /home
Correct Answer: 3
Explanation
The /var directory stands for variable and is the designated location in the Linux Filesystem Hierarchy Standard where system components store data that continuously changes during normal operation. This includes critical system log files, print queues, mail spools, web server data, and active database tables. In contrast, /etc houses static system-wide configuration files, /bin stores essential user binaries required for booting, and /home contains personal user directories. Proper monitoring and disk space allocation for /var are vital administrative responsibilities to prevent log overflow conditions from crashing production servers and critical business applications.
Question 123
What numeric octal permission mask corresponds to read and write for the owner, and read-only access for group and others?
- 755
- 644
- 700
- 777
Correct Answer: 2
Explanation
The numeric octal permission mask 644 grants the file owner read and write permissions, while restricting both the owning group and all other external users to read-only access without execution capabilities. In octal notation, the owner digit evaluates to 6 (4+2), while group and others evaluate to 4. This permission structure is the universal standard for regular data files, text documents, and configuration files, allowing general viewing while preventing unauthorized modifications. Conversely, 755 is standard for executable scripts, 700 restricts access exclusively to the owner, and 777 grants universal unrestricted access to everyone.
Question 124
Which shell redirection operator is used to overwrite the contents of a file with standard output from a command?
- <
- 2>
Correct Answer: 4
Explanation
The greater-than sign functions as the standard output redirection operator in Linux shells, capturing the output generated by a command and overwriting any existing content within the specified destination file. If the target file does not already exist, the shell automatically creates it. In contrast, the double greater-than operator appends output to the end of a file without destroying prior contents, the less-than symbol handles standard input redirection, and 2> directs error streams separately. Mastering output redirection is essential for logging script results, capturing diagnostic output, and automating administrative reporting tasks across Linux systems.
Question 125
Which command-line option is required with tar to compress an archive using bzip2?
- -z
- -j
- -v
- -f
Correct Answer: 2
Explanation
The -j option instructs the tar utility to filter the archive stream through bzip2 compression, enabling the creation of compressed archives with the .tar.bz2 or .tbz extension in a single step. Bzip2 typically provides higher compression ratios than traditional gzip, though it requires slightly more CPU processing time during archiving. While the -z flag invokes gzip compression, -v enables verbose output showing processed files, and -f specifies the target archive filename. Mastering various compression flags ensures that system administrators can perform reliable, space-optimized backups and distribute software packages effectively across diverse enterprise Linux server environments.
Question 126
Which configuration file defines the static hostname mapping for local loopback and IP addresses in Linux?
- /etc/resolv.conf
- /etc/fstab
- /etc/hosts
- /etc/passwd
Correct Answer: 3
Explanation
The /etc/hosts file is a static text file utilized by the operating system to map hostnames to corresponding IP addresses before querying external Domain Name System servers. It always contains local loopback entries pointing localhost to 127.0.0.1. Administrators frequently edit this file to configure local hostname resolution for testing environments or isolated networks. In contrast, /etc/resolv.conf specifies external DNS server IP addresses, /etc/fstab handles persistent filesystem mount points, and /etc/passwd stores user account metadata. Understanding static hostname configuration via /etc/hosts is a fundamental networking diagnostic skill for Linux systems administrators.
Question 127
Which system utility is used to create a new security group on a Linux operating system?
- useradd
- usermod
- groupadd
- groupdel
Correct Answer: 3
Explanation
The groupadd command is the standard system utility utilized by administrators to create new security groups on Linux systems, automatically updating system configuration databases such as /etc/group and /etc/shadow. Creating dedicated groups allows administrators to implement effective role-based access control and manage file permissions collaboratively across teams. Conversely, useradd provisions new user accounts, usermod modifies existing account parameters, and groupdel removes obsolete groups from the system. Proper group management via groupadd is a vital administrative duty for maintaining secure multi-user environments and enforcing strict access boundaries across enterprise servers.
Question 128
Which signal number represents the standard graceful termination request sent by the kill command?
- 9
- 15
- 1
- 19
Correct Answer: 2
Explanation
Signal number 15 corresponds to SIGTERM, which is the default termination signal sent by the kill command to request a graceful shutdown of a running process. When an application receives SIGTERM, it is given the opportunity to save unsaved data, release allocated system resources, and exit cleanly. In contrast, signal 9 represents SIGKILL, which forces an immediate, uncatchable termination handled directly by the kernel without cleanup routines. Knowing how to utilize signal numbers appropriately ensures that system administrators can stop misbehaving background daemons effectively while preventing unexpected data loss or file corruption across storage volumes.
Question 129
Which command-line utility sorts lines of text files in alphabetical or numerical order?
- uniq
- grep
- sort
- wc
Correct Answer: 3
Explanation
The sort command is a powerful text processing utility that rearranges the lines of text files or input streams based on specific sorting criteria, including alphabetical, reverse, or numerical ordering. It is frequently combined with other filters in shell pipelines to organize data reports and analyze log files. While uniq filters out adjacent duplicate lines from sorted input, grep searches for specific string patterns, and wc counts lines, words, and characters. Mastering the sort command enables system administrators to process text data efficiently, extract meaningful metrics, and generate clean administrative reports across Linux command-line environments.
Question 130
Which utility displays detailed information about connected USB peripheral devices on a Linux system?
- lspci
- lsblk
- lscpu
- lsusb
Correct Answer: 4
Explanation
The lsusb command queries the kernel device tree and displays detailed information about all USB buses and connected peripheral devices—such as keyboards, mice, flash drives, and webcams—currently attached to the system. This utility is invaluable for hardware inventory audits, verifying driver recognition, and troubleshooting peripheral connectivity issues. Similarly, lspci lists PCI hardware components, lsblk displays block storage partitions, and lscpu reports CPU architecture specifications. Mastering these hardware diagnostic tools enables administrators to verify system configurations and diagnose hardware bottlenecks effectively across enterprise server environments, cloud platforms, and local desktop workstations.
Question 131
How do you reference the value of a defined shell variable named CONFIG in bash?
- $CONFIG
- #CONFIG
- &CONFIG
- *CONFIG
Correct Answer: 1
Explanation
In bash shell scripting and interactive terminal sessions, prefixing a variable name with a dollar sign evaluates and expands that variable, returning its stored value to the command line or script parser. For instance, echoing $CONFIG prints the assigned parameter to standard output. In contrast, the hash symbol indicates comments, the ampersand runs jobs in the background, and the asterisk acts as a wildcard filename matcher. Understanding proper variable syntax and expansion rules is essential for writing robust, error-free automation scripts and managing runtime parameters across complex Linux enterprise environments and cloud deployment pipelines.
Question 132
Which command detaches a mounted filesystem from the directory tree in Linux?
- mount
- umount
- fsck
- mkfs
Correct Answer: 2
Explanation
The umount command is utilized to safely detach a currently mounted filesystem from its mount point in the directory tree, flushing any unwritten cache data to storage blocks. This step is mandatory before physically disconnecting removable media or resizing underlying storage partitions to prevent data corruption. Conversely, the mount command attaches filesystems, fsck checks and repairs filesystem integrity, and mkfs formats new storage volumes. Mastering mount and umount operations ensures reliable storage administration, safe device removal, and robust data integrity management across all production Linux server and cloud storage infrastructures.
Question 133
What is the default systemd startup target equivalent to traditional multi-user mode with networking on Linux?
- rescue.target
- poweroff.target
- multi-user.target
- graphical.target
Correct Answer: 3
Explanation
The multi-user.target in systemd represents the standard runlevel configuration for non-graphical server environments, providing multi-user login capabilities and full network connectivity. It serves as the default operational state for headless enterprise Linux servers. In contrast, graphical.target includes desktop window managers, rescue.target provides a single-user maintenance shell for administrative recovery, and poweroff.target shuts down the system safely. Understanding systemd targets is essential for configuring server boot behaviors, troubleshooting startup failures, and managing system administration tasks effectively across diverse production and cloud server infrastructure deployments.
Question 134
Which command-line option is used with tar to list the contents of an archive without extracting them?
- -c
- -t
- -x
- -r
Correct Answer: 2
Explanation
The -t option instructs the tar utility to list the internal file paths and metadata of a specified archive file without extracting any data to the local filesystem. This is extremely useful for auditing archive contents before performing a full restoration. Conversely, -c creates new archives, -x extracts archive contents, and -r appends files to existing archives. Mastering archive inspection commands is essential for software management, backup verification, and moving data bundles safely across different Linux servers and cloud storage repositories without cluttering working directories with unnecessary files.
Question 135
Which shell command displays all currently defined environment variables and shell variables?
- path
- echo
- env
- export
Correct Answer: 3
Explanation
The env command outputs a comprehensive list of all currently active environment variables and their assigned values in the current shell session. Administrators rely on env to verify runtime configuration parameters, proxy settings, and execution paths before launching applications or scripts. While echo prints specific variable values when combined with a dollar sign, export marks variables for child process inheritance, and path is not a standalone command. Understanding how to inspect environment variables via env is a critical diagnostic skill for troubleshooting configuration discrepancies across Linux server environments.
Question 136
Which configuration file controls global SSH client behavior and connection parameters?
- /etc/ssh/sshd_config
- /etc/ssh/ssh_config
- /etc/passwd
- /etc/resolv.conf
Correct Answer: 2
Explanation
The /etc/ssh/ssh_config file serves as the system-wide configuration file governing SSH client behavior, connection timeouts, cryptographic preferences, and default options when users initiate outgoing SSH sessions to remote hosts. In contrast, /etc/ssh/sshd_config controls the SSH daemon settings for incoming connections to the server. Meanwhile, /etc/passwd stores user account metadata, and /etc/resolv.conf specifies DNS name server IP addresses. Properly configuring client and server SSH files is essential for maintaining secure administrative access and enforcing strict cryptographic policies across enterprise infrastructure.
Question 137
Which command-line partitioning tool is designed to manage GPT disk partition tables on modern Linux systems?
- fdisk
- parted
- mkfs
- df
Correct Answer: 2
Explanation
The parted utility is a powerful command-line disk partitioning tool that provides comprehensive support for managing GUID Partition Tables (GPT) as well as legacy Master Boot Record layouts on modern Linux systems, handling drives exceeding two terabytes effortlessly. It allows administrators to create, resize, and delete partitions interactively or via scripted commands. While legacy fdisk historically specialized in MBR layouts, mkfs formats partitions, and df reports disk usage. Mastering parted is an essential storage administration skill for provisioning high-capacity enterprise storage volumes and managing complex server partition layouts.
Question 138
Which utility outputs the final lines of a text file or log stream to standard output?
- head
- tail
- cat
- less
Correct Answer: 2
Explanation
The tail utility displays the final lines of a text file, making it an indispensable tool for inspecting recent log entries in real time when combined with follow flags. By default, it outputs the last ten lines, but administrators can customize line counts using numeric options. Conversely, head displays the beginning lines of a file, cat outputs the entire file content at once, and less provides a scrollable text viewing interface. Mastering tail enables system administrators to monitor live system logs, track application errors, and diagnose runtime issues efficiently across production Linux servers.
Question 139
Which shell builtin command allows users to view and search their previous command history?
- trace
- log
- record
- history
Correct Answer: 4
Explanation
The history command outputs the sequential list of commands previously executed within the current user shell session, allowing administrators to review past actions or re-execute complex commands efficiently. Shells store these historical entries in memory and typically write them to a hidden configuration file like .bash_history in the user home directory upon logout. Administrators can recall previous commands using exclamation point shortcuts or search through history interactively. Utilizing the history utility saves time, reduces repetitive typing errors, and helps document troubleshooting steps during intricate system administration and configuration sessions.
Question 140
What core philosophy defines open-source software licenses such as the GNU General Public License (GPL)?
- Restricting software distribution exclusively to paying corporate customers
- Guaranteeing users freedom to run, study, modify, and share software code
- Prohibiting any commercial usage or monetization of application binaries
- Mandating proprietary hardware platforms for software execution
Correct Answer: 2
Explanation
Open-source software licenses, exemplified by the GNU General Public License, are founded on the core philosophy of granting users fundamental freedoms: the freedom to run the program for any purpose, study its source code, modify it to suit specific needs, and distribute modified or original copies to others. This collaborative model drives community innovation, transparency, and rapid peer review across the global technology ecosystem. In contrast, proprietary licenses restrict code visibility and redistribution. Understanding open-source licensing principles is essential for compliance, legal governance, and software architecture decisions across modern enterprise IT environments.