What directly controls hardware and translates the commands from a piece of software into something the hardware can understand and act upon?
A. Finder
B. Explorer
C. Kernel
D. Procmon
D. The kernel directly controls hardware, and it translates the commands from a piece of software into something the hardware can understand and act upon. It also manages hardware resources intelligently, such as memory management, for various software and utilities.
What is the generic name given to the action of protecting shell meta-characters from being treated specially by the shell?
A. Nulling
B. Quoting
C. Slashing
D. Queuing
B. Quoting is the generic name given to the action of protecting shell meta-characters from being treated specially by the shell.
Which option will cause the echo command NOT to output a trailing newline?
A. -p
B. -n
C. -s
D. -t
B. The -n option of the echo command does not output a trailing newline.
Which of the following commands will output a list of all of the file names under your home directory and all subdirectories with file names ending with .pdf?
A. search .pdf
B. ls -name -R ‘.pdf’
C. find /home/.pdf
D. find ~ -name ‘*.pdf’
D. To display all of the files with a .pdf extension at the end, the command find ~ -name ‘*.pdf’ is used. This will display all files named *.pdf in the home directory.
Your current present working directory is /home/jason/documents/. You just entered cd .. into the command line and then enter pwd. What output do you receive?
A. /home/jason/documents/
B. /home/jason
C. /home
D. /home/jason/documents/..
B. The .. is a special directory reference to the parent of the current present working directory. Using cd .. essentially moves the pwd up a single level to /home/jason.
Which of the following options must be used to remove a directory and its subdirectories?
A. rmdir -r
B. rm -r
C. rmdir
D. rm -all
B. The rm -r option is used to remove a directory and its files/folders recursively.
Which of the following is NOT a valid rule in naming a variable?
A. Variable names must start with a letter
B. Variable names must start with numbers
C. Underscores are used instead of embedded spaces
D. Punctuation marks are not allowed
B. The name of a variable should only contain letters (a to z or A to Z), numbers ( 0 to 9), or the underscore character ( _). Variables should also always start with a letter.
What is the proper command to use to compress the file filename.txt into the zip archive called myfile.zip?
A. zip myfile.zip filename.txt
B. unzip filename.txt myfile.zip
C. zip filename.txt myfile.zip
D. unzip myfile.zip filename.txt
A. The syntax for zipping a file into a zip archive is “zip myfile.zip filename.txt”.
What statement is used to get input from the terminal when a shell script is being run?
A. input
B. scan
C. read
D. in
C. The read command is used to get input from the terminal when using a shell script.
Which option can be used with tail to print the last 10 lines of a file and then keep printing any new lines that may be added continuously?
A. -n
B. -f
C. -x
D. -a
B. The -f option is used to “follow” the contents of the file. This lets tail print the last 10 lines of a file (usually a log file) and continue to print out new lines to the screen as they are added to the file.
Which command is used to make a shell variable known to subsequently executed programs?
A. announce
B. env
C. export
D. transfer
C. The command export is used to make a shell variable known to subsequently executed programs. Essentially, the export command creates a globally accessible variable when it is run.
What option can be used with cat to display line numbers with the text of a file to the screen?
A. #
B. -x
C. -n
D. -1
C. The -n option will show the line numbers next to a file’s contents when displayed to the screen. For example, “cat -n song.txt” will display the contents of the song.txt file with line numbers down the left column of the display.
What is one of the most basic features of a shell script?
A. The ability to compile programs
B. The ability to run commands
C. The ability to ask for user input
D. The ability to display command output information
B. A shell script is a computer program designed to be run by the shell. Typical operations performed by shell scripts include file manipulation and command execution. The most basic scripts run commands in serial order and do not provide any output back to the screen or seek input from a user.
What is a daemon?
A. A specialized system file
B. A type of virus that destroys system files
C. A program that runs in the background of the system
D. A configuration file
C. A daemon is a computer program that runs as a background process rather than under the direct control of an interactive user. Daemons are commonly used for processes that maintain server operations, such as the HTTPD (HTTP daemon) used by Apache to provide web server services to an end-user.
Which of the following files holds the definition of the local user accounts?
A. c/users
B. /etc/passwd
C. c/id
D. c/home
B. /etc/passwd contains the attributes of (i.e., basic information about) each user or account.
Which type of link is used to points to another file like a shortcut in Windows or a Macintosh alias?
A. Hard link
B. Symbolic link
C. Sticky link
D. Smooth link
B. A symbolic link, also termed a soft link, is a special kind of file that points to another file, much like a shortcut in Windows or a Macintosh alias. Unlike a hard link, a symbolic link does not contain the data in the target file.
Which of the following commands is used to show the information about a directory or a symbolic link?
A. ls -d
B. ls -s
C. ln -d
D. ln -s
A. ls -d shows information about a directory or symbolic link. This information is usually just its respective path, though.
A Linux computer currently has no access to the internet. Which command is used to display and manipulate the information about the network gateway for the system?
A. gateway
B. route
C. ifconfig
D. netstat
B. Route command is used to show/manipulate the IP routing table. It is primarily used to set up static routes to specific hosts or networks via an interface.
Which of the following is used as a virtual or pseudo filesystem used to interface with the kernel and process?
A. /boot
B. /proc
C. /sys
D. /dev
B. The /proc tree originated in System V Unix, where it only gave information about each running process, using a /proc/$PID/stuff scheme. Linux greatly extended that, adding all sorts of information about the running kernel’s status. The intended purpose for the /proc virtual filesystem is to provide an interface into the kernel and its processes.
Which of the following directories contain all of the installed kernels on your system and their needed drivers?
A. /boot
B. /proc
C. /sys
D. /dev
A. The /boot directory contains the kernel, its associated files, and its needed drivers to boot up the operating system during the startup process.
Which of the following options is used with tar to create a new .tar archive file?
A. -c
B. -v
C. -f
D. -n
A. The -c option is used to create a new tar file archive.
Which of the following programs on a Linux system could you use as a replacement for Microsoft Word?
A. Pages
B. Pico
C. Writer
D. Nano
C. Writer is a well-known word processor that is part of the LibreOffice suite. It can be used to replace just about anything that Microsoft Word can do. While vi and nano are text editors, they are not full-featured word processors like Microsoft Word. Pages is a word processor developed by Apple, and it only works on Mac OS X systems.
Which option will cause the echo command NOT to output a trailing newline?
A. -p
B. -n
C. -s
D. -t
B. The -n option of the echo command does not output a trailing newline.
Which of the following commands will output a list of all of the file names under your home directory and all subdirectories with file names ending with .pdf?
A. search .pdf
B. ls -name -R ‘.pdf’
C. find /home/.pdf
D. find ~ -name ‘*.pdf’
D. To display all of the files with a .pdf extension at the end, the command find ~ -name ‘*.pdf’ is used. This will display all files named *.pdf in the home directory.