LPI 010-160 Linux Essentials Certificate Exam, version 1.6 Exam Dumps and Practice Test Questions Set3 Q41-60

Visit here for our full LPI 010-160 exam dumps and practice test questions.

Question 41

Which command is used to display the contents of a compressed .tar.gz archive without extracting it?

A) tar -tf archive.tar.gz
B) tar -xvf archive.tar.gz
C) gzip -d archive.tar.gz
D) gunzip -l archive.tar.gz

Answer: A) tar -tf archive.tar.gz

Explanation:

Working with compressed archives is a common task for Linux system administrators. A .tar.gz file is a compressed tarball, meaning it combines the functionality of both tar (for archiving multiple files into one file) and gzip (for compression to reduce size). The tar command is versatile and includes options for listing, extracting, and creating archives. The -t option tells tar to display the contents of the archive, while -f specifies the archive file. Running tar -tf archive.tar.gz outputs a list of all files and directories contained within the archive without extracting them. This is particularly useful for checking archive contents before performing extraction to avoid overwriting files or extracting unnecessary files. Administrators often combine it with grep to filter specific filenames.

A) tar -tf archive.tar.gz – Correct. Lists the contents of a compressed tarball without extraction. This allows verification of the archive’s contents before deployment, ensuring safety and preventing unintentional modifications to the filesystem.

B) tar -xvf archive.tar.gz – Extracts the contents of the archive to the current directory with verbose output. While commonly used for unpacking files, it does not provide a listing without extraction. Using it without intention could overwrite existing files.

C) gzip -d archive.tar.gz – Decompresses a gzip file but does not provide a file listing. It creates a .tar file from the .tar.gz archive, which can then be inspected with tar -tf. It is not used to view contents directly.

D) gunzip -l archive.tar.gz – Lists compression statistics like uncompressed size and ratio but does not display individual files within the archive. While it provides metadata about the archive, it is not useful for determining which files are included.

Understanding how to list the contents of compressed archives is crucial for system maintenance, backup verification, and software deployment. In Linux Essentials, familiarity with tar options, especially -t, -x, and -c, demonstrates proficiency in handling archives. Being able to inspect an archive before extraction ensures administrators can make informed decisions about storage, file management, and system security. Proper use of tar -tf also prevents unnecessary writes and maintains filesystem integrity. Administrators must differentiate between commands that inspect archives versus those that decompress or extract, as incorrect usage can lead to lost or overwritten data, particularly in production environments where multiple users and automated scripts are involved. This knowledge supports best practices for data safety and operational efficiency in Linux environments.

Question 42

Which command is used to display all environment variables and their values?

A) set
B) env
C) printenv
D) export

Answer: B) env

Explanation: Environment variables are crucial in Linux for configuring user sessions, scripts, and application behavior. They provide information such as the default shell, system paths, locale settings, and user preferences. Displaying all environment variables helps administrators understand the system configuration and troubleshoot application behavior. The env command lists all environment variables currently set in the user’s session. It outputs variables like PATH, HOME, USER, LANG, and any custom environment variables set for that session. Administrators often pipe the output through grep to locate specific variables, for example, env | grep PATH. The env command can also be used to temporarily modify variables for running a command without altering the user’s permanent environment, which is helpful for testing or running scripts with specific configurations.

A) set – Displays both shell and environment variables, along with functions defined in the shell. It produces a larger, more verbose output than env and includes variables that are not exported to child processes. While useful for debugging shell behavior, it is less precise when only environment variables are needed.

B) env – Correct. Lists all environment variables and their current values in a session. It provides a concise and straightforward view of the environment, suitable for system administration, scripting, and verification of session configuration. The env command displays key-value pairs such as PATH, HOME, USER, and other session-specific variables, which influence the behavior of applications and shell scripts. Administrators use it to debug issues, ensure correct paths for executables, and verify that temporary or permanent environment changes have taken effect. It can also be used to run commands with modified environment variables without altering the global session, for example, env VAR=value command, making it useful for testing, scripting, and temporary configuration adjustments. Understanding env is essential for Linux Essentials certification because proper environment management ensures reliable execution of scripts, correct application behavior, and predictable system operations in multi-user environments.

C) printenv – Also displays environment variables, similar to env. While functional, it does not provide the same flexibility for temporarily running commands with modified environments. The printenv command is typically used to print one or more environment variables, for example, printenv PATH displays the current system path. It is particularly useful for quickly checking variable values in scripts, debugging session configurations, or verifying environment settings without altering them. Unlike env, printenv focuses solely on displaying variables and does not support launching commands with modified environments. Administrators use it to validate environment setups, troubleshoot application issues, and confirm that changes to variables, such as HOME, PATH, or LANG, are properly applied. Mastery of printenv is important for Linux Essentials certification, as it emphasizes understanding and verifying environment variables, a key skill for system configuration, scripting, and multi-user administration.

D) export – Used to set or export a variable to the environment, making it available to child processes. Alone, it does not list all variables in the current environment. The export command allows administrators and users to define environment variables that persist for the duration of a session and can be inherited by scripts or programs launched from that shell. For example, export PATH=$PATH:/new/directory adds a directory to the system path, ensuring that executables within it are accessible to subsequent processes. While export does not display all environment variables, it is essential for configuring system behavior, managing application environments, and enabling customized shell sessions. It is often used in combination with commands like env or printenv to verify that the exported variables have been set correctly. Understanding export is crucial for Linux Essentials certification because proper environment variable management ensures that programs run with the correct configuration, scripts execute reliably, and user environments are consistent across multiple sessions or processes.

Understanding environment variables is essential for Linux Essentials because they directly impact how applications run, where commands are found, and which configurations are applied. Administrators need to identify and modify variables for scripts, software installation, or debugging purposes. Using env helps confirm settings, avoid conflicts, and ensure the system behaves as intended, especially in multi-user environments or automated processes. Knowing the difference between env, set, printenv, and export ensures correct command usage and reduces the risk of unintended configuration changes.

Question 43

Which command shows the permissions, owner, and group of a file?

A) ls -l
B) stat
C) chmod
D) chown

Answer: A) ls -l

Explanation: File permissions and ownership are central to Linux security. They determine who can read, write, or execute files and directories, and prevent unauthorized access. The ls -l command lists files in long format, showing permissions, the number of hard links, owner, group, size, and modification time. For example, ls -l file.txt might show -rw-r–r– 1 alice developers 1024 Nov 14 2025 file.txt, indicating the file is readable and writable by the owner, readable by the group and others, and owned by alice in the developers group. Administrators use this information for auditing permissions, troubleshooting access issues, and ensuring proper security policies are enforced.

A) ls -l – Correct. Provides a human-readable overview of file permissions, owner, group, and size. It is the primary tool for examining access control settings.

B) stat – Displays more detailed file information, including inode number, timestamps, and block usage. While it includes permissions and ownership, it is less concise for quick inspection compared to ls -l.

C) chmod – Changes file permissions but does not display them by itself. It is used alongside ls -l to verify changes.

D) chown – Modifies file ownership, not permissions. It must be combined with ls -l to confirm changes.

Mastering ls -l is essential for Linux Essentials because it allows administrators to inspect permissions quickly, verify ownership, and maintain system security. Proper interpretation ensures correct access control for users, groups, and others, preventing unauthorized access or accidental data modification. Knowledge of this command supports troubleshooting file access errors, planning secure directories, and maintaining compliance with organizational policies. In addition, combining ls -l with filtering commands like grep can facilitate bulk auditing of permissions across multiple files or directories, which is a valuable skill in real-world administration.

Question 44 

Which command is used to display CPU architecture and system information?

A) uname -a
B) lscpu
C) cat /proc/cpuinfo
D) all of the above

Answer: D) all of the above

Explanation: 

Understanding system architecture and CPU information is important for system administration, software installation, and performance optimization. Linux provides multiple tools to display this information. The uname -a command prints kernel name, hostname, kernel version, architecture, and more. For example, uname -a might return Linux myhost 5.15.0-60-generic x86_64 GNU/Linux, indicating a 64-bit system running kernel 5.15.

The lscpu command provides a structured overview of CPU architecture, including the number of cores, threads, CPU family, model, and cache size. For example, lscpu displays logical processors, sockets, NUMA nodes, and virtualization support, giving detailed hardware insights.

cat /proc/cpuinfo displays raw CPU information directly from the kernel, including vendor ID, model, CPU MHz, and flags for supported features. Administrators can parse this information to verify capabilities, troubleshoot hardware issues, or tune performance.

A) uname -a – Provides a quick summary of system architecture and kernel version, suitable for scripts or basic system identification. The uname command is a lightweight utility that displays information such as the kernel name, version, release, and system hardware architecture. For example, uname -r shows the kernel release, while uname -m shows the machine hardware name. It is commonly used in scripting to check system compatibility, automate deployment tasks, or gather basic system information for troubleshooting. Although it provides limited detail compared to tools like hostnamectl or lscpu, uname is fast, universally available on all Linux distributions, and extremely useful for both administrators and users needing a quick overview of the system’s core attributes. Understanding uname is part of Linux Essentials certification because it equips users with the ability to identify system characteristics efficiently, ensuring proper software installation and environment validation.

B) lscpu – Correct. Offers detailed and structured CPU information, useful for performance tuning and hardware verification. The lscpu command provides insights such as the number of CPUs, cores, threads, CPU architecture, model name, cache sizes, and CPU flags. Administrators and users can leverage this information to optimize software performance, plan resource allocation, troubleshoot hardware issues, or verify system specifications for compatibility with applications. It is particularly valuable in multi-core or virtualized environments, where understanding CPU topology and capabilities helps ensure efficient system operation. Mastery of lscpu is part of Linux Essentials certification, as it equips users with the ability to accurately assess system hardware for administration and performance purposes.

C) cat /proc/cpuinfo – Correct. Provides comprehensive, low-level details about each CPU core and features, ideal for advanced diagnostics. The cat /proc/cpuinfo command outputs information such as processor number, vendor ID, CPU family, model, stepping, cache sizes, and supported instruction sets. This granular data is valuable for performance analysis, troubleshooting hardware issues, verifying virtualization support, and optimizing software for specific CPU features. Unlike higher-level tools like lscpu, which summarize CPU information, cpuinfo offers per-core details, enabling administrators and developers to examine the exact capabilities and configuration of each processor. It is an essential tool for Linux Essentials certification, as it helps users understand CPU architecture and perform informed system management, particularly in multi-core or specialized environments where low-level CPU knowledge is critical.

D) all of the above – Correct. All three commands are valid ways to retrieve CPU and system information. Mastering them allows administrators to confirm architecture, check compatibility, and plan system optimization effectively. Knowledge of these commands is crucial for Linux Essentials, as it ensures understanding of hardware constraints, system capabilities, and correct software deployment.

Question 45

Which command is used to monitor system memory usage in real time?

A) free
B) vmstat
C) top
D) htop

Answer: D) htop

Explanation: Monitoring memory usage is vital for system performance, troubleshooting, and capacity planning. While multiple commands provide memory information, htop stands out for real-time, interactive monitoring. It displays CPU, RAM, and swap usage in graphical bars, along with all running processes, allowing administrators to sort and filter dynamically. For example, pressing M in htop sorts processes by memory consumption. It is particularly helpful for detecting memory leaks, runaway processes, and high resource usage.

A) free – Provides a snapshot of total, used, and free memory, along with buffers and cache. It is useful for quick checks but not for dynamic, real-time monitoring. The free command displays memory usage in human-readable formats (e.g., free -h) and can also show swap usage. Administrators often use it to verify available memory before launching applications, performing system updates, or troubleshooting performance issues. While it provides a static view, combining it with other tools like top or vmstat allows more comprehensive monitoring. Understanding memory usage through free is important for Linux Essentials certification because it helps ensure that systems operate efficiently, avoid memory bottlenecks, and maintain overall stability.

B) vmstat –Shows memory, CPU, swap, and process statistics over intervals. Useful for performance analysis, but output is less interactive and harder to interpret than htop. The vmstat command provides insights into system processes, CPU activity, paging, block I/O, and memory usage. By specifying an interval (e.g., vmstat 5), administrators can monitor performance trends over time, which helps identify bottlenecks, high load conditions, or inefficient resource usage. While it does not offer the visual clarity of tools like htop or top, vmstat is lightweight, available on virtually all Linux distributions, and highly useful for scripting and automated performance checks. Mastery of vmstat is valuable for Linux Essentials certification as it equips administrators with foundational skills for system monitoring, troubleshooting, and optimization.

C) top –Interactive process viewer showing memory usage. While similar to htop, it lacks graphical bars and some advanced interactive sorting and filtering features, making it slightly less user-friendly. The top command provides real-time monitoring of CPU and memory usage, process IDs, running time, and system load averages. Administrators can sort processes by CPU or memory consumption, identify resource-intensive processes, and terminate processes directly using signals. Despite its simpler interface compared to htop, top is widely available on all Linux distributions, making it a fundamental tool for system monitoring and troubleshooting. It is particularly useful for quick performance checks, detecting runaway processes, and analyzing system load over time, which are key skills for Linux Essentials certification.

D) htop – Correct. Provides real-time, interactive memory monitoring with enhanced visualization. It allows users to track memory usage per process, system-wide consumption, and swap activity, all in an accessible, color-coded interface. This is particularly valuable for administrators managing production systems, diagnosing bottlenecks, or performing capacity planning. Using htop in combination with free and vmstat provides a comprehensive understanding of memory usage, helping administrators maintain optimal system performance. Mastery of these tools is an essential skill for Linux Essentials certification and practical Linux system administration.

Question 46

Which command is used to display disk space usage for all mounted filesystems?

A) df
B) du
C) ls -lh
D) fdisk

Answer: A) df

Explanation: 

Disk space monitoring is essential for ensuring systems do not run out of storage, which can lead to service disruption or data loss. The df (disk filesystem) command shows the amount of disk space used and available on all mounted filesystems. It is widely used for system monitoring, auditing, and troubleshooting storage issues. By default, df shows values in blocks, but using the -h option (human-readable) displays sizes in kilobytes, megabytes, or gigabytes, making it easier to interpret. For example, df -h might output columns for filesystem, size, used, available, use percentage, and mount point, providing a clear overview of storage usage. This helps administrators identify full filesystems, plan for expansion, and manage backups effectively.

A) df – Correct. Provides a snapshot of disk usage across all mounted filesystems, including size, used space, available space, and mount points. Essential for capacity planning, troubleshooting full disks, and maintaining system health. It can also be combined with grep to focus on specific filesystems.

B) du – Reports disk usage for directories and files recursively, allowing administrators to identify which directories consume the most space. While useful for detailed analysis, it does not give a system-wide view of mounted filesystems like df.

C) ls -lh – Lists files and directories in a readable format, showing size per file, permissions, and ownership. It does not provide an overview of total filesystem usage, making it insufficient for monitoring overall disk space.

D) fdisk – Primarily used for partitioning disks, not for checking filesystem usage. It allows viewing partition tables, creating or deleting partitions, but does not display space utilization of mounted filesystems.

Monitoring disk usage with df is critical in Linux Essentials. Administrators often combine it with alerts or scripts to prevent storage exhaustion, maintain system stability, and ensure proper functioning of applications. Understanding the distinction between df for overall filesystem usage and du for directory-level analysis is crucial for efficient system administration. Proper use of these commands supports proactive maintenance, security, and operational reliability.

Question 47

Which command is used to display all open network connections and listening ports?

A) netstat -tuln
B) ifconfig
C) ip addr
D) ping

Answer: A) netstat -tuln

Explanation:

Network monitoring is vital for ensuring services are running, identifying unauthorized connections, and troubleshooting connectivity issues. The netstat command provides information about network connections, routing tables, interface statistics, and listening ports. The options -tuln refine the output: -t shows TCP connections, -u shows UDP connections, -l displays only listening sockets, and -n prevents resolution of hostnames and port names for faster output. For example, running netstat -tuln can help identify if the SSH service is listening on port 22 or if a web server is accepting connections on port 80.

A) netstat -tuln – Correct. Lists all open TCP and UDP ports in a numeric format, showing listening services and active connections. It is essential for network troubleshooting, verifying service availability, and detecting potential intrusions. Administrators use this command to monitor traffic, confirm service bindings, and audit network usage.

B) ifconfig – Displays network interface configurations, including IP addresses and interface status. While useful for checking connectivity, it does not provide a list of open ports or connections.

C) ip addr – Shows detailed network interface information, including IP addresses and broadcast settings. It does not display open network connections or listening ports.

D) ping – Tests connectivity to another host by sending ICMP packets. It does not provide information about active services or listening ports. The ping command helps administrators quickly determine if a remote host is reachable over the network and measures round-trip time for packets, providing an indication of network latency and reliability. Options like -c allow specifying the number of packets to send, while -i can adjust the interval between packets. ping is essential for troubleshooting network issues, verifying connectivity before deploying services, and ensuring that hosts are online. While it does not reveal port status or detailed network topology, it remains a fundamental tool for Linux Essentials certification, as understanding basic connectivity testing is crucial for both system administration and network troubleshooting.

Understanding open network connections is critical for Linux Essentials. Administrators must verify which services are active, identify unexpected listening ports, and ensure security policies are enforced. netstat -tuln provides an efficient way to monitor TCP and UDP ports, helping troubleshoot firewall issues, service failures, and network performance problems.

Question 48

Which of the following commands is used to create a new directory?

A) mkdir
B) touch
C) cp
D) rmdir

Answer: A) mkdir

Explanation: Creating directories is a basic task in Linux for organizing files, managing projects, and structuring filesystems. The mkdir command creates a new directory with a specified name. For example, mkdir /home/alice/projects creates a directory named projects under /home/alice. The -p option allows creating nested directories, such as mkdir -p /home/alice/projects/python, creating all required parent directories automatically. Proper directory management helps administrators maintain an organized filesystem, prevent conflicts, and facilitate access control.

A) mkdir – Correct. Creates new directories. Essential for organizing files, setting up project structures, and preparing environments for applications. Using the -p option is especially useful for complex directory hierarchies.

B) touch – Creates an empty file or updates the modification time of an existing file. It does not create directories.

C) cp – Copies files or directories but does not create new directories on its own unless used with -r for recursive copy of an existing directory.

D) rmdir – Removes empty directories. It cannot create directories, only delete them, and fails if the directory contains files.

Understanding directory creation is foundational for Linux Essentials. Proper use of mkdir ensures administrators can prepare structured directories for applications, backups, and projects. Mismanagement of directories can lead to cluttered filesystems, permission issues, and difficulties in maintaining security policies. Combining mkdir with chmod and chown allows administrators to not only create directories but also control access efficiently.

Question 49

Which command is used to display currently logged-in users?

A) who
B) w
C) users
D) all of the above

Answer: D) all of the above

Explanation: 

Monitoring active users is crucial for security, auditing, and performance management. Linux provides multiple commands to display information about logged-in users. The who command lists logged-in users with their terminal and login time. For example, who shows alice pts/0 2025-11-14 09:15, indicating the username, terminal, and login timestamp.

The w command extends this information by showing what each user is doing, including the processes they are running, system uptime, and load averages. For example, w might display that bob is running top on pts/1.

The users command provides a simple list of currently logged-in usernames without additional details, suitable for quick checks in scripts or monitoring sessions.

A) who – Displays logged-in users, terminals, and login times. Useful for auditing and tracking user activity.

B) w – Displays users along with what commands they are executing and system load. Useful for detailed monitoring.

C) users – Lists only usernames in the current session, useful for quick checks.

D) all of the above – Correct. All three commands provide valid information about logged-in users, each with varying levels of detail. Understanding the differences allows administrators to choose the most appropriate tool for monitoring, auditing, or scripting purposes. Proper use of these commands supports Linux Essentials objectives related to user management, system monitoring, and security.

Question 50

Which command is used to display the last lines of a file?

A) head
B) tail
C) cat
D) less

Answer: B) tail

Explanation: 

Monitoring log files, output files, or data streams often requires viewing the last few lines to check recent activity or errors. The tail command displays the last lines of a file by default, typically the last ten lines, but this can be adjusted using the -n option. For example, tail -n 20 /var/log/syslog shows the last 20 lines of the syslog. The -f option allows continuous monitoring of a file as it grows, which is useful for watching live log updates in real time. This functionality is widely used for debugging, monitoring system processes, and tracking application activity.

A) head – Displays the first lines of a file rather than the last. Useful for previewing the beginning of files but not for monitoring recent activity.

B) tail – Correct. Displays the last lines of a file and can continuously monitor updates using -f. Essential for real-time log monitoring and troubleshooting.

C) cat – Concatenates and displays the entire contents of a file. Not suitable for viewing only the last few lines, especially for large files.

D) less – Allows scrolling through a file interactively but does not provide a direct command to display only the last lines without manual navigation.

Mastering tail is crucial for Linux Essentials, particularly for examining logs, monitoring system events, and troubleshooting errors efficiently. Understanding the use of -n and -f options enables administrators to perform targeted monitoring and real-time system observation, critical for operational efficiency and timely intervention.

Question 51

Which command is used to compare two files line by line?

A) diff
B) cmp
C) comm
D) sort

Answer: A) diff

Explanation: 

Comparing files is essential for version control, debugging scripts, and auditing configurations. The diff command compares two files line by line and outputs the differences, indicating which lines need to be added, deleted, or changed. For example, diff file1.txt file2.txt shows which lines differ, using symbols like < and > to indicate file origin. This is especially useful for configuration files, source code, and text-based datasets.

A) diff – Correct. Compares files line by line and highlights differences. Useful for version control, reviewing changes, and troubleshooting configuration inconsistencies. Administrators use it to verify file integrity and ensure correct deployments.

B) cmp – Compares files byte by byte and reports the first difference. Useful for binary file comparisons but less readable for line-based text comparison.

C) comm – Compares sorted files line by line and outputs unique and common lines. Requires pre-sorted input, making it less flexible for general text comparison.

D) sort – Sorts lines in files but does not perform comparisons. Often used in conjunction with comm for sorted comparisons.

Mastering diff ensures administrators can detect changes accurately, maintain configuration consistency, and troubleshoot discrepancies efficiently. Proper usage of diff supports tasks such as patch management, source code review, and system auditing, aligning with Linux Essentials objectives.

Question 52

Which command is used to display the process ID and status of a process?

A) ps
B) top
C) pidof
D) all of the above

Answer: D) all of the above

Explanation:

Process monitoring is a core skill in Linux. Understanding which processes are running, their IDs, and current status is essential for performance monitoring, troubleshooting, and process management. The ps command displays running processes, their PID, user, CPU usage, memory usage, and status. For example, ps aux shows all processes across the system with detailed metrics.

The top command provides a real-time, dynamic view of processes, including PIDs, CPU and memory usage, and runtime status. Administrators can sort and filter processes, making it useful for monitoring high-resource processes or investigating performance issues.

The pidof command finds the PID of a specific running program, useful for scripting or for sending signals to specific processes. For example, pidof sshd returns the process ID(s) of SSH daemon instances.

A) ps – Displays detailed static process information. Essential for snapshot-based process monitoring.

B) top – Provides real-time, interactive process monitoring with dynamic statistics.

C) pidof – Returns the PID(s) of a specific program, useful for targeted process management.

D) all of the above – Correct. Each command provides different levels of process information. Together, they give administrators comprehensive tools to manage and monitor processes efficiently. Mastering these commands is fundamental for Linux Essentials, enabling troubleshooting, performance tuning, and system stability.

Question 53

Which command is used to find files by name recursively in a directory?

A) find
B) locate
C) whereis
D) which

Answer: A) find

Explanation: 

Locating files is essential for administration, troubleshooting, and scripting. The find command searches directories recursively based on name, type, size, permissions, modification time, or ownership. For example, find /home -name “*.txt” finds all .txt files under /home. It is extremely flexible, allowing complex searches and actions on matched files using -exec.

A) find – Correct. Recursively searches directories for files based on conditions. Essential for locating unknown files, auditing, and scripting automated actions.

B) locate – Uses a pre-built database to find files quickly. Fast but may be outdated if the database is not refreshed with updatedb.

C) whereis – Locates binaries, source, and manual files for a command but does not search arbitrary directories.

D) which – Displays the path of executables in the PATH environment variable only, not general file searches.

Mastering find enables administrators to locate files efficiently, automate maintenance, and perform targeted actions, aligning with Linux Essentials objectives and real-world administration.

Question 54

Which command displays currently mounted filesystems and mount points?

A) mount
B) df
C) lsblk
D) umount

Answer: A) mount

Explanation: 

Identifying mounted filesystems is critical for system management, storage monitoring, and troubleshooting. The mount command displays all currently mounted filesystems, their mount points, options, and device information. For example, running mount shows /dev/sda1 on / type ext4 (rw,relatime) indicating the device, mount point, filesystem type, and options.

A) mount – Correct. Displays all mounted filesystems with device, mount point, type, and options. Useful for verifying mounts, troubleshooting access issues, and planning backups.

B) df – Shows disk usage for mounted filesystems, not all mount options. Useful for capacity monitoring but less detailed for configuration.

C) lsblk – Shows block devices and mount points, but not filesystem options or mount flags.

D) umount – Used to unmount filesystems; it does not display mounts.

Mastering mount helps administrators verify filesystem status, troubleshoot mount issues, and plan system changes. Understanding device-to-mount relationships is essential for Linux Essentials.

Question 55

Which command is used to create a symbolic link?

A) ln -s
B) ln
C) cp -s
D) ln -f

Answer: A) ln -s

Explanation: Symbolic links, or symlinks, are pointers to files or directories. They allow multiple references to a single file without duplication, useful for shared resources, shortcuts, or configuration management. The ln -s command creates a symlink. For example, ln -s /home/alice/file.txt /tmp/link.txt creates a link pointing to the original file. Symlinks can point to files or directories and are distinct from hard links in that they can cross filesystem boundaries and indicate broken links if the target is deleted.

A) ln -s – Correct. Creates symbolic links. Critical for resource management, configuration organization, and scripting.

B) ln – Creates hard links by default, which are references to the same inode. Cannot span filesystems.

C) cp -s – Does not exist. Copying with symbolic link creation is not a valid syntax.

D) ln -f – Forces overwrite of existing links but does not create a symlink alone. Must combine with -s for symbolic links.

Understanding symbolic links is fundamental in Linux Essentials. Administrators use them to manage shared configurations, reduce redundancy, and maintain organized filesystems. Symlinks also facilitate software deployment and version control across directories.

Question 56

Which command displays system boot time and uptime?

A) uptime
B) who -b
C) last reboot
D) all of the above

Answer: D) all of the above

Explanation: 

System uptime and boot time are essential for monitoring stability, troubleshooting, and scheduling maintenance. The uptime command shows how long the system has been running, the number of logged-in users, and load averages. For example, uptime might output 15:45 up 2 days, 4:30, 3 users, load average: 0.12, 0.10, 0.08.

The who -b command directly shows the last system boot time. last reboot lists reboot events, providing historical boot information.

A) uptime – Shows current uptime and system load averages.

B) who -b – Displays last boot time.

C) last reboot – Displays historical reboot events.

D) all of the above – Correct. All three commands provide valuable uptime and boot information for Linux system monitoring and maintenance, which is essential knowledge for Linux Essentials.

Question 57

Which command displays kernel version and OS information?

A) uname -r
B) uname -a
C) cat /etc/os-release
D) all of the above

Answer: D) all of the above

Explanation:
Kernel and OS version information is important for software compatibility, troubleshooting, and system auditing. The uname -r command shows the kernel version. uname -a displays full system information, including kernel, hostname, architecture, and OS details. The file /etc/os-release contains distribution-specific information like NAME, VERSION, and ID. Using all these tools ensures administrators can accurately determine system identity and environment for installations, patches, and debugging.

A) uname -r – Shows kernel version.

B) uname -a – Shows full system and kernel information.

C) cat /etc/os-release – Displays detailed OS distribution information.

D) all of the above – Correct. Using all tools provides comprehensive system identification, which is critical for Linux Essentials knowledge and practical administration.

Question 58 

Which command is used to display hidden files in a directory?

A) ls -a
B) ls -l
C) ls -h
D) ls -R

Answer: A) ls -a

Explanation: 

Hidden files in Linux start with a dot (.) and often contain configuration settings. The ls -a command lists all files, including hidden ones. For example, ls -a /home/alice displays .bashrc, .profile, and other hidden configuration files alongside normal files. Monitoring hidden files is important for troubleshooting, configuration management, and auditing.

A) ls -a – Correct. Lists hidden files. Essential for viewing configuration files and system settings that are not displayed by default.

B) ls -l – Displays long format, permissions, and ownership but does not include hidden files unless combined with -a.

C) ls -h – Displays sizes in human-readable format, not hidden files.

D) ls -R – Recursively lists files in subdirectories, not hidden files by default.

Mastering ls -a is fundamental for Linux Essentials. Hidden files often contain user or system configurations. Accessing them is critical for troubleshooting, modifying user environments, and managing system settings. Administrators must know how to reveal these files without disrupting normal filesystem visibility.

Question 59

Which command is used to change file permissions?

A) chmod
B) chown
C) umask
D) ls -l

Answer: A) chmod

Explanation: File permissions control access in Linux and are essential for security and proper system functioning. The chmod command modifies read, write, and execute permissions for the owner, group, and others. Permissions can be changed symbolically (e.g., chmod u+x file.txt) or numerically (e.g., chmod 755 file.txt). Understanding permissions ensures files are accessible only to authorized users and prevents accidental modifications.

A) chmod – Correct. Changes file permissions using symbolic or numeric notation. Critical for managing access, security, and operational safety.

B) chown – Changes ownership of files, not permissions.

C) umask – Sets default permissions for newly created files but does not modify existing files.

D) ls -l – Displays permissions but does not modify them.

Mastering chmod is foundational for Linux Essentials. It enables administrators to secure files, enforce policies, and prevent unauthorized access. Proper use ensures compliance with security best practices and operational safety.

Question 60

Which command shows the full path of a command executable?

A) which
B) whereis
C) type
D) all of the above

Answer: D) all of the above

Explanation: 

Finding the location of executable commands is essential for troubleshooting, scripting, and system administration. The which command returns the path of the executable used by the current shell. For example, which ls might return /bin/ls. whereis shows paths for binaries, source files, and man pages, useful for locating documentation and source code. The type command provides information about whether a command is a built-in, alias, or executable path. Understanding these tools allows administrators to diagnose command conflicts, ensure correct binaries are used, and maintain script portability.

A) which – Returns the path of the command executed by the shell. Useful for troubleshooting and scripting.

B) whereis – Returns paths for binaries, sources, and man pages. Useful for system exploration and documentation lookup.

C) type – Provides command type information, including aliases and built-in status.

D) all of the above – Correct. Using these commands together provides comprehensive insight into command locations and behavior. This knowledge is essential for Linux Essentials, ensuring proper system operation and script reliability.

img