View Full CompTIA XK0-006 Exam Dumps and Practice Test Dumps.
Question 61
Which command is commonly used to show the amount of disk space used by a directory and its contents?
- df -h
- free -h
- du -h
- lsblk
Correct Answer: 3
Explanation
The du -h command shows disk usage for files and directories in a human-readable format. It is useful when an administrator needs to find which directories are consuming a large amount of storage. For example, du -h /var can help identify large areas under /var. The df -h command instead shows available and used space for mounted filesystems. free -h reports memory usage, while lsblk displays block devices. Using du is especially helpful when investigating why a filesystem is becoming full.
Question 62
Which command can display available block devices and their partition information?
- lsblk
- free
- ps
- who
Correct Answer: 1
Explanation
The lsblk command displays information about block devices such as hard drives, SSDs, partitions, and logical volumes. It can help administrators understand how storage is arranged on a Linux system. Additional options can display filesystem information, UUIDs, and mount points. free is used for memory information, ps displays processes, and who shows logged-in users. lsblk is especially useful before performing storage operations because it helps identify the correct disk or partition and reduces the chance of modifying the wrong device.
Question 63
Which command is commonly used to display information about PCI devices installed in a Linux system?
- lsusb
- lspci
- lsmod
- lscpu
Correct Answer: 2
Explanation
The lspci command displays information about PCI devices installed in the system. These devices can include network adapters, storage controllers, graphics hardware, and other expansion devices. This command is useful when troubleshooting hardware recognition or driver problems. lsusb focuses on USB devices, lsmod displays loaded kernel modules, and lscpu provides information about CPU architecture and processors. Administrators can combine these commands when diagnosing hardware-related issues and determining whether Linux properly detects a particular device.
Question 64
Which command is commonly used to display connected USB devices?
- lsusb
- lspci
- usbshow
- deviceusb
Correct Answer: 1
Explanation
The lsusb command displays USB devices connected to a Linux system. It can show information such as device IDs and manufacturers. This is useful when troubleshooting USB keyboards, storage devices, adapters, or other peripherals that are not working as expected. lspci is used for PCI devices, while the other listed commands are not standard Linux utilities. When troubleshooting hardware, administrators can use lsusb together with system logs and other hardware commands to determine whether the operating system detects the device correctly.
Question 65
Which command shows information about the CPU architecture and processor details?
- lsusb
- lscpu
- lsdisk
- cpuinfo-show
Correct Answer: 2
Explanation
The lscpu command displays detailed information about the CPU architecture and processors available to the Linux system. It can show the architecture, CPU count, cores, threads, sockets, and other processor-related information. This is useful when checking hardware specifications or troubleshooting applications that depend on processor features. lsusb is used for USB devices, while the other commands are not standard Linux utilities. Administrators can use lscpu along with tools such as top when investigating CPU-related performance problems.
Question 66
Which Linux command displays currently loaded kernel modules?
- modshow
- kernel-list
- lsmod
- modules
Correct Answer: 3
Explanation
The lsmod command displays kernel modules that are currently loaded into the Linux kernel. Kernel modules provide additional functionality, including support for hardware devices, filesystems, and other features. This command is useful when troubleshooting driver or hardware problems because an administrator can check whether an expected module is loaded. The other listed commands are not standard Linux commands for this purpose. If a required module is missing, an administrator can investigate module dependencies and use appropriate tools to load it when necessary.
Question 67
Which command is commonly used to load a kernel module manually?
- modprobe
- module-start
- loadmod
- kerneladd
Correct Answer: 1
Explanation
The modprobe command is commonly used to load and remove Linux kernel modules. It can also handle module dependencies automatically, making it preferable to manually inserting individual module files in many situations. For example, an administrator may use modprobe module_name when testing hardware support or troubleshooting a missing driver. lsmod can then be used to check loaded modules. The other listed commands are not standard Linux utilities. Administrators should verify the correct module before making changes to a production system.
Question 68
Which command can display information about a Linux process hierarchy?
- pstree
- process-tree
- psparent
- treeps
Correct Answer: 1
Explanation
The pstree command displays processes in a tree-like structure, showing parent and child relationships. This can be useful when investigating which process started another process or understanding how services and applications are related. For example, a service may create worker processes that appear beneath the main service process. Other commands such as ps can also provide process information, but pstree presents relationships more clearly. Understanding process relationships is helpful during troubleshooting, especially when investigating unexpected child processes or service behavior.
Question 69
Which command can be used to run a command with another user’s identity when the administrator has appropriate privileges?
- loginuser
- sudo
- switchuser
- runuseronly
Correct Answer: 2
Explanation
The sudo command allows an authorized user to execute a command with elevated privileges or as another user, depending on the system configuration. It is commonly used instead of giving users direct access to the root account. This provides better control and can support auditing because administrative commands can be associated with individual user accounts. Administrators should configure sudo permissions carefully and follow least-privilege principles. The other listed commands are not standard tools for controlled privilege elevation in Linux.
Question 70
Which file is commonly used to configure sudo permissions?
- /etc/sudoers
- /etc/sudo.conf
- /etc/admins
- /var/sudo/users
Correct Answer: 1
Explanation
The /etc/sudoers file contains rules that control which users and groups can use sudo and what commands they may run. Because an incorrect configuration can prevent administrative access or grant excessive privileges, administrators should edit this file carefully. The visudo command is commonly recommended because it checks the syntax before saving changes. Good sudo configuration follows least privilege by granting only the permissions users actually need. This reduces the security risk associated with unnecessary root-level access.
Question 71
Which command safely checks the syntax of the sudoers configuration before applying changes?
- sudo-check
- visudo
- sudoedit-check
- checksudo
Correct Answer: 2
Explanation
The visudo command is designed to safely edit the sudoers configuration and check its syntax before accepting changes. This is important because a syntax error in the sudoers file can cause serious administrative problems, including preventing authorized users from using sudo. Instead of directly editing the file with a normal text editor, administrators should generally use visudo. The other commands listed are not standard tools for validating sudoers syntax. Safe configuration practices reduce the chance of accidentally locking administrators out of a system.
Question 72
Which Linux security principle limits a user to only the permissions required for their job?
- Open access
- Full trust
- Least privilege
- Shared administration
Correct Answer: 3
Explanation
Least privilege means users, applications, and services should receive only the permissions required to perform their necessary tasks. This reduces the possible impact of compromised accounts, software vulnerabilities, and accidental changes. For example, a user who only needs to read application reports should not automatically receive permission to modify system configuration. Giving everyone full access increases risk and makes auditing more difficult. Least privilege is an important Linux security principle and should be applied to user accounts, service accounts, files, directories, and administrative privileges.
Question 73
Which Linux permission allows a user to run a file as a program or script?
- Read
- Execute
- Write
- Delete
Correct Answer: 2
Explanation
The execute permission allows a user to execute a file when the file is suitable for execution, such as a script with an appropriate interpreter or a compiled program. Linux permissions include read, write, and execute rights for the owner, group, and others. Read allows viewing file contents, while write allows modification. There is no standard basic permission called “delete”; deleting a file is generally controlled by permissions on its parent directory. Understanding execute permissions is important when running scripts and managing application files.
Question 74
Which command can be used to change the group ownership of a file?
- chmod
- chgrp
- groupmod
- grpchange
Correct Answer: 2
Explanation
The chgrp command changes the group ownership of a file or directory. For example, chgrp developers project.txt changes the group associated with project.txt to developers, assuming the user has the required privileges. Group ownership works together with Linux permissions to control access for multiple users. chmod changes permission bits, while groupmod modifies group properties rather than assigning a file to a group. Correct group ownership is useful when multiple users need shared access to specific resources.
Question 75
Which filesystem is commonly associated with modern Linux installations and supports features such as journaling?
- FAT16
- exFAT
- ext4
- ISO9660
Correct Answer: 3
Explanation
The ext4 filesystem is widely used on Linux systems and provides features such as journaling, large filesystem support, and reliable file management. Journaling helps reduce the risk of filesystem inconsistency after certain unexpected events, such as system crashes. FAT16 and exFAT are commonly used for compatibility with removable storage, while ISO9660 is associated with optical media. Administrators should understand filesystem capabilities when planning storage because different filesystems provide different features, limits, and performance characteristics.
Question 76
What is the main purpose of filesystem journaling?
- To encrypt every file automatically
- To record filesystem changes so recovery can be easier after an unexpected interruption
- To increase network bandwidth
- To create user accounts
Correct Answer: 2
Explanation
Filesystem journaling records information about filesystem changes so the system can more easily recover from certain unexpected interruptions, such as power loss or system crashes. It does not replace backups, but it can help maintain filesystem consistency and reduce lengthy recovery operations. Journaling is a feature found in several Linux filesystems, including ext4. Encryption, networking, and user management are separate functions. Understanding journaling helps administrators choose suitable filesystems and understand what protection they provide during unexpected system shutdowns.
Question 77
Which command can check and repair certain filesystem problems when the filesystem is not mounted or is otherwise safely available for checking?
- fscheck
- diskrepair
- fsck
- checkdisk
Correct Answer: 3
Explanation
The fsck utility is used to check and, when appropriate, repair filesystem inconsistencies. Running filesystem repair tools against a mounted and actively used filesystem can cause additional problems, so administrators should follow the filesystem’s requirements and use appropriate maintenance procedures. The exact behavior and options can vary by filesystem type. fsck is an important recovery tool when a filesystem has been marked inconsistent or after certain system failures. Administrators should always understand the risk before approving automatic repairs on important data.
Question 78
Which command can display the kernel messages from the current system?
- dmesg
- kernelshow
- syskernel
- msgkernel
Correct Answer: 1
Explanation
The dmesg command displays messages from the Linux kernel’s message buffer. These messages can contain useful information about hardware detection, drivers, storage devices, network interfaces, and other kernel events. Administrators often use dmesg when troubleshooting hardware or driver problems. Modern systems may also make kernel messages available through the systemd journal. The other listed commands are not standard Linux tools. Reviewing kernel messages can provide valuable evidence when a device is not recognized or a driver is behaving unexpectedly.
Question 79
Which command can show network connections and listening ports on a modern Linux system?
- ss
- netshow
- ports
- listen
Correct Answer: 1
Explanation
The ss command is commonly used to display network sockets, connections, and listening ports. It is a modern replacement for many common uses of the older netstat utility. Administrators can use commands such as ss -tuln to inspect TCP and UDP listening sockets and determine which services may be accepting network connections. This information is useful during security reviews and connectivity troubleshooting. The other commands listed are not standard Linux utilities for displaying network socket information.
Question 80
Which action is generally best when troubleshooting a Linux problem for the first time?
- Change several configurations immediately
- Reinstall the operating system
- Collect information and identify the problem before making major changes
- Disable all security controls
Correct Answer: 3
Explanation
A good troubleshooting process begins by collecting information and clearly identifying the problem before making major changes. Administrators should understand the expected behavior, observe the actual behavior, review relevant logs and configuration, and then test possible causes. Changing many settings at once makes it difficult to determine which change affected the result. Reinstalling the operating system or disabling security controls should not be the first response to a normal problem. A structured troubleshooting approach reduces risk and makes the final solution easier to verify and document.