LPI 010-160 Practice Test Questions and Exam Dumps Part 4 Q61-80

View Full LPI 010-160 Exam Dumps and Practice Test Dumps.

 

Question 61

Which configuration file contains the IP addresses of DNS name servers utilized for domain name resolution in Linux?

  1. /etc/hosts
  2. /etc/resolv.conf
  3. /etc/fstab
  4. /etc/passwd

Correct Answer: 2

Explanation

The /etc/resolv.conf file is a critical system configuration file that specifies the IP addresses of Domain Name System (DNS) servers queried by the operating system to translate human-readable domain names into numerical IP addresses. During network initialization, network manager daemons or system administrators populate this file with name server directives. Conversely, /etc/hosts handles static local hostname-to-IP mappings, /etc/fstab manages persistent filesystem mount points, and /etc/passwd stores user account metadata. Proper configuration of this file is absolute prerequisite for ensuring reliable internet connectivity, web browsing, package downloads, and remote server communications across enterprise Linux environments.

Question 62

Which shell command is used to bring a backgrounded job back into the foreground of an interactive terminal session?

  1. bg
  2. fg
  3. jobs
  4. nohup

Correct Answer: 2

Explanation

The fg command, which stands for foreground, is utilized in Unix shells to transfer a suspended or backgrounded process back to the active interactive terminal session so the user can interact with it directly. When a command is running in the background, users can inspect active tasks using the jobs command and then resume a specific job interactively by passing its job identifier to fg. In contrast, the bg command resumes suspended jobs within the background, and nohup allows processes to continue running even after the user logs out. Mastering job control commands significantly enhances multitasking efficiency for terminal administrators.

Question 63

Which command calculates and displays the disk space consumed by specific directories and files recursively?

  1. df
  2. free
  3. du
  4. ls

Correct Answer: 3

Explanation

The du command, which stands for disk usage, estimates and reports file space consumption across directory hierarchies and individual files. By recursively traversing subdirectories, du reveals precisely how much storage space specific folders occupy, making it an indispensable tool for identifying space hogs and cleaning up overcrowded storage partitions. While df reports overall filesystem capacity and available space partitions, free tracks system RAM and swap utilization, and ls lists directory contents. Utilizing du with human-readable formatting flags enables administrators to perform detailed storage audits and manage disk space quotas effectively across production Linux servers.

Question 64

Which command displays the current running Linux kernel version and system architecture details?

  1. uptime
  2. hostname
  3. uname
  4. whoami

Correct Answer: 3

Explanation

The uname command prints system information, and when executed with the release flag, it displays the exact version of the running Linux kernel along with hardware architecture details such as x86_64 or ARM. This information is vital for verifying compatibility when installing kernel modules, troubleshooting hardware drivers, or applying security patches. While uptime reports system load averages and active run duration, hostname displays the network node name, and whoami outputs the active username. Knowing how to query system attributes via uname is a fundamental diagnostic skill for systems administrators managing diverse server infrastructures and cloud instances daily.

Question 65

Which systemctl subcommand is used to check whether a specific systemd service is currently running?

  1. enable
  2. disable
  3. status
  4. start

Correct Answer: 3

Explanation

The systemctl status command provides detailed diagnostic output regarding the current operational state of a specified systemd service, displaying whether the daemon is actively running, stopped, or experiencing faults, alongside recent log entries and process IDs. This command is the primary diagnostic starting point when troubleshooting failing services or verifying daemon health. Conversely, enable and disable configure service startup behavior during system boots, while start initiates an inactive service immediately. Mastering systemctl status ensures rapid identification of operational issues and maintains high availability across enterprise system environments.

Question 66

What happens when a shell variable is marked using the export command?

  1. It is permanently saved to an encrypted configuration file on disk
  2. It becomes available to any child processes and subshells spawned from that session
  3. It is instantly broadcasted to all active user sessions across the network
  4. It is compiled into a binary executable machine command

Correct Answer: 2

Explanation

The export command marks a shell variable so that it is automatically inherited by any subsequent child processes, scripts, or subshells launched from the current shell session. Without export, shell variables remain strictly local to the parent shell instance and are invisible to external scripts or background utilities. This inheritance mechanism is essential for passing configuration paths, runtime parameters, and environment settings to applications. While export makes variables available in memory to child tasks, it does not save them permanently to disk or broadcast them across network sockets, making proper shell initialization file configuration necessary for persistence.

Question 67

Which command-line option is required with tar to extract the contents of an archive file?

  1. -c
  2. -t
  3. -x
  4. -r

Correct Answer: 3

Explanation

The -x option instructs the tar utility to extract the contents of a specified archive file into the current working directory, restoring files and directory structures to their original layout. When combined with decompression flags like -z for gzip or -j for bzip2, tar automatically decompresses and extracts compressed packages seamlessly. Conversely, the -c option creates new archives, -t lists archive contents without extracting them, and -r appends files to existing archives. Mastering extraction commands is essential for software installation, backup restoration, and moving data bundles across different Linux servers and cloud storage repositories.

Question 68

What numeric octal permission mask corresponds to read, write, and execute for the owner, and read-only for group and others?

  1. 755
  2. 644
  3. 700
  4. 777

Correct Answer: 1

Explanation

The numeric octal permission mask 755 grants the file owner full read, write, and execute permissions, while restricting both the owning group and all other users to read and execute access without write capabilities. In octal notation, the owner digit evaluates to 7 (4+2+1), while group and others evaluate to 5 (4+1). This permission structure is widely applied to executable scripts and application binaries, allowing everyone to run the program while preventing unauthorized modifications. Conversely, 644 is standard for data files, 700 restricts access exclusively to the owner, and 777 grants universal unrestricted access to everyone.

Question 69

Which command installs a standalone local software package file with a .deb extension on Debian-based systems?

  1. apt-get
  2. dpkg
  3. yum
  4. rpm

Correct Answer: 2

Explanation

The dpkg command is the underlying package management tool used on Debian-based distributions to install, remove, and inspect individual local software package files with a .deb extension. When executed with the install flag, dpkg processes the package file directly on the local filesystem. While apt-get handles high-level package management by resolving remote dependencies automatically from software repositories, yum and rpm serve equivalent roles on RPM-based distributions like Red Hat and Fedora. Understanding how to use dpkg is essential for managing offline software deployments, custom local builds, and troubleshooting package installation failures on Debian systems.

Question 70

Which text processing utility uses patterns and actions to scan and extract data from input files or streams?

  1. sed
  2. cut
  3. awk
  4. tr

Correct Answer: 3

Explanation

The awk utility is a powerful programming language and pattern scanning tool designed for advanced text processing, data extraction, and report generation in Linux shell environments. It processes input line by line, breaking each line into fields that can be manipulated, filtered, and formatted with custom scripts. While sed specializes in stream editing and substitution, cut extracts specific character columns or delimited fields, and tr translates individual characters. Mastering awk enables system administrators to parse complex log files, analyze metrics, and automate text manipulation tasks with exceptional efficiency and precision.

Question 71

Which command creates a hard link pointing to an existing target file?

  1. ln
  2. cp
  3. mv
  4. rm

Correct Answer: 1

Explanation

The ln command, when executed without the symbolic flag, creates a hard link that points directly to the underlying inode and data blocks of an existing target file. Both the original file and the new hard link share the exact same inode number and reside on the same filesystem. Deleting the original filename does not destroy the actual data until all associated hard links are completely removed. While cp duplicates file data into a separate storage location, mv relocates files, and rm deletes files. Understanding hard links is critical for advanced file management and backup strategies across Linux filesystems.

Question 72

Which command searches for files within a directory hierarchy based on modification time or file size?

  1. locate
  2. find
  3. grep
  4. touch

Correct Answer: 2

Explanation

The find command performs live, real-time filesystem searches to locate files and directories matching complex criteria, including modification timestamps, file sizes, permissions, and user ownership. Unlike the locate utility which queries a precompiled database index, find scans the physical storage directly, ensuring absolute up-to-date accuracy when auditing system files or performing cleanup tasks. While grep searches inside text files for matching string patterns, locate provides rapid database lookups, and touch creates empty files. Mastering find is essential for granular file management, automated archival scripts, and storage auditing across Linux environments.

Question 73

Which system utility modifies existing user account attributes, such as default login shells or home directories?

  1. useradd
  2. usermod
  3. userdel
  4. groupadd

Correct Answer: 2

Explanation

The usermod command is the standard system utility used by administrators to modify existing user account parameters, such as changing login shells, updating home directory paths, altering user IDs, or adjusting group memberships within system configuration files like /etc/passwd. Proper account management ensures security compliance and operational continuity. Conversely, useradd provisions new user accounts, userdel safely removes obsolete accounts, and groupadd creates security groups. Mastering usermod is vital for maintaining accurate user permissions and managing administrative changes across multi-user enterprise Linux server deployments.

Question 74

Which command displays a historical log of recent user logins and system reboots?

  1. w
  2. who
  3. last
  4. finger

Correct Answer: 3

Explanation

The last command parses the /var/log/wtmp file to display a chronological list of all previous user logins, logouts, active sessions, and system reboot events recorded on the Linux system. This auditing utility is essential for security investigations, tracking user activity, and monitoring unauthorized access attempts. While who displays currently logged-in users, w provides a summary of active users and their current CPU resource utilization, and finger outputs detailed user information. Utilizing last regularly helps administrators maintain robust security monitoring and compliance across enterprise infrastructure environments.

Question 75

Which command displays the current network routing table configuration on a modern Linux system?

  1. ip route
  2. netstat -r
  3. route
  4. ping gateway

Correct Answer: 1

Explanation

The ip route command is the modern, powerful utility used to display and modify kernel routing tables on contemporary Linux distributions, replacing legacy tools like route and netstat. Executing ip route outputs all active gateway routes, network interfaces, and metric costs, enabling administrators to verify how network traffic is directed across local subnets and external networks. Accurate routing tables are critical for ensuring proper connectivity between servers, gateways, and cloud endpoints. Mastering ip route diagnostics is an essential network administration skill for troubleshooting communication failures and configuring multi-homed Linux server environments.

Question 76

Which command changes the user and group ownership of a file or directory?

  1. chmod
  2. chown
  3. chgrp
  4. umask

Correct Answer: 2

Explanation

The chown command, short for change owner, is used to alter the user owner and optionally the owning group of a file or directory in Linux. For example, executing chown user:group filename updates both ownership parameters simultaneously, ensuring that files are controlled by the appropriate administrative or application user. While chmod modifies access permission bits, chgrp changes solely the group ownership without affecting the user owner, and umask sets default file creation masks. Proper ownership management via chown is critical for enforcing security boundaries across shared multi-user system environments.

Question 77

Which background daemon is responsible for collecting, formatting, and storing system log messages in modern Linux?

  1. cron
  2. rsyslogd
  3. sshd
  4. httpd

Correct Answer: 2

Explanation

The rsyslogd daemon is the primary background service responsible for receiving, filtering, formatting, and writing system log messages to persistent log files in directories like /var/log. It acts as the core logging engine across many Linux distributions, capturing events from the kernel, system daemons, and applications. While cron manages scheduled time-based tasks, sshd handles secure remote access, and httpd serves web pages, rsyslogd provides essential audit trails and diagnostic logs that administrators rely on for troubleshooting system errors, monitoring security events, and ensuring compliance across enterprise server fleets.

Question 78

What is the shortcut to re-execute the immediately preceding command in a bash shell?

  1. !!
  2. !$
  3. !*
  4. !?

Correct Answer: 1

Explanation

The double exclamation point shortcut tells the bash shell to recall and re-execute the immediately preceding command, saving time when users forget to prefix a command with sudo or need to run a task again. Other history expansion shortcuts include !$ which references the final argument of the previous command, and !* which includes all arguments. While these history expansion features streamline terminal navigation, utilizing them carefully prevents unintended command execution in production environments. Mastering shell history shortcuts significantly enhances daily administrative productivity and efficiency across Linux command-line sessions.

Question 79

Which utility reports total, used, and available system RAM and swap memory statistics?

  1. df
  2. du
  3. free
  4. top

Correct Answer: 3

Explanation

The free command provides a concise, real-time summary of physical RAM and swap space utilization, displaying total capacity, used memory, available buffers, and active cache allocations within the operating system. This tool is invaluable for diagnosing memory bottlenecks and evaluating performance health on busy servers. While df monitors disk storage capacity, du calculates directory space consumption, and top tracks active CPU and memory processes interactively. Regularly checking memory usage with free helps administrators determine when to upgrade server hardware or optimize running applications.

Question 80

Which utility compresses files into a standard archive format compatible with Windows systems?

  1. gzip
  2. bzip2
  3. tar
  4. zip

Correct Answer: 4

Explanation

The zip utility is a widely used compression and file packaging program that creates compressed .zip archives compatible across diverse operating systems, including Linux, macOS, and Windows. Unlike tar which is native to Unix environments, zip combines compression and archiving into a single step while maintaining cross-platform compatibility for file sharing. While gzip and bzip2 compress single data streams, tar bundles directory trees without universal Windows support out of the box. Knowing how to use zip ensures seamless file exchange between Linux systems and external Windows environments.