System Info, History and ENV commands (4) Flashcards
Objective 103.1 Weight 4
Which of the following commands will display only the Linux kernel’s version according to the command’s man pages?
- uname
- uname -a
- uname -v
- uname -r
- uname -s
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.
Which of the following commands will display only the name of the OS?
- uname
- uname -a
- uname -v
- uname -r
- uname -s
Both the uname command and the uname -s command show only the name of the OS.
Which of the following is true concerning getting help on a Linux system?
- The help system is for obtaining information on built-in Bash shell commands
- The man pages are no longer used on modern Linux systems.
- There are info pages available for all commands on modern Linux systems.
- A command’s man page provides proper command syntax in Synopsis
Correct selection - The info pages are organized on levels using hyperlinks.
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.
Which of the following will recall the last command from your history?
- Press the up arrow key
- Press the down arrow key
- Press the q key
- !!
- history
- 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.
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?
- Press the up arrow key one time, and press Enter
- Press the up arrow key till you reach the command on line 432, and press Enter.
- Type in the command: !432
- Type in the command: !!432
- Type in the command: history 432
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.
Which of the follow commands allow you to see all the set environment variables for a system?
- set
- echo
- export
- env
- printenv
- bash
- 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.