Red Hat System Administration I 1.7 Lab PDF
Red Hat System Administration I 1.7 Lab PDF
NETLAB Academy Edition, NETLAB Professional Edition, and NETLAB+ are registered trademarks of Network Development Group, Inc.
“Red Hat,” Red Hat Linux, and the Red Hat “Shadowman” logo are trademarks or registered trademarks of Red Hat, Inc. in the US
and other countries.
1.7. Lab: Accessing the Command Line
Contents
Introduction ........................................................................................................................ 3
Outcomes ............................................................................................................................ 3
Lab Topology ....................................................................................................................... 4
Lab Settings ......................................................................................................................... 5
1 Performance Checklist ................................................................................................ 6
Introduction
In this lab, you will use the Bash shell to efficiently execute commands using shell
metacharacters.
Outcomes
Practice using shell command line editing and history functions to efficiently
execute commands with minor changes.
Change the password of the student user to T3st1ngT1me.
Execute commands used to identify file types and display parts of text files.
Lab Topology
Lab Settings
The information in the table below will be needed in order to complete the lab. The
task sections below provide details on the use of this information.
1 Performance Checklist
The topology includes two virtual machines that are accessible to users. Take care to
perform the tasks as instructed, including using the appropriate virtual machine as
directed.
a. At the GNOME login screen, click the student user account. Enter
student when prompted for the password.
7. Use the wc command and bash shortcuts to display the size of /usr/bin/clean-
binary-files.
The easiest shortcut to use is the Esc key + . (period) in order to reuse the argument
from the previous command. This can save you a lot of time when entering commands.
You can use the Esc key + . (period) shortcut again to reuse the previous argument.
10. Repeat the previous command, but use the -n 20 option to display the last 20
lines in the file. Use command line editing to accomplish this with a minimal
amount of keystrokes.
Up Arrow displays the previous command. Ctrl+a makes the cursor jump to the
beginning of the line. Ctrl+Right Arrow jumps to the next word, then add the -n 20
option and press Enter to execute the command.
11. Execute the date command without any arguments to display the current date
and time.
Display the list of previous commands with the history command to identify
the specific date command to be executed. Execute the command with
the !number history command.
The number in your history will likely differ from the example shown.