System Info, History and ENV commands (4) Flashcards

Objective 103.1 Weight 4

1
Q

Which of the following commands will display only the Linux kernel’s version according to the command’s man pages?

  1. uname
  2. uname -a
  3. uname -v
  4. uname -r
  5. uname -s
A

According to the man page, uname -v shows kernel version

The uname -r (–kernel-release) command shows the Linux kernel’s version information, but according to the uname command’s man pages, the uname -v (–kernel-version) command shows the Linux kernel’s information, even though it’s really the kernel build data.

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

Which of the following commands will display only the name of the OS?

  1. uname
  2. uname -a
  3. uname -v
  4. uname -r
  5. uname -s
A

Both the uname command and the uname -s command show only the name of the OS.

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

Which of the following is true concerning getting help on a Linux system?

  1. The help system is for obtaining information on built-in Bash shell commands
  2. The man pages are no longer used on modern Linux systems.
  3. There are info pages available for all commands on modern Linux systems.
  4. A command’s man page provides proper command syntax in Synopsis
    Correct selection
  5. The info pages are organized on levels using hyperlinks.
A

1. The help system is for built-in Bash shell commands, and the info pages are more verbose information regarding commands, but not all commands have info pages.
4. The man pages are still used on Modern Linux systems, and their Synopsis section for each command shows the proper syntax needed for using the command.
5. The info pages are organized on levels using hyperlinks, and both man and info pages can be exited by pressing the q key on the keyboard.

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

Which of the following will recall the last command from your history?

  1. Press the up arrow key
  2. Press the down arrow key
  3. Press the q key
  4. !!
  5. history
A
  1. Press the up arrow key
    By pressing the up arrow key on your keyboard that will recall the last command from your history (but you?ll need to press the Enter key to execute it). By typing in the !! command, that will recall the last command from your history, and execute it.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

You’ve look at your command history by entering and executing the history command. You’d like to recall and run the command on the line number 432. What are the best methods to do this?

  1. Press the up arrow key one time, and press Enter
  2. Press the up arrow key till you reach the command on line 432, and press Enter.
  3. Type in the command: !432
  4. Type in the command: !!432
  5. Type in the command: history 432
A

2. Press the up arrow key till you reach the command on line 432, and press Enter.
OR
3. Type in the command: !432

By typing in the command !432, you will recall and run the command on the line number 432 from the history command’s output. You can also press the up arrow key until you reach the command on line 432, and press Enter, but it’s a slower method.

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

Which of the follow commands allow you to see all the set environment variables for a system?

  1. set
  2. echo
  3. export
  4. env
  5. printenv
  6. bash
A
  1. set, 4. env AND 5. printenv

The set, env, and printenv commands all allow you to see ALL the set environment variables for a system, but the set command shows a little more.

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