Linux Beginner Activity

From Foss2Serve
Jump to: navigation, search
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