01. On a desktop computer, a user runs ls /dev/sd* and sees:
/dev/sda /dev/sda1 /dev/sda2 /dev/sdb /dev/sdb1
What does this output describe?
a) Five disks, one for every device file listed
b) Two disks, with three partitions between them
c) One disk, divided into the four partitions shown
d) Two disks, each holding two partitions
02. User ben has opened several terminal windows and does not know which directory each one is in.
Which command lists the contents of /home/ben/reports no matter which directory it is run from?
a) ls /home/ben/../ben/reports
b) ls ./reports
c) ls ben/reports
d) ls home/ben/reports
03. Running ls -a in a directory shows:
. .. .old.log app.log db.log report.LOG notes.txt
In that directory, a user runs:
for f in *.log; do echo "$f"; done
What is printed?
a) app.log, db.log, .old.log and report.LOG, one per line
b) The literal text *.log, once
c) app.log, db.log and .old.log, one per line
d) app.log and db.log, each printed on its own line
04. Which commands print the words red, green and blue, each on its own line?
(Choose two.)
a) for c in red green blue; echo $c; done
b) for c in red green blue; do echo $c; done
c) for c in "red green blue"; do echo $c; done
d) for $c in red green blue; do echo $c; done
e) for c in "red" "green" "blue"; do echo "$c"; done
05. An administrator wants two systems whose package tools and conventions both come from the Debian family, so that the same skills apply on each.
Which pair of distributions meets this requirement?
a) Ubuntu and Raspbian
b) Scientific Linux and Ubuntu
c) CentOS and Linux Mint
d) openSUSE and Raspbian
06. The executable script count.sh contains:
#!/bin/bash
echo "$0 received $# arguments"
What does ./count.sh x y print?
a) x received 2 arguments
b) count.sh received 3 arguments
c) ./count.sh received 2 arguments
d) x y received 2 arguments
07. A small company rents a Linux virtual machine from an Infrastructure as a Service (IaaS) provider. The machine was created from the provider's ready-made Ubuntu image, and the company now runs its own web application on it.
Who is normally responsible for installing security updates for the software packages inside that instance?
a) The cloud provider, since it supplied the distribution image the instance was built from
b) The company itself, since IaaS leaves the guest operating system under the customer's control
c) The distribution's developers, who push updates into every running instance automatically
d) Nobody, because an IaaS instance is rebuilt from a fresh, patched image at every boot
08. The SEE ALSO section at the end of man ls contains these lines:
Full documentation <https://www.gnu.org/software/coreutils/ls>
or available locally via: info '(coreutils) ls invocation'
What do these lines tell the reader?
a) The man page is the full reference, and the info text only repeats it inside a different viewer program
b) ls has to be started through info before its complete set of options will work
c) A fuller GNU manual for ls exists in info format, and the man page is a shorter summary
d) info shows only this same man page, since ls has no separate info manual at all
09. User ana is working in /home/ana/projects. User bob has the home directory /home/bob, and ana has read access to it. She runs:
ls -a ~bob/public
Which statement describes the output?
a) It lists /home/ana/bob/public, including hidden entries that start with a dot
b) It lists /home/bob/public, including entries whose names start with a dot
c) It lists /home/bob/public but leaves out every entry whose name starts with a dot
d) It lists /home/ana/public and then every subdirectory below it
10. In her home directory, ana has a directory drafts that contains plan.txt, and an empty directory archive. She runs:
mv drafts archive
Which statements are true afterwards?
(Choose two.)
a) The file is now at ~/archive/drafts/plan.txt
b) The file is now at ~/archive/plan.txt
c) A plain ls ~ no longer lists drafts
d) The command failed, because mv needs -r to move a directory
e) archive was replaced by drafts, so ls ~ no longer lists archive