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 |
|
|
Question |
|
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
|
|
Help dir |
Paste your Screenshot
|
|
Whatis of |
Paste your Screenshot
|
|
Question |
|
|
Question |
|
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 |
|
|
Question |
|
4. ifconfig
It is sometimes beneficial to know your basic IP information. You can see this on your computer by looking up the configuration.
- Locate and open Terminal from Applications->Utilities->Terminal.
- 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.
- 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 - Type netstat -nr | grep ‘default’
Paste your Screenshot here :
|
Question |
|
|
Question |
|
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 |
|||
|
Destination |
Maximum |
Minimum |
Average |
|
Default Gateway |
|
|
|
|
|
|
|
|
|
Question |
|
||
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 |
|
|
Question |
|
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 |
|
|
Question |
|
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 |
|
|
Question |
|
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 |
|
|
Question |
|
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 |
|
|
Question |
|
