Ch2 Using the Shell Exam
-
Which command will send text to the terminal display:
echo
type
show
print
-
To display your current location within the filesystem, you can type:
dir
whereami
cwd
pwd
-
The _____ command displays information about the Linux kernel:
kern
linux
real
uname
-
A command can take the form of:
(choose three)
- A block
- A configuration file
- A function
- A variable
- An alias
- A program built-in to the shell
-
Which of the following are valid command lines?
(choose two)
ls /etc -l
ls -l /etc
ls -/etc
-l ls /etc
-
You want to execute the
ls
command with two options:-r
and-l
. Which of the following are valid ways to run this command:(choose three)
ls -r -l
ls -rl
ls -l -r
ls --r --l
ls rl
rl ls
-
You can pass arguments to long options by using which of the following techniques:
(choose two)
- –option argument
- –option=argument
- –option~argument
- –option{argument}
-
When typing a command, you can have the bash shell complete the command by pressing which key?
- The Tab key
- The Up Arrow key
- The Backspace key
- The Enter key
- The Del key
-
Long command options are preceded by which two characters?
||
&&
--
**
-
Which two characters do you use to tell the command that you are finished providing options and that the remaining data on the command line is arguments?
--
&&
**
||
-
The _____ option to the
uname
command will display the kernel name.-k
-s
-x
-n
-
Which command is used in order to view the manual page for a topic?
man
doc
-x
show
-m
-
The ______ command will display your current working directory.
exit
exec
uname
pwd
-
The command
manual ls
will provide detailed information about how thels
command functions.True or False?
- True
- False
-
Which of the following man page sections will show the syntax for how a command should be executed?
- The DESCRIPTION section
- The NAME section
- The FILES section
- The SYNOPSIS section
-
The
[ ]
characters aroundday
in the examplecal [-smjy13] [[[day] month] year]
means that day is:- An argument that must be “day” and nothing else
- Required
- Optional
- An option, not an argument
-
The syntax
[-u|--utc|--universal]
means:- This is invalid syntax
- These are required options
- These three options are different
- These three options mean the same thing
-
The command
man 5 passwd
will:- Print the first five man pages that refer to the term passwd.
- Not work; you can’t give a numeric argument to the man command.
- Display the man page in Section 5 for passwd.
- Display the first five lines of the man page for the passwd command.
-
To see a list of commands that are available while viewing a man page, you can type the __ character.
- h
- w
- g
- c
-
To search for something while viewing a man page, you first type a __ character.
- /
- <
- >
- |
-
Special file man pages are typically located in section ____.
- 4
- 2
- 1
- 3
-
System Administration man pages are typically located in section ___.
- 9
- 6
- 7
- 8
-
Shell command man pages are typically located in section ___.
- 2
- 1
- 4
- 3
-
A pair of single quotes
'
will prevent the shell from interpreting any special character.True or False?
- True
- False
Subscribe
0 Comments
Newest