💬 Request a Quote, It's FREE!!!

Lab: MAC Terminal Assignment Instructions Overview The following steps are a basic orientation to the command line and data networking. In this lab, you will access the terminal and perform some

Lab: MAC Terminal Assignment Instructions

Overview

The following steps are a basic orientation to the command line and data networking. In this lab, you will access the terminal and perform some basic commands that will systematically open some pathways into what really makes your computer and network tick.

Instructions

Basic Requirement: taking screenshots is a basic skill you will need for this lab. If you do not know how to take a screenshot, you should Google it and watch videos. Macs have multiple options for creating screenshots. 

On to the Lab:

TERMINAL BASICS

Before the days of the graphical user interface, you completed your tasks via the Disk Operation System. From the Apple II to the Commodore 64, the user had to type a list of commands to get the computer to perform tasks.


 

While most of us utilize technology with a graphical user interface, the command line services are still there and are quite valuable to the modern technology professional, not only for understanding how the computer functions but also for performing system tasks.

This is a step back in time; the majority of the world's computer system administrators work in terminal services daily to keep everything from the web to medical databases running effectively.  So, this lab is to give you an understanding of how to perform some common GUI tasks in the command line. You may even be surprised that the command line reveals more information than the GUIs display. 

Note: Your assignment will be checked for originality via the Turnitin plagiarism tool.

 

LAB QUESTIONS

1)     DATE AND TIME STAMPING: 
For your first exercise, you will learn to access the Date/Time and calendar via the command line.

a.      Open Terminal, type the following command and hit return: date

b.     Type the following command: cal 1 2019

c.      Type the following command: export PS1="\$(date)\$" (Note: if you close the terminal at any time, you will need to redo this command.  Otherwise, you lose the time/date stamp.

Paste your Screenshot here:

 

Question 1: Through your own research, how would you change the time, date, and year in the Mac terminal? What would command be:

 

Question 2: Why would time/date stamping be useful in real-world applications?

 

 

2)    Command Line Help-1

In the answer to question 2 above, there is no wrong way to get the correct answer (other than to say that you just guessed). However, Terminal provides a straightforward method. It is the embedded help command. 

Type the following in Terminal:

Help cd

                  

 

 

 

 

Paste your Screenshot here:

 

 

 

 

Help dir

 

 

Paste your Screenshot here:

 

 

 

 

 

 

 

Whatis of

 

 

 

Paste your Screenshot here :

 

 

 

 

 

 

 

Question 3:  What does the command “cd” do?

 

Question 4:  What does the “Ls” command do?

 

 

 

3.    Command Line Help-2

Knowing the history of a command that may have been executed previously is useful. To demonstrate, let’s perform the following steps.

 

In the terminal, type the following Commands:

·       ls

·       cd Downloads  (Make sure the “D” is capitalized)

·       ls -r

·       ls -R

·       history

 

Paste your Screenshot here :

Question 5: What is the difference between ls -r and ls -R?

 

Question 6: Why is the history command important?

 

 

4.    ifconfig

It is sometimes beneficial to know your basic IP information. You can see this on your computer by looking up the configuration. 

  1. Locate and open Terminal from Applications->Utilities->Terminal.
  2. At the Terminal Prompt, type ifconfig and press Enter. This will list all of your network settings, including the physical addresses of your wired and wireless hardware.
  3. To find the Physical Address for your connection:
    > The wired physical address will be listed under en0:  ifconfig en0
    > The wireless physical address will be listed under en1: :  ifconfig en1
  4. Type netstat -nr | grep ‘default’

Paste your Screenshot here :

Question 7:  What is your IPV4 address (use IPv6 if IPV4 does not display)?

 

Question 8:  What is the Address of your Default gateway?

 

 

5.    Ping

Ping is a command that tells you if a host is reachable. It sends a packet and awaits the reply, then tells you how long it takes. This allows you to diagnose latency or packet loss issues.

At the command line prompt, type the following:

·       Ping (insert your default gateway IP)After 10 packets, hit Control+C to stop the capture

·       Ping google.com. After 10 packets, hit Control+C to stop the capture

Paste your Screenshot here:

Question 9:  What were the time statistics (fill in the table)?

Destination

Maximum

Minimum

Average

Default Gateway

 

 

 

Google

 

 

 

Question 10:  Why did Google take longer than your default gateway?

 

 

6.    Trace Route

While Ping gives you the traffic statistics, Trace Route will take you through the entire path to the destination. 

At the command line prompt, type the following:

Traceroute google.com

Traceroute google.com  (yes, you need to complete 2 trace routes)

 

Paste your Screenshot here :

Question 11: Did the traceroute follow the exact same path in both traces?

 

Question 12: If you saw variances in the two traces, explain why. If you did not, explain why you might see differences.

 

 

7.    Directory Task-1

All of the director commands are now completed in the GUI. But, they all have an underlining found in the terminal. For this task, we will look at moving between directories. In the GUI, it is point and click first, then you look at the GUI version of the directory and click on the folder.  Let’s look at the directory in Terminal.

At the command line:

·       Type: Ls

·       Type: cd library

 

             Paste your Screenshot here :

Question 13:  What do you appreciate about using the terminal, and why would it be useful?

 

Question 14:  What can you appreciate about the GUI after seeing this?

 

 

8.    Directory Task-2

Making a director in GUI is a task of selecting the folder and clicking on Add Folder. In the terminal, you need to move to the correct directory and then use the make directory command.

At the command line prompt, type the following:

·       Ls

·       mkdir test

·       Ls

Paste your Screenshot here :

 

Question 15:  Did you see your new directory on the second directory?

 

Question 16:  Why or why not?

 

 

9.    Directory Task-3

Switching between directories is a simple task in GUI. It is not too different in the terminal if you know the commands, except for being unable to point and click. 

At the command line prompt, type the following:

·       CD test

·       Ls

 

Paste your Screenshot here :

Question 17:  How many files do you see in the new directory?

 

Question 18:  Why are you not seeing any files or folders in this new directory?

 

 

10.  Directory Task-4

Often, we need to remove directories as well. To do this, we use the remove directory command. Always be very careful, as removing or deleting is permanent in DOS. Also, keep in mind that you cannot delete the directory if you are in it, so you must change your directory before deleting it. Try using CD to back up one level in the directory tree.

We will not have you remove the test folder for this lab. If you want to do this on your own, you can do it by going to the folder and removing it directly. 

Question 19:  What command would you have used to remove the directory in the MAC Terminal?

 

Question 20:  In brief words, what have you learned from this lab?

 

WhatsApp