103.1 Work on the command line Flashcards

1
Q

How do you navigate to a specific man page section?

A
#man 4 find
(4 being the section and find the command)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the command that displays a list of all topics in the man pages that are related to the subject of a query?

A

apropos

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What does section 1 of the man pages contain?

A

It contains common user’s commands.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the syntax to access the manual pages of a command?

A

man

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Which is the environmental variable that dictates how many lines the .bash_history will contain?

A

$HISTFILESIZE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the file that contains the previously run commands in the shell?

A

.bash_history located in the user’s home directory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How do you execute a command in the output of #history?

A

Either my pressing the up/down arrow keys or by entering an exclamation mark and the command number.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What command helps in identifying the location of any particular command?

A

whereis

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are weak and strong quotes?

A

weak: double quotes
strong: single quotes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What command is used to determine if something is a function, a file, an alias, a built-in or a keyword?

A

type

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What command locates an application file that is located within the user’s PATH?

A

which

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What command starts a new shell from the current shell?

A

bash

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the command that displays the shell options?

A

shopt

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What command is used to remove a variable or a custom bash function?

A

unset -f

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

How do you turn off bash shell debugging?

A

set +x

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

How do you turn on debugging for the bash shell?

A

set -x

17
Q

What command displays environment variables?

A

env

18
Q

Give examples of different shells.

A

Bash > bourne again shell
csh > C programming style syntax
ksh > Korn shell, based on shell with csh features
zsh > includes features of bash and ksh

19
Q

What is the default shell?

A

bash (bourne again shell)

20
Q

What command displays in order all the recent commands we have run?

A

history

21
Q

What is the command that can be used to print the value of a variable to the screen?

A

echo $VARIABLENAME

22
Q

What is the Linux shell?

A

It is the CLI, the text based command line environment.

23
Q

What does the #export command do?

A

It exports a variable to the current shell and any new shells started from the current shell.

24
Q

What man page syntax do you use to search the man pages for a specified command?

A

man -k