Linux Beginner Activity

From Foss2Serve
(Difference between revisions)
Jump to: navigation, search
(Created page with "{| border="1" |- |'''Title''' || Absolute Starting Point to learn Linux Command Line |- |'''Overview''' || |- |'''Author''' || Suzanne Mello-Stark |- |'''Prerequisite Kn...")
 
 
(6 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{| border="1"
+
{{Learning Activity Overview
|-
+
|title=
|'''Title''' || Absolute Starting Point to learn Linux Command Line
+
Absolute Starting Point to learn Linux Command Line
|-
+
|overview=
|'''Overview''' || 
+
|prerequisites=
|-
+
None
|'''Author''' ||  Suzanne Mello-Stark
+
|objectives=
|-
+
* Gain an understanding of the power of the command line.
|'''Prerequisite Knowledge''' || None
+
* Know where to get help when its needed.
|-
+
* Navigate the Linux file system tree.
|'''Learning Objectives''' ||
+
|process skills=
 +
}}
  
 +
=== Background ===
  
Learners will begin to gain an understanding of the power of the command line.
+
Learning the Linux command line can be very challenging.
Learners will know where to get help when its needed.
+
There is a lot of material that is already available to learn the Linux command line.     
Learners will be able to navigate the Linux file system tree.
+
 
+
|}
+
 
+
=== 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.
 
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. Your goal is not to rush through it.   
+
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 the following file from [File: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.  man tar.
+
  
$ 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:
  
Let's continue traversing the animals directory structure (tree).
+
$ cd ..
Type the following command sequence:
+
$ pwd
 +
$ cd land
 +
$ ls
 +
$ cd ..
 +
$ cd sea
 +
$ pwd
  
$ cd ..
+
* Now where are you?
$ pwd
+
* Using the commands that you just learned, draw out the directory tree from animals on down.
$ cd land
+
$ ls
+
$ cd ..
+
$ cd sea
+
$ pwd
+
  
Now where are you?
+
* 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.
  
Using the commands that you just learned, draw out the directory tree from animals on down.
+
*Here are some other commands to try.  Look them up as you go along using the man page.
  
Did you understand each command that you typed?
+
$ echo hello
There is an easy way to look up what each command means.  
+
  $ date
Its called the man command. In Linux, there is a man page for each command.  
+
  $ hostname
You just type man followed by the command. For example, man ls.  
+
  $ cal 1492
Try it now. You can see all the options that are available for the command.  Everything you could possibly want to know.   
+
  $ history
Take some time to use the man command for all the commands you have used so far.
+
  $ 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
  
Here are some other commands to try.  Look them up as you go along using the man page.
+
* Where is your message.txt file saved?
 
+
$ 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.   
 
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 112: Line 107:
  
 
=== Additional Information: ===
 
=== Additional Information: ===
{| border="1"
 
|-
 
|'''Knowledge Area/Knowledge Unit''' || What ACM Computing Curricula 2013 https://www.acm.org/education/CS2013-final-report.pdf knowledge area and units does this activity cover?
 
|-
 
|'''Topic''' || What specific topics are addressed? The Computing Curriucula 2013 provides a list of topics - https://www.acm.org/education/CS2013-final-report.pdf
 
|-
 
|'''Level of Difficulty''' || Easy
 
|-
 
|'''Estimated Time to Completion''' ||  60 minutes
 
|-
 
|'''Materials/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''' || Licensed CC BY-SA
 
|}
 
  
 +
{{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]]
This work is licensed under a
+
[[Category:Tools and Environment]]
[http://creativecommons.org/licenses/by-sa/4.0/ Creative Commons Attribution-ShareAlike 4.0 International License]
+
[[Category:Introduction]]
 
+
[[File:CC_license.png]]
+
 
+
[[Category: Software Engineering]]
+
[[Category: Tools and Environments]]
+

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:
  • 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
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.

$ 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

CC license.png


Suggestions for the Open Source Project

This activity can be done first before jumping into any Linux based Open Source Project.

Personal tools
Namespaces
Variants
Actions
Events
Learning Resources
HFOSS Projects
Evaluation
Navigation
Toolbox