010-160

Free 010-160 practice questions

10 questions from our 010-160 practice tests, each with the correct answer and a written explanation. Read them with the answers shown, or switch to quiz mode and answer first.

Back to the 010-160 practice exams

Question 1 of 10, The Linux Operating System and Open Source Software

A developer modifies a program licensed under the GNU GPL and distributes the modified binaries to customers. What does the license require?

  1. AThe corresponding source code of the modified version must be offered under the GPL Correct answer
  2. BOnly the unchanged original files must be published, while newly added files may stay proprietary
  3. CThe modifications may stay closed as long as the original authors are credited in the documentation
  4. DThe modified program may be relicensed under any OSI-approved permissive license such as BSD

Answer and explanation: The GPL is a copyleft license: anyone who distributes a modified version must make the complete corresponding source available under the same GPL terms. Keeping changes closed with an attribution is what some permissive licenses allow, not the GPL. A GPL work cannot be relicensed under BSD by a downstream developer, and the copyleft covers the whole derived work, not only the original files.

Question 2 of 10, The Linux Operating System and Open Source Software. Choose 2.

A company wants to reuse open source libraries in a proprietary product without being required to publish the product's source code. Which two licenses are permissive and allow this? (Choose two.)

  1. AApache License 2.0 Correct answer
  2. BGNU Affero General Public License v3
  3. CGNU General Public License v3
  4. DCreative Commons Attribution-ShareAlike
  5. EBSD 3-Clause License Correct answer

Answer and explanation: The BSD and Apache 2.0 licenses are permissive: they require keeping copyright and license notices but allow use in closed-source products. GPLv3 and AGPLv3 are copyleft licenses that require derived works to be released under the same license (the AGPL even covers network use), and CC BY-SA has a share-alike clause and is intended for content rather than software.

Question 3 of 10, Command Line Basics

Why should the pattern be quoted in the command find . -name '*.txt'?

  1. AThe quotes make find compare the file names without regard to letter case
  2. BUnquoted, the shell may expand *.txt to file names in the current directory before find runs Correct answer
  3. CThe quotes tell find to descend into hidden directories as well as normal ones
  4. Dfind requires quotes around every argument that follows one of its options

Answer and explanation: Globs are expanded by the shell, so if .txt files exist in the current directory find would receive their names instead of the pattern and search for the wrong thing or fail. Quoting passes the pattern to find, which matches it itself. Quotes are not otherwise required, case-insensitive matching uses -iname, and find already descends into hidden directories.

Question 4 of 10, Command Line Basics

A user runs echo "Total: $5" in an interactive Bash shell and sees only Total: followed by a space. Why?

  1. Aecho treats any word that starts with a dollar sign as a comment and drops it
  2. BDouble quotes strip every special character, including the digits that follow them
  3. CInside double quotes $5 expands to the fifth positional parameter, which is empty Correct answer
  4. DThe shell replaces $5 with the exit status of the fifth previous command

Answer and explanation: Double quotes still allow parameter expansion, and $5 refers to the fifth positional parameter, which is unset in an interactive shell, so it expands to nothing. Single quotes or a backslash before the dollar sign would print it literally. Comments start with #, not $, double quotes preserve digits, and the exit status of the last command is $?.

Question 5 of 10, Data Processing. Choose 2.

A script must run the command backup and print backup failed only when backup returns a nonzero exit status. Which two lines do this? (Choose two.)

  1. Abackup; if [ $? -ne 0 ]; then echo "backup failed"; fi Correct answer
  2. Bwhile backup; do echo "backup failed"; done
  3. Cbackup; if [ $? -eq 0 ]; then echo "backup failed"; fi
  4. Dif [ -z backup ]; then echo "backup failed"; fi
  5. Eif ! backup; then echo "backup failed"; fi Correct answer

Answer and explanation: if ! inverts the exit status so the message appears on failure, and testing $? -ne 0 right after the command checks for a nonzero status. -eq 0 prints the message on success, [ -z backup ] tests whether the literal string backup is empty instead of running the command, and the while loop repeats the message as long as backup succeeds.

Question 6 of 10, Data Processing

Which pipeline prints each distinct login shell from /etc/passwd together with the number of accounts that use it?

  1. Acut -f7 /etc/passwd | sort | uniq -c
  2. Bcut -d: -f7 /etc/passwd | uniq -c | sort -n
  3. Ccut -d: -f6 /etc/passwd | sort -u | wc -l
  4. Dcut -d: -f7 /etc/passwd | sort | uniq -c Correct answer

Answer and explanation: The seventh colon-separated field of /etc/passwd is the login shell; sort groups identical values together so uniq -c can count each one. uniq only merges adjacent duplicates, so running it before sort produces split counts. Without -d: cut uses tab as the delimiter and prints whole lines, and field 6 is the home directory, while sort -u | wc -l only counts distinct values.

Question 7 of 10, Linux System Administration Basics

On a server that has run for weeks, free -h shows very little free memory but a large buff/cache value and a high available value. What does this indicate?

  1. AThe cache lives on disk, so all of the RAM shown is actually unused
  2. BA process has leaked memory that permanently occupies the cache area
  3. CThe system is about to run out of memory and needs more swap immediately
  4. DThe kernel uses spare RAM as cache and releases it when programs need memory Correct answer

Answer and explanation: Linux fills otherwise idle RAM with page cache and buffers to speed up disk access, and the available column estimates how much memory can still be given to programs by reclaiming that cache. A low free value alone is therefore normal, leaked memory would appear as used rather than cache, and buff/cache is held in RAM, not on disk.

Question 8 of 10, Linux System Administration Basics

ping -c 4 192.168.1.1 reports 100% packet loss, while ip addr show lists 192.168.1.20/24 on eth0 with state UP. What does this suggest?

  1. AThe local interface is configured, so the problem lies with the target or the path to it Correct answer
  2. BThe local interface has no IP address and must request one from DHCP
  3. Cping needs root privileges to send more than one echo request
  4. DDNS resolution is failing, so /etc/resolv.conf must be corrected

Answer and explanation: The interface is up with an address in the same subnet as the target, so the local configuration looks correct and the target host, a firewall or the cable or switch is the likely cause. An address is clearly assigned, no name is involved because an IP address was pinged, and regular users may send several echo requests with ping.

Question 9 of 10, Security and File System Permissions

User bob cannot delete a file that alice created in /tmp, even though /tmp is writable by everyone. Why?

  1. AThe sticky bit on /tmp lets only the file's owner, the directory owner or root delete it Correct answer
  2. BAlice's umask removed write permission for others, and deleting a file needs write on the file
  3. CThe setuid bit on /tmp makes every new file inside it owned by root and read-only
  4. DFiles in /tmp are marked immutable by the kernel until the next reboot clears the directory

Answer and explanation: /tmp has the sticky bit (shown as t in drwxrwxrwt), which restricts deleting and renaming entries to their owner, the directory owner and root. setuid has no such effect on directories, files in /tmp are not made immutable, and deleting a file depends on permissions of the directory rather than of the file, so alice's umask is not the reason.

Question 10 of 10, Security and File System Permissions

Why should a user protect a new SSH private key with a passphrase when ssh-keygen asks for one?

  1. ASo that a copied key file cannot be used without also knowing the passphrase Correct answer
  2. BSo that the server can verify the key without storing the public key
  3. CSo that the public key is encrypted before it goes into authorized_keys
  4. DSo that the key pair never needs to be rotated or replaced afterwards

Answer and explanation: The passphrase encrypts the private key file, so someone who steals the file still cannot use it without the passphrase. The server still needs the public key in authorized_keys, public keys are not secret and are not encrypted, and protecting a key does not remove the need to rotate it.