Which command lists all files in a directory including hidden ones?
-a shows all files, including hidden files.
Why this answer
The ls -a (all) option displays all files, including those beginning with a dot.
190 questions total · 3pages · All types, answers revealed
Page 1 of 3
Page 2Which command lists all files in a directory including hidden ones?
-a shows all files, including hidden files.
Why this answer
The ls -a (all) option displays all files, including those beginning with a dot.
Which command is used to view the contents of a file one screen at a time?
less is the standard, more powerful pager.
Why this answer
The 'less' command is a terminal pager that allows forward and backward navigation through text files.
A student wants to start contributing to Linux projects. Which activity is the most effective way to start?
These are low-barrier, high-impact ways to get involved.
Why this answer
Reporting bugs, writing documentation, or fixing small issues in open source projects are ideal ways to start contributing.
Which TWO of the following are examples of Linux distributions?
A foundational Linux distribution.
Why this answer
Ubuntu and Debian are both popular Linux distributions.
You need to prevent a standard user from accidentally deleting a critical configuration file owned by root. Which command ensures the file cannot be modified or deleted even by the root user?
This sets the immutable flag, preventing all modifications.
Why this answer
The chattr +i command sets the immutable attribute, which prevents any user, including root, from deleting, renaming, or modifying the file until the attribute is removed.
A team is choosing a Linux distribution for a high-performance cluster (HPC). What is a primary consideration for this choice?
Customization is key to extracting maximum performance in HPC.
Why this answer
In HPC, support for specific hardware (like specialized GPUs) and optimized kernel builds is critical.
Which TWO of the following are reasons why companies often prefer Linux for server environments?
Linux is highly efficient at handling many concurrent processes.
Why this answer
Linux's scalability and security features make it the industry standard for servers.
You have a file 'notes.txt' and you want to ensure the group owner can read and write it, but nobody else can access it. Which chmod command works?
660 is rw-rw----.
Why this answer
Owner: rwx (7) or rw (6), Group: rw (6), Others: none (0). 660 provides read/write for owner and group.
To navigate from your current directory to your home directory regardless of your current location, which command is most efficient?
The tilde represents the home directory path.
Why this answer
The cd command without arguments or with the tilde character defaults to the user's home directory.
You are searching for a command that deals with 'groups' and want to see all manual pages that mention this term. Which command is most appropriate?
apropos searches descriptions for the keyword.
Why this answer
apropos is specifically designed to search for keywords across all man page descriptions.
What does the 'cat' command do when provided with multiple filenames as arguments?
cat concatenates and displays the streams.
Why this answer
The cat command reads the files in the order they are listed and concatenates them to the standard output.
You want to find lines in 'file.txt' that do NOT contain the word 'success'. Which command works?
-v inverts the search result.
Why this answer
The -v flag in grep inverts the match.
Which THREE commands can be used to check user information or current session identity?
Shows current username.
Why this answer
id shows identity, whoami shows current user, and groups shows group memberships.
What is the primary role of a 'Linux Distribution'?
This is the core function of a distribution.
Why this answer
A distribution aggregates the kernel, shell, package manager, and various applications into a functional, installable system.
Which THREE of the following commands are used for file manipulation?
Copies files.
Why this answer
cp, mv, and rm are the fundamental file manipulation commands.
You need to see the last 20 lines of a file named 'access.log'. Which command is the most appropriate?
tail displays the end of the file.
Why this answer
The tail command with the -n option allows specifying the number of lines to display from the end of the file.
A Linux administrator needs to determine if their distribution is based on Debian or RHEL. Which command or path is most indicative of this family?
This file is present on all Debian and Debian-derived (Ubuntu, Mint) systems.
Why this answer
The presence of /etc/debian_version is the primary identifier for Debian-based systems, while /etc/redhat-release indicates RHEL/CentOS systems.
What is the result of 'echo $USER'?
$USER expands to the current user's name.
Why this answer
$USER is an environment variable that holds the current logged-in username.
Which TWO of the following are examples of common Linux filesystems?
ext4 is a standard Linux filesystem.
Why this answer
ext4 and xfs are both widely used journaling filesystems in Linux.
Which THREE of the following are common types of open source software licenses?
The most common strong copyleft license.
Why this answer
Common open source licenses include the GPL, MIT, and Apache licenses.
Which TWO of the following are popular package management tools used in Linux?
Used on Debian-based systems.
Why this answer
APT and DNF are two of the most widely used package managers in the Linux ecosystem.
A system administrator needs to identify the numerical ID (UID) of the user 'jdoe'. Which file should be checked?
This file stores user account metadata.
Why this answer
The /etc/passwd file contains user account information, including the username, UID, GID, home directory, and shell.
You want to delete a file but you are worried about accidentally deleting the wrong one. Which flag should you use with 'rm' for confirmation?
-i enables interactive prompting.
Why this answer
The -i flag makes the rm command interactive, asking for confirmation before removing each file.
Which TWO of the following are valid ways to search for files?
Real-time filesystem search.
Why this answer
find and locate are the primary search tools.
You need to determine the UUID of a partition to add it to /etc/fstab. Which command should you use?
blkid lists block device identifiers like UUIDs.
Why this answer
The blkid command displays attributes of block devices, including UUIDs.
What is the primary purpose of the /etc/shadow file?
Shadow files are used to hide sensitive password data.
Why this answer
/etc/shadow stores user password hashes and password aging information, keeping them separate from /etc/passwd for security.
You need to ensure that a server's time is synchronized with an external time source to prevent authentication errors. Which daemon is responsible for this?
chronyd is the standard service for NTP synchronization.
Why this answer
The chronyd or ntpd service is typically responsible for network time synchronization.
You need to display the contents of a file named 'config.txt' directly to your terminal screen. Which command should you use?
cat displays the full content of a file.
Why this answer
The cat command is the standard utility for concatenating and displaying file contents to standard output.
Which TWO of the following commands can be used to display the contents of a text file?
cat prints file content to stdout.
Why this answer
cat and less are both common tools for reading file contents.
Which THREE of the following are valid ways to get help on a command?
Info pages.
Why this answer
man, info, and --help are standard help methods.
Which TWO of the following regex patterns are valid for grep to match the beginning or end of a line?
End of line.
Why this answer
^ matches the start, $ matches the end.
Which THREE of the following tools can be used for text processing?
Pattern scanning/processing.
Why this answer
grep, sed, and awk are core text processing utilities.
When using the 'man' command, how do you navigate to the next page of the manual entry?
Spacebar scrolls forward one full page.
Why this answer
The spacebar is the standard key to scroll forward one full screen in most pager applications, including the man viewer.
A system administrator needs to check the version of the Linux kernel installed on a production server. Which command is most appropriate?
The -r flag specifically prints the kernel release.
Why this answer
The 'uname -r' command is the standard and simplest way to print the kernel release version.
Which command is used to display the current working directory in the terminal?
pwd outputs the absolute path of your current location.
Why this answer
pwd stands for 'print working directory'.
Why do many enterprise Linux distributions choose to delay the inclusion of the absolute latest kernel version?
Production environments cannot afford the risk of regressions found in new kernels.
Why this answer
Enterprise distributions prioritize stability and exhaustive testing over having the absolute newest features.
Which command removes a group named 'tempgroup' from the system?
Standard command for group removal.
Why this answer
The 'groupdel' command is the standard utility for removing groups from the system.
Which THREE of the following represent ways to refer to the home directory?
Tilde is the shell alias for home.
Why this answer
~, $HOME, and the absolute path are all ways to reference home.
You want to delete a directory named 'temp_backup' that contains several files. Which command will successfully remove it and its contents?
-r allows for recursive deletion of directory trees.
Why this answer
The -r (recursive) flag is required for rm to delete directories and their contents.
Which TWO of the following commands can be used to redirect input from a file?
Piping file content to command input.
Why this answer
The '<' operator and the 'cat' command piped to another tool are valid methods.
Which command would you use to list files in long format, sorted by modification time, with the newest files appearing first?
-l is long, -t is sort by time, -r reverses order.
Why this answer
The -l (long), -t (time), and -r (reverse) flags together achieve this.
A user reports that they cannot save files to their home directory. You find that the disk is not full. What is the most likely cause related to hardware-based limitations?
An inode exhaustion prevents new file creation even if disk space remains.
Why this answer
If the disk is not full, the partition might have reached its inode limit, preventing the creation of new files.
Which TWO of the following are commands to delete files or directories?
Removes empty directories.
Why this answer
rm and rmdir are used for deletion.
How do you rename a file named 'oldname' to 'newname' using the command line?
mv renames a file by moving it to the same directory with a new name.
Why this answer
The mv (move) command is used for both moving and renaming files.
Which command is used to clear the terminal screen?
clear empties the terminal display.
Why this answer
The clear command wipes the current terminal output.
Which symbol represents the current user's home directory in the shell?
~ expands to the user's home path.
Why this answer
The tilde (~) is a shell shorthand for the home directory.
You need to change the environment variable PATH to include the directory '/opt/bin'. Which command is standard?
Prepending or appending using $PATH is standard.
Why this answer
Standard syntax involves referencing the current PATH and adding the new path.
You notice a file has permissions listed as '-rwsr-xr-x'. What does the 's' in the owner's position indicate?
The setuid bit allows elevation to the file owner's privileges.
Why this answer
The 's' in the owner's field indicates the setuid bit is set, meaning the file runs with the privileges of the file owner rather than the user running it.
Which shell variable typically contains the directories searched for command executables?
$PATH stores the location of executables.
Why this answer
The PATH variable holds the colon-separated list of directories the shell searches for commands.
You have added a new hard drive to your Linux server, but the system does not automatically recognize the device. What is the first step you should take to verify if the kernel detects the hardware?
dmesg shows kernel hardware detection messages.
Why this answer
The dmesg command displays the kernel ring buffer, which logs hardware detection events during boot or device insertion.
You need to move a file named 'data.txt' from the current directory to '/var/logs' but want to be prompted if a file with the same name already exists in the destination. Which option should you add to 'mv'?
-i enables interactive mode to prompt before overwrite.
Why this answer
The -i (interactive) flag prompts the user before overwriting existing files.
When evaluating Linux distributions, what distinguishes a 'rolling release' distribution from a 'fixed release' distribution?
This is the fundamental difference in update strategy.
Why this answer
Rolling releases receive updates continuously, providing the latest software, while fixed releases have scheduled versions with stable software packages.
You are configuring a temporary directory where multiple users save files. To ensure that users can only delete their own files and not files created by others, what must you set?
The sticky bit prevents unauthorized file deletion.
Why this answer
The sticky bit (represented by the 't' in the others permission field) restricts file deletion to the owner of the file, the directory owner, or root.
You want to find all occurrences of the string 'ERROR' within the 'syslog' file. Which command is most appropriate?
grep searches for the specified pattern in the file.
Why this answer
grep is specifically designed to search for patterns within text files.
Which TWO of the following are valid ways to view system logs?
journalctl displays systemd logs.
Why this answer
dmesg and journalctl are standard tools to access system logs.
An administrator wants to view the current system load and active processes. Which utility is the most appropriate for a real-time monitor?
top shows a live view of CPU, memory, and tasks.
Why this answer
The top command provides a dynamic, real-time view of running processes and system load.
You are configuring a Linux server and need to determine which hard drive partition is currently mounted as the root filesystem. Which file should you inspect?
This file defines how filesystems are mounted at boot.
Why this answer
The /etc/fstab file contains information about filesystems and their mount points.
What is the purpose of the 'tee' command?
tee mirrors data to multiple destinations.
Why this answer
tee reads from standard input and writes to both standard output and one or more files.
Which TWO of the following locations or methods are commonly used to define where a user's home directory is located?
Defines location at creation.
Why this answer
The home directory is set in /etc/passwd or during the useradd command via the -d flag.
Which TWO of the following are recognized categories of Linux distributions based on their purpose?
Distributions like Ubuntu or Fedora are used for a wide range of tasks.
Why this answer
Distributions are often classified as General Purpose (desktop/server) or Specialized (HPC, security, embedded).
A developer is writing an application that performs heavy system-level calls. Why would they choose to use Linux for this development?
Access to kernel source and documentation enables better application-level optimization.
Why this answer
Linux is open source, allowing developers to see exactly how system calls are handled by the kernel, which is vital for performance tuning.
Which TWO of the following are valid ways to get help on a Linux system?
man pages are standard.
Why this answer
The man and info commands are the primary documentation systems.
Which TWO of the following are common benefits of using open source software in an enterprise environment?
Lower licensing fees typically reduce TCO.
Why this answer
Open source provides cost-effectiveness through lower licensing and the ability to avoid vendor lock-in.
To add a new user named 'guest' and set their home directory to '/home/guest', which command is correct?
-m creates the directory, -d specifies the path.
Why this answer
The 'useradd -m' flag creates the home directory, and the username is specified as the last argument.
You are currently in a directory and want to find files ending in '.conf' within the current folder and its subfolders. Which command is correct?
find searches recursively by default.
Why this answer
The find command is the tool for searching the filesystem based on criteria like name.
Which THREE of the following are components of a standard network configuration?
Defines the network segment.
Why this answer
IP address, subnet mask, and default gateway are essential for basic network communication.
You are setting up a local network and need to verify the path traffic takes to reach a remote host. Which command should you use?
traceroute maps the network path to a host.
Why this answer
The traceroute command displays the path and latency of each hop to a destination.
Which of these is a common advantage of using a Linux-based operating system in a professional development environment?
These tools were originally developed or are natively optimized for Linux.
Why this answer
Linux provides native support for open-standard tools, compilers, and containers, which are standard in modern development.
Which TWO of the following are common types of Linux career roles?
SREs use Linux to manage large-scale service reliability.
Why this answer
Linux careers often focus on systems administration, software development, or site reliability engineering (SRE).
Which command is used to display the current directory path in the terminal?
pwd displays the current directory path.
Why this answer
The pwd (print working directory) command shows the full path of the current directory.
Which THREE of the following are fundamental freedoms guaranteed by the Free Software Definition?
No restrictions on usage are permitted.
Why this answer
The FSF defines freedom as the ability to run, study, redistribute, and improve the program.
Which THREE of the following represent ways to gain practical experience with Linux?
A safe environment to experiment without risking physical hardware.
Why this answer
Setting up a home lab, contributing to open source, and using virtual machines are excellent ways to learn.
Which TWO of the following commands help you move within the directory structure?
Changes working directory.
Why this answer
cd and popd allow moving between directories.
Which THREE of the following are common shell built-in command types?
Shell builtin.
Why this answer
cd, echo, and export are standard shell built-ins.
Which THREE of the following commands are used for viewing file metadata or status?
Shows permissions and owner.
Why this answer
ls, stat, and file all provide information about files.
Page 1 of 3
Page 2Practice 010-160 by domain
Target a specific domain to shore up weak areas.