Linux Beginner Activity
Title | Absolute Starting Point to learn Linux Command Line |
Overview | |
Author | Suzanne Mello-Stark |
Prerequisite Knowledge | None |
Learning Objectives |
|
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:
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 |
Suggestions for the Open Source Project:
This activity can be done first before jumping into any Linux based Open Source Project.
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License