Systems and Scripts Flashcards

(13 cards)

1
Q

What do system and script commands help users do?

A

Gather system information and apply script-based environment changes.

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

What two key commands are discussed?

A

uname and source.

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

What is the purpose of the ‘uname’ command?

A

To retrieve system information such as kernel name, version, and system architecture.

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

What does ‘uname -r’ show?

A

Kernel release.

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

What does ‘uname -i’ display?

A

Hardware platform.

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

What does ‘uname -a’ print?

A

All system details.

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

Provide an example of using uname in a script.

A

echo “System Info: $(uname -a)”»_space; /var/log/sys_update.log

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

What is the purpose of the example uname command?

A

Captures system information and appends it to a log file before a kernel update.

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

What does the ‘source’ command do?

A

Executes scripts in the current shell session.

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

Why is ‘source’ useful?

A

It applies script changes immediately without starting a new shell.

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

What can the ‘source’ command update?

A

Environment variables, aliases, and configuration settings.

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

Example of using the source command?

A

source /etc/profile.d/custom_vars.sh && echo “Environment variables updated successfully.”

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

What does the example source command do?

A

Reloads environment variable script and confirms success if no errors occur.

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