LPI 010-160 Linux Essentials Certificate Exam, version 1.6 Exam Dumps and Practice Test Questions Set5 Q81-100

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

Question 81

Which command is used to list all currently loaded kernel modules?

A) lsmod
B) modinfo
C) insmod
D) rmmod

Answer: A) lsmod

Explanation:

Kernel modules are pieces of code that can be loaded and unloaded into the Linux kernel to extend its functionality without rebooting the system. Modules handle hardware drivers, filesystems, and system capabilities dynamically. Understanding which modules are loaded is crucial for troubleshooting, hardware detection, and system optimization.

The lsmod command lists all currently loaded kernel modules along with their size and usage count. This allows administrators to identify which drivers are active, verify that hardware support is available, and diagnose potential conflicts. For example, running lsmod | grep nvidia can confirm whether the NVIDIA graphics driver module is loaded. The output also includes a count of dependencies, helping administrators understand module relationships and their impact on system functionality.

A) lsmod – Correct. Displays loaded modules and their dependencies, essential for verifying hardware support, debugging driver issues, and maintaining system stability.

B) modinfo – Provides detailed information about a specific module, such as version, author, license, and parameters. While informative, it does not list currently loaded modules.

C) insmod – Loads a module into the kernel. This is a management command, not a display command, and requires exact paths to module files.

D) rmmod – Removes a module from the kernel. Used for administrative tasks but not for listing loaded modules.

Mastery of lsmod is essential for Linux Essentials. Administrators use it to verify hardware recognition, troubleshoot kernel-level errors, and ensure proper driver loading. By combining lsmod with modinfo or dmesg, administrators can investigate driver issues or system crashes related to kernel modules. Understanding module management also helps optimize system performance, avoid conflicts, and ensure reliable operation in multi-user environments. Using lsmod effectively enables system administrators to maintain a stable, secure, and properly configured Linux system, which is a fundamental requirement for Linux Essentials certification.

Question 82
Which command is used to display the last logged in users?

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

Answer: D) all of the above

Explanation:

Tracking user logins is an essential aspect of system administration, auditing, and security monitoring. Linux provides several tools for this purpose, each with different focuses and outputs.

The last command reads the /var/log/wtmp file and displays a list of all logins, including date, time, duration, and terminal used. For example, last shows when a user logged in, how long the session lasted, and whether they logged out cleanly. This is useful for auditing access, identifying unauthorized logins, and analyzing user activity over time.

The who command shows users currently logged into the system. It provides information such as username, terminal, login time, and originating IP or hostname. It is particularly useful for real-time monitoring of active sessions and understanding current system usage.

The w command expands upon who by also showing active processes and CPU/memory usage for each logged-in user. This helps administrators identify resource-intensive sessions, monitor multi-user environments, and troubleshoot performance issues caused by specific users.

A) last – Correct. Displays historical login information from /var/log/wtmp, ideal for auditing past activity and investigating user sessions. The last command provides details such as usernames, login terminals, IP addresses, login and logout times, and session durations. Administrators use it to track user activity, identify unauthorized access attempts, and analyze patterns in system usage over time. Combined with other log monitoring tools, last helps maintain security and accountability, making it an essential utility for Linux Essentials certification and day-to-day system administration.

B) who – Correct. Shows active sessions in real-time, providing insight into current user activity. The who command displays information such as logged-in usernames, terminal devices, login times, and originating IP addresses for remote connections. It is useful for administrators to monitor live sessions, verify user access, and quickly identify unauthorized logins. While it does not provide historical data, who complements tools like last and w for real-time system monitoring, session management, and troubleshooting in multi-user environments, making it a foundational skill for Linux Essentials certification.

C) w – Correct. Provides both user session and process activity, enabling administrators to monitor resource usage along with login status. The w command displays detailed information including usernames, terminal sessions, login times, idle times, CPU usage, and the commands currently being executed. It is particularly useful for real-time monitoring of system activity, identifying resource-intensive processes, and observing user behavior. Unlike who, which only shows login sessions, w combines session and process data, giving a more complete picture of system usage. Administrators can leverage this information for troubleshooting performance issues, managing workloads, and maintaining efficient multi-user environments. Mastery of the w command is important for Linux Essentials certification as it emphasizes practical skills in system monitoring and resource management.

D) all of the above – Correct. Each command provides complementary information, allowing administrators to monitor both historical and real-time user activity. Mastery of these commands is critical for Linux Essentials, as it supports user accountability, auditing, and system security. Using these tools, administrators can detect unauthorized access, monitor active sessions, and correlate resource usage with user activity. Understanding the differences between these commands ensures efficient monitoring, compliance with security policies, and proactive system management in multi-user or enterprise environments.

Question 83

Which command is used to display the hostname of the system?

A) hostname
B) uname -n
C) cat /etc/hostname
D) all of the above

Answer: D) all of the above

Explanation:

The hostname identifies a system on a network, making it essential for network administration, scripting, and troubleshooting connectivity issues. Linux provides multiple ways to retrieve the hostname depending on the level of detail or context required.

The hostname command displays or sets the system hostname. Running hostname without arguments simply prints the current hostname, while hostname newname can temporarily change it for the running session. Hostname changes via this command may require additional configuration to persist across reboots, typically by modifying /etc/hostname.

The uname -n command is part of the uname suite, which provides system information. The -n flag returns the nodename, which is effectively the hostname of the system. This is useful in scripts or monitoring tools that rely on system metadata to report host identity.

The /etc/hostname file stores the persistent hostname configuration. Using cat /etc/hostname allows administrators to read the system’s permanent hostname, ensuring consistency after reboots. This is especially important in networked environments or servers where hostname consistency is critical for DNS, SSH, and configuration management.

A) hostname – Correct. Directly displays or sets the hostname, commonly used for interactive or temporary hostname changes. The hostname command allows administrators to view the current system name or set a new one with a simple syntax like hostname newname. While changes made with this command are effective immediately, they may not persist across reboots unless configured in system files or through hostnamectl. It is useful for network identification, troubleshooting, and testing during system configuration or deployment. Understanding the hostname command is essential for Linux Essentials certification, as it provides foundational knowledge for managing system identity and network communication in Linux environments.

B) uname -n – Correct. Provides the nodename in scripts or automated system reporting. The uname -n command returns the network node hostname of the system, which is useful for identifying machines in scripts, logs, or monitoring tools. By retrieving the nodename programmatically, administrators can automate tasks, generate system reports, or manage configurations across multiple hosts. This capability is especially helpful in large-scale or multi-server environments where consistent identification of systems is critical. Understanding how to use uname -n is important for Linux Essentials certification, as it demonstrates practical knowledge of system information commands and their applications in automation and system administration tasks.

C) cat /etc/hostname – Correct. Reads the persistent hostname from configuration files, ensuring accuracy after reboots. The hostnamectl command retrieves and manages the static, transient, and pretty hostnames of a system, providing a reliable method for hostname management. Unlike the hostname command, which may only change the hostname temporarily, hostnamectl ensures that changes persist across system restarts. It is commonly used in system administration, automated deployments, and multi-host configurations to maintain consistent network identity. Additionally, hostnamectl can display hardware and operating system details, offering administrators a convenient way to gather comprehensive system information. Mastery of hostnamectl is essential for Linux Essentials certification, as it emphasizes both proper hostname management and understanding persistent system configuration practices.

D) all of the above – Correct. Using all three methods allows administrators to verify current, temporary, and persistent hostnames, which is essential for system identification, network management, and scripting in Linux Essentials. Knowing multiple ways to retrieve the hostname ensures flexibility in troubleshooting, configuration, and automation tasks, supporting both desktop and server environments.

Question 84

Which command is used to display disk usage for directories and files?

A) du
B) df
C) ls -lh
D) all of the above

Answer: A) du

Explanation:

Monitoring disk usage is crucial for maintaining system performance, preventing full filesystems, and managing storage efficiently. The du (disk usage) command estimates and displays the space used by files and directories recursively. For example, du -sh /var/log shows the total disk usage of the /var/log directory in human-readable format, providing administrators a quick summary of space consumption. du can also break down usage per subdirectory or file with du -h –max-depth=1 /var/log, which helps identify large files or directories that may require cleanup.

The df command reports overall filesystem usage rather than individual files. It shows total size, used, available space, and mount points. While important for monitoring free space across partitions, it does not provide detailed per-directory analysis.

The ls -lh command lists files in a directory with human-readable sizes, but it does not calculate total space for directories recursively. It is more suited for examining individual files.

A) du – Correct. Essential for analyzing space usage by directories and files, critical for maintenance, backups, and system optimization. The du command provides a summary of disk usage, allowing administrators to identify large files or directories consuming excessive space. Options like -h (human-readable) and -s (summary) make the output easier to interpret. By regularly monitoring disk usage with du, administrators can proactively manage storage, prevent system crashes due to full disks, and plan for data archiving or cleanup. Combined with other tools like df, which shows overall filesystem usage, du is indispensable for efficient Linux system administration and is a key topic in the Linux Essentials certification.

B) df – Displays filesystem-level usage, useful for partition monitoring, but not detailed directory usage. The df command provides information about total space, used space, available space, and mount points for each filesystem. Options like -h make the output human-readable, while -T shows filesystem types. Administrators rely on df to ensure that partitions do not fill up, which can cause system instability or application failures. It is particularly useful for monitoring storage across multiple mounted filesystems and planning capacity upgrades. When combined with tools like du, which provides detailed directory-level usage, df offers a comprehensive view of storage allocation, making it a fundamental tool for Linux system maintenance and a key topic in Linux Essentials certification.

C) ls -lh – Shows file sizes in a directory but does not calculate total disk usage recursively. The ls -lh command lists files with human-readable sizes, making it easier to identify large files at a glance. Administrators and users can combine it with options like -a to include hidden files or -S to sort by size. While ls -lh provides a quick overview of individual file sizes within a directory, it does not summarize the cumulative disk usage of subdirectories. For deeper analysis, it is often used alongside du for recursive calculations, helping administrators manage storage, identify space-consuming files, and optimize disk usage. Mastery of ls -lh is important for Linux Essentials certification as it forms a fundamental part of file system navigation and storage monitoring.

D) all of the above – Incorrect because only du accurately reports disk usage at the directory level.

Mastery of du is critical for Linux Essentials. Administrators use it to identify large directories, monitor log growth, and plan storage expansion. Combining du with sort -h helps highlight directories consuming the most space, supporting proactive system maintenance and operational efficiency. Understanding the distinctions between du, df, and ls ensures that administrators use the right tool for the right level of detail, preventing misinterpretation of disk usage data and enabling effective storage management in Linux environments.

Question 85 

Which command is used to compare the contents of two files line by line?

A) diff
B) cmp
C) comm
D) all of the above

Answer: D) all of the above

Explanation: 

Comparing files is important for troubleshooting, version control, and configuration management. Linux provides multiple tools to compare file contents at different levels of detail and output formats.

The diff command compares files line by line and outputs the differences in a human-readable format, showing which lines have been added, deleted, or changed. For example, diff file1.txt file2.txt highlights changes, helping administrators track configuration updates or edits in scripts. diff can also produce output suitable for patch creation, making it useful for software maintenance.

The cmp command compares files byte by byte and reports the first difference found. It is useful when exact binary comparison is required, such as validating executable files, images, or data integrity checks. For example, cmp file1.bin file2.bin will indicate the position of the first byte that differs.

The comm command compares two sorted files line by line and outputs three columns: lines unique to the first file, lines unique to the second file, and lines common to both. This is useful for set operations or identifying overlapping content in sorted datasets.

A) diff – Correct. Provides human-readable line-by-line differences and supports patching.

B) cmp – Correct. Performs byte-level comparison, useful for precise validation.

C) comm – Correct. Compares sorted files and identifies unique and common lines.

D) all of the above – Correct. Each command serves different comparison purposes. Mastery of these tools is critical for Linux Essentials, allowing administrators to track configuration changes, validate file integrity, and manage scripts or system data efficiently. Knowing when to use diff, cmp, or comm ensures accurate comparisons for both text and binary files, supporting troubleshooting, auditing, and automated file management workflows.

Question 86

Which command is used to display system uptime and load averages?

A) uptime
B) w
C) top
D) all of the above

Answer: D) all of the above

Explanation: 

Monitoring system uptime and load is essential for evaluating system stability, performance, and capacity planning. The uptime command displays how long the system has been running, the number of logged-in users, and the system load averages over the last 1, 5, and 15 minutes. For example, uptime might output: “12:34:56 up 5 days, 4:32, 3 users, load average: 0.15, 0.10, 0.05.” This information is crucial for administrators to understand system utilization trends, identify performance bottlenecks, and make operational decisions.

The w command shows active users and their processes, along with system uptime and load averages, providing both user activity and performance context.

The top command is an interactive monitoring tool that displays system load, uptime, CPU, memory usage, and running processes in real-time. Administrators can sort processes by resource usage, identify high-load applications, and monitor system performance dynamically.

A) uptime – Correct. Provides a concise summary of system running time, users, and load averages.

B) w – Correct. Includes uptime, load averages, and active user sessions, useful for multi-user monitoring.

C) top – Correct. Offers real-time monitoring, including load averages and system resource usage.

D) all of the above – Correct. Each tool provides valuable insights for system monitoring and administration. Mastery of these commands is essential for Linux Essentials, as they enable administrators to assess system performance, troubleshoot resource-intensive processes, and ensure operational reliability. Using these commands helps identify trends, prevent system overload, and optimize workload distribution in multi-user or production environments.

Question 87 

Which command is used to display the current shell environment?

A) echo $SHELL
B) env
C) printenv
D) all of the above

Answer: D) all of the above

Explanation: 

Understanding the current shell environment is fundamental for scripting, command execution, and system administration. The echo $SHELL command outputs the path to the user’s default shell, such as /bin/bash or /bin/zsh, which determines shell behavior, features, and scripting syntax.

The env command lists all environment variables, including shell-related settings, providing insight into paths, locale, terminal type, and more. This is critical for verifying configuration and troubleshooting environment-dependent issues.

The printenv command displays specific environment variables or all of them, depending on usage. For example, printenv PATH shows the executable search path, which is crucial for understanding which binaries will execute when commands are run.

A) echo $SHELL – Correct. Shows the default shell for the current user session.

B) env – Correct. Lists all environment variables and settings affecting the shell and processes.

C) printenv – Correct. Displays individual or all environment variables, useful for troubleshooting.

D) all of the above – Correct. Combined usage provides a full understanding of the shell environment, ensuring scripts run correctly, commands execute as intended, and system behavior matches configuration expectations. Mastery of these commands supports Linux Essentials certification objectives, particularly in environment management, scripting, and system troubleshooting.

Question 88 

Which command is used to create a symbolic link?

A) ln -s target link_name
B) ln target link_name
C) cp -s target link_name
D) all of the above

Answer: A) ln -s target link_name

Explanation: 

Symbolic links, also known as symlinks or soft links, are references to files or directories that act as shortcuts or aliases. They allow multiple references to the same file without duplicating data. The ln -s target link_name command creates a symbolic link where target is the file or directory to point to, and link_name is the symlink. This is essential for organizing file structures, managing libraries, or redirecting paths in scripts.

Using ln without -s creates a hard link, which directly links inode data rather than creating a reference. Hard links cannot span filesystems or link directories, making symbolic links more flexible for general use.

cp -s is not a standard command and does not create symbolic links. Attempting to use it may result in an error, reinforcing that ln -s is the correct method.

A) ln -s target link_name – Correct. Creates a flexible symbolic link essential for Linux filesystem management, library linking, and script path resolution.

B) ln target link_name – Creates a hard link, not a symbolic link. Useful for duplicate inode referencing but limited compared to symlinks.

C) cp -s target link_name – Incorrect. Not a valid method for creating symbolic links.

D) all of the above – Incorrect. Only ln -s creates symbolic links. Mastery of symbolic links is critical for Linux Essentials. Administrators use symlinks to manage software versions, configure environment paths, and simplify filesystem navigation. Correct usage prevents broken links, ensures scripts and services reference the correct files, and maintains system organization efficiently.

Question 89

Which command is used to search for files by name within a directory hierarchy?

A) find /path -name “filename”
B) locate filename
C) which filename
D) all of the above

Answer: A) find /path -name “filename”

Explanation: 

Locating files efficiently is crucial for system administration, troubleshooting, and data management. The find command searches directories recursively and matches filenames, patterns, or attributes. For example, find /home -name “report.txt” searches /home and all subdirectories for report.txt. find supports complex searches using conditions like size, modification time, permissions, and ownership, making it highly flexible for administrative tasks.

The locate command searches a prebuilt database of files, which is fast but may not reflect real-time filesystem changes unless updated using updatedb. This can lead to outdated results in dynamic systems.

The which command locates executables in the PATH environment variable, not arbitrary files in the filesystem, making it unsuitable for general file searches.

A) find /path -name “filename” – Correct. Recursively searches directories, highly flexible, suitable for Linux Essentials tasks. The find command allows administrators and users to locate files and directories based on name, type, size, modification time, permissions, and other criteria. Options like -name, -type, -size, and -mtime make it extremely versatile for targeted searches. Combined with -exec, it can perform actions on matching files, such as moving, deleting, or changing permissions. find is particularly useful for system maintenance, troubleshooting, backup preparation, and automation scripts. Its ability to traverse complex directory structures and apply precise filters makes it an essential tool for both practical Linux administration and Linux Essentials certification preparation, as it teaches users to efficiently manage and locate files in multi-level filesystem hierarchies.

B) locate filename – Useful for quick searches based on an index but may be outdated. The locate command relies on a periodically updated database, typically maintained by updatedb, to find files by name almost instantly. Because it searches the database rather than the live filesystem, recently created or moved files may not appear until the database is refreshed. This makes locate extremely fast for general searches, especially on large filesystems, but less reliable for real-time queries. Administrators often combine it with updatedb to ensure accuracy. Its speed and simplicity make it a practical tool for system maintenance, troubleshooting, and everyday Linux Essentials tasks, even though it requires understanding its limitations compared to real-time search tools like find.

C) which filename – Limited to executables in PATH, not general file searches. The which command helps administrators and users determine the full path of commands that are available in the system’s executable search path. It does not search for files outside directories listed in PATH, nor does it find scripts or non-executable files. This makes which particularly useful for verifying which version of a command will be executed in a session, troubleshooting command conflicts, and ensuring that scripts or programs reference the correct binaries. Mastery of which is important for Linux Essentials certification because it teaches users to verify command locations, understand environment path configurations, and manage executable availability efficiently.

D) all of the above – Incorrect. Only find performs the required directory hierarchy search. Mastery of find is fundamental for Linux Essentials, enabling administrators to locate configuration files, scripts, or logs quickly, apply filters, and perform automated operations based on search results. Using find effectively improves troubleshooting, automation, and system organization.

Question 90

Which command is used to check open ports and listening services on a Linux system?

A) netstat -tuln
B) ss -tuln
C) lsof -i
D) all of the above

Answer: D) all of the above

Explanation:

Monitoring network activity is essential for security, troubleshooting, and system management. Linux provides multiple tools for inspecting open ports, listening services, and network connections.

netstat -tuln lists TCP/UDP listening ports numerically without resolving hostnames. It shows active connections, the state of sockets, and protocol usage. Administrators use this to identify which services are running and exposed on the network.

ss -tuln is the modern replacement for netstat, providing faster output and more options. It also displays sockets, listening ports, and associated processes efficiently.

lsof -i lists all network connections and the processes associated with them, offering detailed information about open files and sockets. For example, lsof -i :80 shows processes using port 80.

A) netstat -tuln – Correct. Displays listening ports and services for TCP/UDP, widely used for network monitoring.

B) ss -tuln – Correct. Modern, faster alternative to netstat, providing detailed socket information.

C) lsof -i – Correct. Shows network connections associated with processes, useful for identifying which application is using a port.

D) all of the above – Correct. Mastery of these commands allows administrators to monitor network activity, troubleshoot connectivity, detect unauthorized services, and maintain system security, which is critical for Linux Essentials certification. Proper use ensures that administrators can maintain secure and well-functioning networked Linux systems.

Question 91

Which command is used to check file permissions and ownership?

A) ls -l
B) stat
C) getfacl
D) all of the above

Answer: D) all of the above

Explanation: 

File permissions are critical in Linux for security, multi-user access control, and operational reliability. The ls -l command lists files and directories with permissions, owner, group, and file size. For example, -rw-r–r– 1 alice users 1024 file.txt shows read/write permissions for the owner, read-only for group and others, along with ownership.

The stat command provides detailed information about a file, including inode, size, timestamps, and permissions in numeric format, which is useful for auditing and scripting.

The getfacl command displays Access Control Lists (ACLs) when extended permissions are used, showing detailed user/group access beyond standard UNIX permissions.

A) ls -l – Correct. Shows basic permissions and ownership. The ls -l command lists files and directories along with their permissions, number of links, owner, group, size, and modification date. The permissions section displays read, write, and execute rights for the owner, group, and others, allowing administrators to quickly verify access settings. This command is essential for troubleshooting permission issues, auditing file security, and ensuring proper access controls in multi-user environments. While it does not modify permissions, ls -l provides a clear and immediate view of file ownership and security attributes, forming a foundational skill for Linux Essentials certification and day-to-day system administration.

B) stat – Correct. Provides detailed file information, useful for auditing and scripts. The stat command displays comprehensive metadata about files and directories, including inode number, size, permissions, ownership, access, modification, and change times. Administrators and users can leverage this information to verify file integrity, monitor changes, and automate tasks in scripts. For example, stat filename gives insight into when a file was last accessed or modified, which is valuable for auditing, backup planning, and security checks. Unlike ls, which provides a summary view, stat offers precise and structured data, making it essential for advanced file management, troubleshooting, and compliance verification, all of which are key skills for Linux Essentials certification.

C) getfacl – Correct. Shows ACLs for files with extended permissions. The getfacl command displays Access Control Lists, which allow more granular permission settings beyond the standard owner, group, and others model. Administrators use it to verify who has read, write, or execute permissions on a file or directory, including specific users or groups. This is particularly useful in multi-user environments where default permissions are insufficient for controlling access. By providing detailed information about extended permissions, getfacl helps maintain security, troubleshoot access issues, and ensure compliance with organizational policies. Understanding getfacl is important for Linux Essentials certification, as it equips users with the ability to manage advanced file permissions and enforce precise access controls in Linux systems.

D) all of the above – Correct. Combined, these tools allow administrators to verify permissions, troubleshoot access issues, and ensure system security, which is essential for Linux Essentials certification.

Question 92

Which command is used to display system information such as OS version, kernel, and architecture?

A) uname -a
B) lsb_release -a
C) hostnamectl
D) all of the above

Answer: D) all of the above

Explanation:

System information is critical for troubleshooting, system management, and compliance.

uname -a provides kernel name, hostname, kernel version, machine hardware, and architecture.

lsb_release -a provides Linux distribution-specific information such as distributor ID, description, release, and codename.

hostnamectl displays system information including hostname, operating system, kernel, and architecture, and is part of modern systemd environments.

A) uname -a – Correct. Shows kernel and hardware info.

B) lsb_release -a – Correct. Shows distribution info.

C) hostnamectl – Correct. Shows OS, kernel, architecture, and hostname.

D) all of the above – Correct. Using these commands ensures administrators have complete knowledge of system information, which is critical for maintenance, deployment, and troubleshooting in Linux Essentials.

Question 93

Which command is used to display all environment variables?

A) env
B) printenv
C) set
D) all of the above

Answer: D) all of the above

Explanation:

Environment variables affect shell behavior, scripts, and process execution.

env lists all current environment variables and their values, commonly used to pass variables to scripts or processes.

printenv outputs environment variables, either all or specific ones.

set displays both shell functions and environment variables, providing a comprehensive view of the current shell environment.

A) env – Correct. Lists all environment variables for current session.

B) printenv – Correct. Can output all or specific variables.

C) set – Correct. Provides detailed shell and environment context.

D) all of the above – Correct. Mastery ensures administrators can manage shell behavior, troubleshoot scripts, and configure system environments effectively, a key skill for Linux Essentials.

Question 94

Which command is used to change file ownership?

A) chown user:group file
B) chmod user:group file
C) chgrp group file
D) all of the above

Answer: A) chown user:group file

Explanation: 

File ownership affects access control and security. The chown command changes both the owner and group of a file. For example, chown alice:developers file.txt assigns ownership to user alice and group developers. Proper use of chown ensures secure file access, correct permissions, and compliance with organizational policies.

chmod changes permissions, not ownership.

chgrp changes only the group, not the owner.

A) chown user:group file – Correct. Used for full ownership management, critical for Linux Essentials. The chown command allows administrators to change both the user owner and the group owner of files and directories. Proper ownership management is essential for maintaining security, ensuring that only authorized users can access or modify files. With options like -R for recursive changes, chown can manage entire directory trees efficiently. It is often used in combination with chmod to enforce comprehensive access control policies. Mastery of chown is fundamental for Linux Essentials certification because it teaches users to manage file ownership responsibly, protect system integrity, and support collaborative multi-user environments.

B) chmod user:group file – Incorrect. Only modifies permissions.

C) chgrp group file – Partially correct; only changes group.

D) all of the above – Incorrect. Only chown changes ownership fully.

Question 95

Which command is used to display file type information?

A) file filename
B) stat filename
C) ls -l filename
D) all of the above

Answer: A) file filename

Explanation:

Determining file type is essential for processing, editing, and scripting. The file command analyzes file content and magic numbers to determine type, such as text, binary, image, or script.

stat provides metadata but not file type.

ls -l shows permissions and size but not content type.

A) file filename – Correct. Essential for Linux Essentials to identify file content accurately.

B) stat filename – Incorrect. Shows metadata, not file type.

C) ls -l filename – Incorrect. Shows permissions, size, owner.

D) all of the above – Incorrect. Only file identifies type.

Question 96

Which command is used to create a new directory?

A) mkdir directory_name
B) touch directory_name
C) cp -r source target
D) all of the above

Answer:

A) mkdir directory_name

Explanation:

Creating directories is a basic filesystem task. mkdir creates one or multiple directories at specified paths. For example, mkdir /home/alice/docs creates a directory named docs under /home/alice. Options like -p allow creating nested directories in a single command.

touch creates empty files, not directories.

cp -r copies directories recursively but does not create new directories independently.

A) mkdir directory_name – Correct. Standard method to create directories.

B) touch directory_name – Incorrect; creates empty files.

C) cp -r source target – Incorrect; copies existing directories.

D) all of the above – Incorrect. Only mkdir creates new directories.

Question 97

Which command is used to display all running processes?

A) ps aux
B) top
C) htop
D) all of the above

Answer: D) all of the above

Explanation: 

Process monitoring is critical for system performance and troubleshooting.

ps aux lists all processes with details including PID, memory, CPU usage, and user. It is useful for snapshot views.

top provides interactive real-time process monitoring, allowing sorting by CPU, memory, and other metrics.

htop is an enhanced, interactive version of top, with color coding, process tree view, and easier navigation.

A) ps aux – Correct. Snapshot view of all processes. The ps command provides a static snapshot of currently running processes, including process IDs, terminal associations, CPU and memory usage, and command names. Administrators often use it to monitor active processes, troubleshoot performance issues, and verify that critical services are running. Unlike interactive tools like top or htop, ps gives a one-time snapshot, making it suitable for scripting and automated monitoring tasks. By combining options such as -e for all processes or -f for full-format listing, users can obtain detailed information about process hierarchies and relationships. Understanding ps is essential for Linux Essentials certification because it teaches users to manage, analyze, and troubleshoot processes effectively in multi-user environments.

B) top – Correct. Real-time interactive monitoring. The top command provides a dynamic, continuously updating view of system processes, including CPU and memory usage, running time, process IDs, and system load averages. Administrators can sort processes by resource consumption, send signals to terminate or control processes, and monitor system performance in real time. Unlike static tools such as ps, top allows interactive commands, such as changing the display order or filtering processes, which helps quickly identify resource-intensive tasks or abnormal system behavior. Mastery of top is important for Linux Essentials certification, as it equips users with practical skills for performance monitoring, troubleshooting, and efficient management of active processes in multi-user environments.

C) htop – Correct. Enhanced interactive monitoring. The htop command provides a visually rich, interactive interface for monitoring system processes, CPU, memory, and swap usage in real time. Unlike top, htop offers color-coded bars, easier navigation, and advanced sorting and filtering options. Administrators can scroll through processes vertically and horizontally, kill or renice processes with simple key commands, and view hierarchical process trees to understand parent-child relationships. This makes it particularly useful for quickly identifying resource-intensive processes, debugging performance issues, and managing multi-user systems. Mastery of htop is important for Linux Essentials certification because it demonstrates practical skills in system monitoring, process management, and efficient troubleshooting using modern Linux tools.

D) all of the above – Correct. Each tool provides different methods for process inspection, essential for Linux Essentials.

Question 98

Which command is used to display the currently mounted filesystems?

A) mount
B) df -h
C) cat /proc/mounts
D) all of the above

Answer: D) all of the above

Explanation: 

Mounting determines filesystem accessibility.

mount lists mounted filesystems with device, mount point, and options.

df -h shows mounted filesystems along with usage statistics.

cat /proc/mounts provides a kernel-level view of mounted filesystems.

A) mount – Correct. Lists devices, mount points, and options.

B) df -h – Correct. Shows usage statistics for mounted filesystems.

C) cat /proc/mounts – Correct. Shows all mounted filesystems as recorded by the kernel.

D) all of the above – Correct. Each method is useful for monitoring and troubleshooting mounted filesystems in Linux Essentials.

Question 99

Which command is used to compress files using gzip?

A) gzip file
B) gunzip file.gz
C) tar -czvf archive.tar.gz file
D) all of the above

Answer: A) gzip file

Explanation:

File compression reduces storage usage and facilitates transfers.

gzip file compresses the file and appends .gz extension.

gunzip decompresses .gz files.

tar -czvf creates compressed archives but is not the direct gzip command.

A) gzip file – Correct. Directly compresses individual files.

B) gunzip file.gz – Incorrect; decompresses files.

C) tar -czvf archive.tar.gz file – Incorrect; creates tar+gzip archives.

D) all of the above – Incorrect; only gzip compresses individual files.

Question 100

Which command is used to monitor CPU usage in real time?

A) top
B) htop
C) mpstat
D) all of the above

Answer: D) all of the above

Explanation:

Monitoring CPU usage is essential for performance analysis and troubleshooting.

top displays interactive real-time CPU usage per process and summary statistics.

htop provides enhanced interactive CPU monitoring with color, process tree view, and easy sorting.

mpstat (from sysstat package) provides detailed CPU usage per core over time, useful for performance diagnostics and historical analysis.

A) top – Correct. Interactive real-time CPU monitoring.

B) htop – Correct. Enhanced interactive CPU monitoring.

C) mpstat – Correct. Detailed per-core CPU statistics.

D) all of the above – Correct. Mastery ensures administrators can monitor CPU performance effectively, troubleshoot bottlenecks, and optimize workloads, which is critical for Linux Essentials certification.

 

img