Linux Essentials 010-160 Practice Questions with Explanations

Free Linux Essentials 010-160 practice questions. 17 of them, each with the correct answer, a full explanation, and the reason every other option is wrong. These are real questions from the 010-160 exam, not paraphrases, and every explanation is written out rather than just marking the right letter.

They are drawn from the same bank as the full 010-160 pack, which has 80 questions in total.

Get the full 010-160 question bank (80 questions) →

010-160 practice questions

Question 1

Reverse DNS assigns hostnames to IP addresses. How is the name of the IP address 198.51.100.165 stored on a DNS server?

  • A. In the A record for 165.100.51.198.ipv4.arpa.
  • B. In the PTR record for 165.100.51.198.in-addr.arpa.
  • C. In the RNAME record for 198-51-100-165.rev.arpa.
  • D. In the ARPA record for 165.100.51.198.rev.
  • E. In the REV record for arpa.in-addr.198.51.100.165.
Show answer and explanation ▾

Correct answer: B

Reverse DNS uses PTR (Pointer) records stored in the in-addr.arpa zone. The IP address 198.51.100.165 is reversed to 165.100.51.198 and appended to in-addr.arpa, creating the domain 165.100.51.198.in-addr.arpa, where the PTR record maps the IP back to a hostname. Option A incorrectly references an A record instead of PTR. Option C uses a non-standard RNAME record type. Option D uses rev.arpa which is not the standard reverse DNS suffix. Option E has the incorrect order and uses REV, which is not a DNS record type.

Why the other options are wrong:

  • A. A records map hostnames to IP addresses, not the reverse; they would not be used for reverse DNS lookups.
  • C. RNAME is not a standard DNS record type used for reverse DNS; PTR is the correct record type.
  • D. The standard suffix for reverse DNS is in-addr.arpa, not rev.arpa, and the octets must be in reversed order.
  • E. REV is not a valid DNS record type, and the ordering of the IP octets is incorrect for reverse DNS.

Question 2

Which of the following types of bus can connect hard disk drives with the motherboard?

  • A. The RAM bus
  • B. The NUMA bus
  • C. The CPU bus
  • D. The SATA bus
  • E. The Auto bus
Show answer and explanation ▾

Correct answer: D

SATA (Serial ATA) is the standard bus interface used to connect hard disk drives and SSDs to the motherboard. It has largely replaced older standards like IDE/PATA and supports hot-swapping and higher data transfer rates. The RAM bus connects only memory modules. NUMA is a processor architecture design, not a physical bus. The CPU bus connects the processor to the chipset. The Auto bus is not a real computer bus interface.

Why the other options are wrong:

  • A. The RAM bus connects memory modules to the memory controller, not storage drives.
  • B. NUMA is a multi-processor architecture paradigm, not a physical bus for connecting storage devices.
  • C. The CPU bus (FSB) connects the processor to the chipset, not hard drives to the motherboard.
  • E. The Auto bus is not a recognized computer bus standard for any hardware connections.

Question 3

Members of a team already have experience using Red Hat Enterprise Linux. For a small hobby project, the team wants to set up a Linux server without paying for a subscription. Which of the following Linux distributions allows the team members to apply as much of their Red Hat Enterprise Linux knowledge as possible?

  • A. Ubuntu Linux LTS
  • B. Raspbian
  • C. Debian GNU/Linux
  • D. CentOS
  • E. openSUSE
Show answer and explanation ▾

Correct answer: D

CentOS is a free, open-source distribution that is binary-compatible with Red Hat Enterprise Linux, using the same package management tools (yum/dnf), system architecture, and configuration methods. This allows team members with RHEL experience to apply their knowledge directly with minimal learning curve. Ubuntu uses Debian-based tools and different package management. Raspbian is designed for ARM- based Raspberry Pi devices. Debian uses different package management despite some similarities. openSUSE uses RPM packages but with different management tools and system design.

Why the other options are wrong:

  • A. Ubuntu uses APT and Debian-based tools, which are significantly different from RHEL's YUM/DNF package management.
  • B. Raspbian is optimized for ARM processors and Raspberry Pi hardware, not server use or RHEL compatibility.
  • C. While Debian shares some similarities, it uses different package management and system administration tools than RHEL.
  • E. openSUSE uses different package management tools, initialization systems, and administrative approaches compared to RHEL.

Question 4

What information can be displayed by top?

  • A. Existing files, ordered by their size.
  • B. Running processes, ordered by CPU or RAM consumption.
  • C. User accounts, ordered by the number of logins.
  • D. User groups, ordered by the number of members.
  • E. User accounts, ordered by the number of files.
Show answer and explanation ▾

Correct answer: B

The top command displays real-time information about running processes, including their CPU and memory usage, and allows sorting by these metrics. It shows process ID, user, CPU usage percentage, memory usage percentage, and other runtime statistics. Option A describes file listing functionality. Option C and E refer to user account information. Option D relates to group membership, none of which are displayed by top.

Why the other options are wrong:

  • A. Listing files and sorting by size is the function of commands like ls -lS, not top.
  • C. User login counts are not displayed by top; this information might come from the who or last commands.
  • D. Group membership information is not displayed by top; the groups command shows this information.
  • E. User files are not tracked or displayed by top; file information comes from commands like find or ls.

Question 5

Which of the following commands can be used to resolve a DNS name to an IP address?

  • A. dnsname
  • B. dns
  • C. query
  • D. host
  • E. iplookup
Show answer and explanation ▾

Correct answer: D

The host command is a standard DNS lookup utility that resolves domain names to IP addresses (forward lookups) and IP addresses to hostnames (reverse lookups). It queries DNS servers directly and displays the results. Option A, B, and C are not real commands. Option E (iplookup) is not a standard Linux utility; the correct tools are host, nslookup, or dig.

Why the other options are wrong:

  • A. dnsname is not a standard Linux command for DNS resolution.
  • B. dns is not a standalone command; it refers to the service, not a lookup utility.
  • C. query is not a standard DNS resolution command in Linux.
  • E. iplookup is not a standard Linux utility; host, nslookup, and dig are the correct DNS lookup tools.

Question 6

Which of the following outputs could stem from the command last?

  • A. 1 ls 2 cat text.txt 3 logout
  • B. Password for user last changed at Sat Mar 31 16:38:57 EST 2018
  • C. Last login: Fri Mar 23 10:56:39 2018 from server.example.com
  • D. EXT4-fs (dm-7): mounted filesystem with ordered data mode. Opts: (null)
  • E. root tty2 Wed May 17 21:11 - 21:11 (00:00)
Show answer and explanation ▾

Correct answer: E

The last command displays login history in a formatted output showing username, terminal/device, date/time of login, and duration of the session. The output 'root tty2 Wed May 17 21:11 - 21:11 (00:00)' shows exactly this format: root is the user, tty2 is the terminal, the date and time show the login period, and (00:00) indicates a zero-minute session. Option A shows shell command history. Option B shows password change information. Option C shows a login message banner. Option D shows kernel filesystem messages from dmesg.

Why the other options are wrong:

  • A. Shell command history with numbered list format is displayed by the history command, not last.
  • B. Password change timestamps are shown by commands like chage or getent shadow, not last.
  • C. Login banner messages are displayed at login time or shown by the motd file, not by the last command.
  • D. Kernel filesystem mounting messages are shown by dmesg, not the last command.

Question 7

What is the UID of the user root?

  • A. 1
  • B. -1
  • C. 255
  • D. 65536
  • E. 0
Show answer and explanation ▾

Correct answer: E

The root user has a UID of 0 in Linux systems. The UID (User Identifier) is a non-negative integer that uniquely identifies users, and 0 is specifically reserved for the root superuser account, granting it full system privileges.

Why the other options are wrong:

  • A. UID 1 is typically assigned to system users or the bin user, not root.
  • B. -1 is not a valid UID value in standard Linux systems.
  • C. UID 255 would be an unprivileged user ID, not root.
  • D. UID 65536 exceeds the typical maximum UID range on most systems.

Question 8

Which permissions are set on a regular file once the permissions have been modified with the command chmod 654 file.txt?

  • A. drw-r-xr--
  • B. d-wxr-x--
  • C. -wxr-x--x
  • D. -rwxrw---x
  • E. -rw-r-xr--
Show answer and explanation ▾

Correct answer: E

The chmod command 654 represents octal notation where each digit applies to owner, group, and others respectively. 6 (owner) = rw-, 5 (group) = r-x, 4 (others) = r--. For a regular file, this produces -rw-r-xr--, with the leading dash indicating it's not a directory.

Why the other options are wrong:

  • A. This shows a directory (d prefix) and incorrect permission mapping.
  • B. This shows a directory prefix and doesn't match the 654 octal encoding.
  • C. This doesn't match the 654 octal values and shows incorrect permission assignments.
  • D. This shows rwx for owner (7) instead of rw (6), and incorrect values for group and others.

Question 9

What is true about the owner of a file?

  • A. Each file is owned by exactly one user and one group.
  • B. The owner of a file always has full permissions when accessing the file.
  • C. The user owning a file must be a member of the file's group.
  • D. When a user is deleted, all files owned by the user disappear.
  • E. The owner of a file cannot be changed once it is assigned to an owner.
Show answer and explanation ▾

Correct answer: A

In Linux, every file is owned by exactly one user and exactly one group. This is a fundamental aspect of the Unix/Linux permission model where ownership is assigned to a single user account and a single group account.

Why the other options are wrong:

  • B. File owners can have permissions restricted by ACLs or umask, and may not always have full permissions.
  • C. A user can own a file even if they are not a member of the file's assigned group.
  • D. When a user is deleted, their owned files persist; they become owned by the deleted user's UID number.
  • E. File ownership can be changed using chown and chgrp commands by root or the file owner.

Question 10

Which of the following permissions are set on the /tmp/ directory?

  • A. rwxrwxrwt
  • B. ------rwX
  • C. rwSrw-rw-
  • D. rwxrwS---
  • E. r-xr-X--t
Show answer and explanation ▾

Correct answer: A

The /tmp/ directory has permissions rwxrwxrwt, which means read-write-execute for owner, group, and others, with the sticky bit (t) set on the others field. The sticky bit prevents users from deleting files owned by other users, essential for a shared temporary directory.

Why the other options are wrong:

  • B. This shows restrictive permissions that don't match /tmp/'s purpose as a world- writable directory.
  • C. This shows the setgid bit (S) which is not a feature of /tmp/.
  • D. This shows overly restrictive permissions and setgid rather than sticky bit.
  • E. This shows restrictive permissions and capital X that don't match standard /tmp/ configuration.

Question 11

Which command adds the new user tux and creates the user's home directory with default configuration files?

  • A. defaultuser tux
  • B. useradd -m tux
  • C. usercreate tux
  • D. useradd -o default tux
  • E. passwd -a tux
Show answer and explanation ▾

Correct answer: B

The command useradd -m tux correctly adds a new user named tux with the -m flag, which creates the user's home directory and populates it with default configuration files from /etc/skel.

Why the other options are wrong:

  • A. defaultuser is not a standard Linux command for creating users.
  • C. usercreate is not a valid Linux command; the correct command is useradd or adduser.
  • D. The useradd -o flag is for allowing duplicate UIDs, not for default configuration.
  • E. passwd is used to change passwords, not to create new user accounts.

Question 12

Which of the following commands creates an archive file work.tar from the contents of the directory ./work/?

  • A. tar --new work.tar ./work/
  • B. tar -cf work.tar ./work/
  • C. tar -create work.tgz -content ./work/
  • D. tar work.tar < ./work/
  • E. tar work > work.tar
Show answer and explanation ▾

Correct answer: B

The command tar -cf work.tar ./work/ correctly creates a tar archive. The -c flag specifies create mode, and the -f flag specifies the output filename. This is the standard syntax for creating a tar archive from a directory.

Why the other options are wrong:

  • A. --new is not a valid tar option for archive creation.
  • C. -create and -content are not valid tar options; the correct syntax uses -c and -f flags.
  • D. Using input redirection with < is incorrect for tar; the -f flag must be used to specify the archive file.
  • E. Output redirection > does not properly create a tar archive; the -f flag is required.

Question 13

Which of the following keys can be pressed to exit less?

  • A. l
  • B. x
  • C. e
  • D. q
  • E. !
Show answer and explanation ▾

Correct answer: D

The 'q' key is the standard command to quit the less pager. Less is a file viewer utility commonly used in Unix/Linux systems, and 'q' (for quit) is its primary exit command. This is consistent across all less implementations and is documented in the less manual.

Why the other options are wrong:

  • A. The 'l' key is used within less to jump to a specific line number, not to exit.
  • B. The 'x' key has no standard function in less and will not exit the program.
  • C. The 'e' key advances one line downward in less but does not exit.
  • E. The '!' key enters shell command mode in less but does not exit the pager itself.

Question 14

Which of the following commands sorts the output of the command export-logs?

  • A. export-logs < sort
  • B. export-logs > sort
  • C. export-logs & sort
  • D. export-logs | sort
  • E. export-logs <> sort
Show answer and explanation ▾

Correct answer: D

The pipe operator (|) connects the standard output of one command to the standard input of another. The command 'export-logs | sort' sends the output of export-logs to the sort command for sorting. This is the correct syntax for piping data between commands in Unix/Linux.

Why the other options are wrong:

  • A. The '<' operator redirects input from a file, not from another command's output.
  • B. The '>' operator redirects output to a file, not to another command.
  • C. The '&' operator runs commands in the background in parallel, not sequentially with piping.
  • E. The '<>' operator is not a standard Unix/Linux operator for command chaining.

Question 15

A directory contains the following files: What would be the output of the following shell script? for file in *.txt

  • A. *.txt
  • B. a b
  • C. c.cav
  • D. a.txt
  • E. a. txt b. txt
Show answer and explanation ▾

Correct answer: E

The shell script uses a for loop with the pattern `*.txt`, which expands to match all files ending in .txt in the current directory. The directory contains a.txt and b.txt (both matching *.txt) and c.cav (which does not match). The loop iterates over each matching file, and `echo $file` prints each filename. Therefore, the output will be two lines: 'a.txt' and 'b.txt', which when echoed sequentially produces the output shown in option E.

Why the other options are wrong:

  • A. The glob pattern *.txt is expanded by the shell before the loop runs, so the literal string '*.txt' is never echoed.
  • B. The filenames are printed with their full extensions (.txt), not just the base names.
  • C. The file c.cav does not match the *.txt pattern and is not processed by the loop.
  • D. This option shows only a.txt on one line, but the loop processes both a.txt and b.txt, producing two lines of output.

Question 16

Which of the following commands will search for the file foo.txt under the directory /home?

  • A. search /home -file foo.txt
  • B. search /home foo. txt
  • C. find /home - file foo.txt
  • D. find /home -name foo.txt
  • E. find /home foo.txt
Show answer and explanation ▾

Correct answer: D

The find command uses the syntax 'find [path] -name [filename]' to search for files by name. The '-name' option specifies the filename pattern to search for. The command 'find /home -name foo.txt' correctly searches for foo.txt in the /home directory and all its subdirectories.

Why the other options are wrong:

  • A. 'search' is not a standard Linux command; the correct command is 'find'.
  • B. The search command with this syntax is invalid; 'foo. txt' would be interpreted incorrectly.
  • C. There is a space in '- file' making it invalid syntax; the correct option is '-name' not '- file'.
  • E. This syntax lacks the required '-name' option and will not correctly search for the filename.

Question 17

The current directory contains the following file: -rw-r`"r`" 1 root exec 24551 Apr 2 12:36 test.sh The file contains a valid shell script, but executing this file using ./test.sh leads to this error: bash: ./test.sh: Permission denied What should be done in order to successfully execute the script?

  • A. The file's extension should be changed from .sh to .bin.
  • B. The execute bit should be set in the file's permissions.
  • C. The user executing the script should be added to the exec group.
  • D. The SetUID bit should be set in the file's permissions
  • E. The script should be run using #!./test. sh instead of ./test.sh.
Show answer and explanation ▾

Correct answer: B

The file permissions -rw-r--r-- show that the execute bit is not set for any user. The error 'Permission denied' when trying to execute ./test.sh indicates the file lacks execute permissions. Setting the execute bit using chmod +x test.sh will resolve this issue and allow the script to be executed directly.

Why the other options are wrong:

  • A. Changing the file extension from .sh to .bin is irrelevant; the permission issue is what prevents execution.
  • C. Adding the user to the exec group will not solve the problem; the execute bit itself must be set on the file.
  • D. The SetUID bit is used for privilege elevation, not for basic script execution permission.
  • E. Using '#!./test.sh' is invalid syntax; the shebang line must be inside the script file, not used on the command line.

Get the complete 010-160 bank

These 17 questions are roughly 30% of the bank. The full pack has 80 real 010-160 questions, each with the same depth of explanation, plus a questions-only PDF for timed practice and free updates forever.

View the full Linux Essentials 010-160 question bank →

Related exams

Browse free practice questions for every exam →

Back to blog