Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 5

The hardware display and keyboard used to interact with a system is called:

A. physical console
B. virtual console
C. terminal
D. None of the above
ANSWER: A

An interface that provides a display for output and a keyboard for input to a shell
session.
A. physical console
B. virtual console
C. shell prompt
D. terminal
ANSWER: D

When a shell is used interactively, it displays a string when it is waiting for a


command from the user. This is called the _________.
A. physical console
B. virtual console
C. shell prompt
D. terminal
ANSWER: C

The part of the command line that adjusts the behavior of a command.
A. command
B. option
C. argument
D. None of the above
ANSWER: B

The part of the command line that specifies the target that the command should
operate on.
A. command
B. option
C. argument
D. None of the above
ANSWER: C

The name of a program to run is called


A. command
B. option
C. argument
D. None of the above
ANSWER: A

Which of the following are names of shell programs?


A. Bash
B. Korn Shell
C. Dash
D. Z Shell
E. All of the above
ANSWER: E

What does placing an ampersand sign (&) after a command on the command line do?
A. Disconnects the command from the terminal session.
B. Runs the command in foreground mode.
C. Runs the command in background mode.
D. Redirects the output to another command.
E. Redirects the output to a file.
ANSWER: C

What directory does the Linux FHS set aside specifically for installing third party
programs?
A. /usr/bin
B. /usr
C. /opt
D. /usr/sbin
E. /tmp
ANSWER: C

Which field contains the same data for both a /etc/passwd and /etc/shadow file
record?
A. Password
B. Account expiration date
C. UID
D. GID
E. User account’s username
ANSWER: E

Which environment variable allows you to retrieve the numeric user ID value for the
user account running a shell script?
A. $USER
B. $UID
C. $BASH
D. $HOME
E. $1
ANSWER: B

On Linux systems, which file typically now points to a shell program instead of
holding a shell program?
A. /bin/bash
B. /bin/dash
C. /bin/zsh
D. /bin/sh
E. /bin/tcsh
ANSWER: D

You have a lengthy file named FileA.txt. What will the head -15 FileA.txt command
do?
A. Display all but the last 15 lines of the file
B. Display all but the first 15 lines of the file
C. Display the first 15 lines of the file
D. Display the last 15 lines of the file
E. Generate an error message
ANSWER: C

You are trying to peruse a rather large text file. A co-worker suggests you use a
pager. Which of the following best describes what your co-worker is recommending?
A. Use a utility that allows you to view the first few lines of the file.
B. Use a utility that allows you to view one text page at time.
C. Use a utility that allows you to search through the file.
D. Use a utility that allows you to filter out text in the file.
E. Use a utility that allows you to view the last few lines of the file.
ANSWER: B

Which of the following does not describe the less utility?


A. It does not read the entire file prior to displaying the file’s first page.
B. You can use the up and down arrow keys to move through the file.
C. You press the spacebar to move forward a page.
D. You can use the Esc+V key combination to move backward a page.
E. You can press the X key to exit from the utility.
ANSWER: E

The cat -E MyFile.txt command is entered and at the end of every line displayed is
a $. What does this indicate?
A. The text file has been corrupted somehow.
B. The text file records end in the ASCII character NUL.
C. The text file records end in the ASCII character LF.
D. The text file records end in the ASCII character $.
E. The text file records contain a $ at their end.
ANSWER: C

A Unicode-encoded text file, MyUCode.txt, needs to be perused. Before you decide


what utility to use in order to view the file’s contents, you employ the wc command
on it. This utility displays 2020 6786 11328 to STDOUT. What of the following is
true?
A. The file has 2,020 lines in it.
B. The file has 6,786 words in it.
C. The file has 11,328 bytes in it.
D. All of the above
ANSWER: D

What are the types of option styles available for the ps command?
A. BSD style
B. Unix style
C. GNU style
D. All of the above
ANSWER: D

By default, if you specify no command-line options, what does the ps command


display?
A. All processes running on the terminal
B. All active processes
C. All sleeping processes
D. All processes run by the current shell
E. All processes run by the current user
ANSWER: D

What tool should we use to show the current CPU utilization of all the processes
running on the system?
A. top
B. ps
C. lsof
D. free
E. uptime
ANSWER: A

What top command displays cumulative CPU time instead of relative CPU time?
A. l
B. F
C. r
D. y
E. S
ANSWER: E

How can you temporarily pause a program from running in foreground in a terminal
session?
A. Press the Ctrl+Z key combination
B. Press the Ctrl+C key combination
C. Start the command with the nohup command
D. Start the command with the ampersand (&) command
E. Start the command with the fg command
ANSWER: A

John has decided to run a program in the background due to its time to process.
However, he realizes several hours later that the program is not operating
correctly and may have been consuming large amounts of CPU time unnecessarily. He
decides to stop the background job. What command should he first employ?
A. John should issue the ps -ef command to see all his background jobs.
B. John should issue the jobs -l command to see all his background jobs.
C. John should issue the kill %1 command to stop his background job.
D. John should issue the kill 1 command to stop his background job.
E. John should issue the kill -9 1 command to stop his background job.
ANSWER: B

April has an application that crunches lots of numbers and uses a lot of system
resources. She wants to run the application with a lower priority so it doesn’t
interfere with other applications on the system. What tool should she use to start
the application program?
A. renice
B. bash
C. nice
D. nohup
E. lower
ANSWER: C

April used the ps command to find the process ID of an application that she needs
to stop. What command-line tool should she use to stop the application?
A. killall
B. pkill
C. TERM
D. kill
E. pgrep
ANSWER: D

John wants to run his large number crunching application in background mode in his
terminal session. What symbol should he add to his command that runs the program in
order to accomplish that?
A. >
B. &
C. |
D. >>
E. %
ANSWER: B

You are looking at a directory that you have not viewed in a long time and need to
determine which files are actually directories. Which command is the best one to
use?
A. mkdir -v
B. ls
C. ls -F
D. ls -i
E. ll
ANSWER: C

You are using the ls command to look at a directory file’s metadata but keep seeing
metadata for the files within it instead. What command option will rectify this
situation?
A. -a
B. -d
C. -F
D. -l
E. -R
ANSWER: B

You have just created an empty directory called MyDir. Which command most likely
did you use?
A. mkdir -v MyDir
B. touch MyDir
C. cp -R TheDir MyDir
D. mv -r TheDir MyDir
E. rmdir MyDir
ANSWER: A

A long-time server administrator has left the company, and now you are in charge of
her system. Her old user account directory tree, /home/Zoe/, has been backed up.
Which command is the best one to use to quickly remove her files?
A. cp -R /home/Zoe/ /dev/null/
B. mv -R /home/zoe/ /dev/null/
C. rm -Rf /home/Zoe/
D. rm -ri /home/Zoe/
E. rm -rI /home/Zoe
ANSWER: E

You might also like