3-Configurig Bash Shell Flashcards

1
Q

is a name or identifier that can e assignment a value

A

variable

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

how to declare a local variable:

A

varname=”value”

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

is a variable that is only available to the shell in which it was created.

A

local variable

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

is available to the shell in which it was created, and it is passed into all other commands/programs started by the shell.

A

environment variable

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

how to print a local variable:

A

echo $varname

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

how to declare an environment variable:

A

export VARNAME=”value”

note: variable name should be in caps

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

how to print an environment variable:

A

echo $VARNAME

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

If you create a variable and then no longer want that variable to be defined, use the _______ command to delete it

A

unset

example:
unset VARIABLE

(no output will be displayed)

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

The _______ variable is one of the most critical environment variables for the shell, so it is important to understand the effect it has on how commands will be executed.

A

PATH

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

The _______ variable contains a list of directories that are used to search for commands entered by
the user.

A

PATH

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

specifies the location of a file or directory from the top-level directory through all of the subdirectories to the file or directory.

A

absolute path

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

always start with the / character representing the root directory. For example, /usr/bin/ls

A

absolute path

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

[skee@localhost ~]$ /home/skee/welcome.sh

The example above is a _______ path

A

absolute

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

specifies the location of a file or directory relative to the current directory. For example, in the /home/sysadmin directory, a relative path of test/newfile would actually refer to the /home/sysadmin/test/newfile file.

A

relative path

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

[skee@localhost ~]$ ./welcome.sh

The example above is a _______ path

A

relative

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

requires administrative access to the system as the files under the /etc directory can only be modified by an administrator. A user can only modify the initialization files in their home directory.

A

Modifying global configuration

17
Q

is a special character to the Bash shell to indicate the execution of a command within the history list. T

A

! exclamation mark

18
Q

To clear the entire contents of the history file,

execute _______

A

history -c