link: https://awsrestart.instructure.com/courses/1632/modules/items/906203

Objectives

In this lab, you will:


task 1: Use SSH to connect to an Amazon Linux EC2 instance

.

.


Task 2: Use the tee command

In this task, you use the tee command to display the output to the screen and a file.

The tee command reads the standard input. In this example, the standard input is hostname. The tee command outputs the hostname to the screen (in the shell) and the designated file, which is file1.txt.

  1. To validate that you are in the /home/ec2-user folder, enter pwd and press Enter.
  2. From your current location in the terminal, enter hostname | tee file1.txt and press Enter.

Untitled