Linux Beginner Activity
m (→Directions:: Fix link) |
|||
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | {| | + | {{Learning Activity Overview |
− | + | |title= | |
− | + | Absolute Starting Point to learn Linux Command Line | |
− | | | + | |overview= |
− | | | + | |prerequisites= |
− | + | None | |
− | | | + | |objectives= |
− | + | * Gain an understanding of the power of the command line. | |
− | + | * Know where to get help when its needed. | |
− | | | + | * Navigate the Linux file system tree. |
− | + | |process skills= | |
+ | }} | ||
+ | === Background === | ||
− | + | Learning the Linux command line can be very challenging. | |
− | + | There is a lot of material that is already available to learn the Linux command line. | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | Learning the Linux command line can be very challenging. | + | |
This activity gives learners a place to explore the Linux command line independent of the Linux distribution installed. | This activity gives learners a place to explore the Linux command line independent of the Linux distribution installed. | ||
=== Directions: === | === Directions: === | ||
− | For this exercise, you are only allowed to use the command line. | + | For this exercise, you are only allowed to use the command line. |
− | The goal is to get comfortable with the command line and understand the commands. Take your time. And have fun. | + | Your goal is not to rush through it. |
+ | The goal is to get comfortable with the command line and understand the commands. | ||
+ | Take your time. And have fun. | ||
− | Download [[Media:Animals.zip | Animals.zip]] and unzip it. | + | * Download [[Media:Animals.zip | Animals.zip]] and unzip it. |
− | $ unzip animals | + | $ unzip animals |
− | If your instructor has stored a tar file (animals.tgz) file locally | + | * If your instructor has stored a tar file (animals.tgz) file locally then you will need to unpack it. The command in Linux to unpack (unzip) a file is tar. |
− | then you will need to unpack it. The command in Linux to unpack (unzip) a file is | + | |
− | $ tar zxvf animals.tgz | + | $ tar zxvf animals.tgz |
− | Type the following command sequence (the $ is the command prompt): | + | * Type the following command sequence (the $ is the command prompt, so you do not type it): |
− | $ pwd | + | $ pwd |
− | $ ls -al | + | $ ls -al |
− | $ cd animals | + | $ cd animals |
− | $ ls | + | $ ls |
− | $ ls -l | + | $ ls -l |
− | $ cd air | + | $ cd air |
− | $ pwd | + | $ pwd |
− | Where are you? | + | * Where are you? |
+ | * Let's continue traversing the animals directory structure (tree). | ||
+ | * Type the following command sequence: | ||
− | + | $ cd .. | |
− | + | $ pwd | |
+ | $ cd land | ||
+ | $ ls | ||
+ | $ cd .. | ||
+ | $ cd sea | ||
+ | $ pwd | ||
− | + | * Now where are you? | |
− | + | * Using the commands that you just learned, draw out the directory tree from animals on down. | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | * Did you understand each command that you typed? | |
+ | * There is an easy way to look up what each command means. | ||
+ | * Its called the "man" command, which is short for manual. In Linux, there is a man page for each command. | ||
+ | * You just type man followed by the command. For example: | ||
+ | man ls. | ||
+ | * Try it now. You can see all the options that are available for the command. Everything you could possibly want to know. | ||
+ | * Take some time to use the man command for all the commands you have used so far. | ||
− | + | *Here are some other commands to try. Look them up as you go along using the man page. | |
− | + | $ echo hello | |
− | + | $ date | |
− | + | $ hostname | |
− | + | $ cal 1492 | |
− | + | $ history | |
− | + | $ echo 2+2 | |
+ | $ echo 2+2 | bc -l | ||
+ | $ clear | ||
+ | $ who | ||
+ | $ man file | ||
+ | $ yes 'help me' ****sorry about that******** did you figure out how to stop it? | ||
+ | $ top | ||
+ | $ cd | ||
+ | $ cat > message.txt | ||
+ | $ Linux is fun! | ||
+ | $ [ctrl-d] ****this is the control d command using your keyboard**** | ||
+ | $ ls | ||
+ | $ cat message.txt | ||
− | + | * Where is your message.txt file saved? | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | Where is your message.txt file saved? | + | |
Now wasn't that fun? Using a few commands you just learned, save your history to a text file. | Now wasn't that fun? Using a few commands you just learned, save your history to a text file. | ||
Hint: Direct (>) the history command into a text file. history > myfile.txt. | Hint: Direct (>) the history command into a text file. history > myfile.txt. | ||
− | === Deliverables | + | === Deliverables === |
Your myfile.txt file is your deliverable to hand into your instructor. | Your myfile.txt file is your deliverable to hand into your instructor. | ||
− | === Assessment | + | |
+ | === Assessment === | ||
To measure this activity, you can check the history file to be sure all commands are conducted including the man commands. | To measure this activity, you can check the history file to be sure all commands are conducted including the man commands. | ||
− | === Comments | + | === Comments === |
The animals directory tree structure is saved in a zip file. The instructor will need to have students install zip on their machines prior to the activity. | The animals directory tree structure is saved in a zip file. The instructor will need to have students install zip on their machines prior to the activity. | ||
Line 111: | Line 107: | ||
=== Additional Information: === | === Additional Information: === | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
+ | {{Learning Activity Info | ||
+ | |acm unit= | ||
+ | |acm topic= | ||
+ | |difficulty= | ||
+ | easy | ||
+ | |time= | ||
+ | 60 minutes | ||
+ | |environment= | ||
+ | Access to the LINUX command line. This activity also works on the iOS command line. | ||
+ | |author= | ||
+ | Suzanne Mello-Stark | ||
+ | |source= | ||
+ | This is an original activity. | ||
+ | |license= | ||
+ | {{License CC BY SA}} | ||
+ | }} | ||
− | === Suggestions for the Open Source Project | + | |
+ | === Suggestions for the Open Source Project === | ||
This activity can be done first before jumping into any Linux based Open Source Project. | This activity can be done first before jumping into any Linux based Open Source Project. | ||
− | + | [[Category:Learning Activity]] | |
− | + | [[Category:Tools and Environment]] | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | [[Category: | + | |
− | [[Category: Tools and | + | |
[[Category:Introduction]] | [[Category:Introduction]] |
Latest revision as of 13:25, 8 September 2018
Title |
Absolute Starting Point to learn Linux Command Line |
---|---|
Overview | |
Prerequisites |
None |
Learning Objectives |
After successfully completing this activity, the learner should be able to:
|
Process Skills Practiced |
Contents |
Background
Learning the Linux command line can be very challenging. There is a lot of material that is already available to learn the Linux command line. This activity gives learners a place to explore the Linux command line independent of the Linux distribution installed.
Directions:
For this exercise, you are only allowed to use the command line. Your goal is not to rush through it. The goal is to get comfortable with the command line and understand the commands. Take your time. And have fun.
- Download Animals.zip and unzip it.
$ unzip animals
- If your instructor has stored a tar file (animals.tgz) file locally then you will need to unpack it. The command in Linux to unpack (unzip) a file is tar.
$ tar zxvf animals.tgz
- Type the following command sequence (the $ is the command prompt, so you do not type it):
$ pwd $ ls -al $ cd animals $ ls $ ls -l $ cd air $ pwd
- Where are you?
- Let's continue traversing the animals directory structure (tree).
- Type the following command sequence:
$ cd .. $ pwd $ cd land $ ls $ cd .. $ cd sea $ pwd
- Now where are you?
- Using the commands that you just learned, draw out the directory tree from animals on down.
- Did you understand each command that you typed?
- There is an easy way to look up what each command means.
- Its called the "man" command, which is short for manual. In Linux, there is a man page for each command.
- You just type man followed by the command. For example:
man ls.
- Try it now. You can see all the options that are available for the command. Everything you could possibly want to know.
- Take some time to use the man command for all the commands you have used so far.
- Here are some other commands to try. Look them up as you go along using the man page.
$ echo hello $ date $ hostname $ cal 1492 $ history $ echo 2+2 $ echo 2+2 | bc -l $ clear $ who $ man file $ yes 'help me' ****sorry about that******** did you figure out how to stop it? $ top $ cd $ cat > message.txt $ Linux is fun! $ [ctrl-d] ****this is the control d command using your keyboard**** $ ls $ cat message.txt
- Where is your message.txt file saved?
Now wasn't that fun? Using a few commands you just learned, save your history to a text file. Hint: Direct (>) the history command into a text file. history > myfile.txt.
Deliverables
Your myfile.txt file is your deliverable to hand into your instructor.
Assessment
To measure this activity, you can check the history file to be sure all commands are conducted including the man commands.
Comments
The animals directory tree structure is saved in a zip file. The instructor will need to have students install zip on their machines prior to the activity. Or the instructor will need to create a tar file to download locally and unpack it
Additional Information:
ACM BoK Area & Unit(s) |
|
---|---|
ACM BoK Topic(s) |
|
Difficulty |
easy |
Estimated Time to Complete |
60 minutes |
Environment / Materials |
Access to the LINUX command line. This activity also works on the iOS command line. |
Author(s) |
Suzanne Mello-Stark |
Source |
This is an original activity. |
License |
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License |
Suggestions for the Open Source Project
This activity can be done first before jumping into any Linux based Open Source Project.