0% found this document useful (0 votes)
111 views3 pages

Hands-On Activity 01 Linux Basic Commands-1

Uploaded by

Fake Account
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
111 views3 pages

Hands-On Activity 01 Linux Basic Commands-1

Uploaded by

Fake Account
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

BULACAN STATE UNIVERSITY CICT

Name: Section:
Subject: Date:

Hands-on Activity: Linux Command Line Essentials

Objective:
 To understand and practice essential Linux commands
 To navigate and manage files and directories in a Linux environment
 To perform basic system administration tasks

Materials:
 A computer with a Linux operating system (e.g. Linux Mint, Ubuntu, CentOS)
 A terminal or command-line interface (shortcut key CTRL+ALT+T)
 Online Linux OS via browser (https://www.onworks.net/playonline/runonworks.php)

Procedure:

Part 1: Navigation and File Management

1. Open a terminal or command-line interface on your Linux machine.


2. Type the command pwd and press Enter. What is the output?
Question: What does the pwd command do?
Output: _______________________________________________________
3. Type the command cd ~ and press Enter. What happens?
Question: What does the cd command do?
Output: _______________________________________________________
4. Type the command cd / and press Enter. What happens?
Question: What is the root directory in Linux?
Output: _______________________________________________________
5. Type the command mkdir mydir and press Enter. What happens?
Question: What does the mkdir command do?
Output: _______________________________________________________
6. Type the command cd mydir and press Enter. What happens?
Question: Where are you now?
Output: _______________________________________________________
7. Type the command touch myfile.txt and press Enter. What happens?
Question: What does the touch command do?
Output: _______________________________________________________
8. Type the command cp myfile.txt mycopy.txt and press Enter. What happens?
Question: What does the cp command do?
Output: _______________________________________________________
9. Type the command mv mycopy.txt mynewdir and press Enter. What happens?
Question: What does the mv command do?
Output: _______________________________________________________

CC105 Data Structures and Algorithms Prepared by: Edwin S. Garcia


BULACAN STATE UNIVERSITY CICT

10. Type the command rm myfile.txt and press Enter. What happens?
Question: What does the rm command do?
Output: _______________________________________________________

Part 2: File Editing and Viewing

1. Type the command nano myfile.txt and press Enter. What happens?
Question: What is the purpose of the nano editor?
Output: _______________________________________________________
2. Type some text into the file, such as "Hello World! Your name and other multiple text
in several lines" and save the file.
3. Type the command cat myfile.txt and press Enter. What is the output?
Question: What does the cat command do?
Output: _______________________________________________________
4. Type the command less myfile.txt and press Enter. What happens? Note: Press q to exit
Question: What does the less command do?
Output: _______________________________________________________
5. Type the command head myfile.txt and press Enter. What is the output?
Question: What does the head command do?
Output: _______________________________________________________
6. Type the command tail myfile.txt and press Enter. What is the output?
Question: What does the tail command do?
Output: _______________________________________________________

Part 3: System Administration

1. Type the command whoami and press Enter. What is the output?
Question: What does the whoami command do?
Output: _______________________________________________________
2. Type the command hostname and press Enter. What is the output?
Question: What does the hostname command do?
Output: _______________________________________________________
3. Type the command uname -a and press Enter. What is the output?
Question: What does the uname command do?
Output: _______________________________________________________
4. Type the command df -h and press Enter. What is the output?
Question: What does the df command do?
Output: _______________________________________________________
5. Type the command free -h and press Enter. What is the output?
Question: What does the free command do?
Output: _______________________________________________________

CC105 Data Structures and Algorithms Prepared by: Edwin S. Garcia


BULACAN STATE UNIVERSITY CICT

Part 4: Process Management

1. Type the command ps and press Enter. What is the output?


Question: What does the ps command do?
Output: _______________________________________________________
2. Type the command ps -ef and press Enter. What is the output?
Question: What does the -ef option do?
Output: _______________________________________________________
3. Type the command kill <process_id> and press Enter. What happens?
Question: What does the kill command do?
Output: _______________________________________________________
4. Type the command bg and press Enter. What happens?
Question: What does the bg command do?
Output: _______________________________________________________
5. Type the command fg and press Enter. What happens?
Question: What does the fg command do?
Output: _______________________________________________________

Rubrics for Grading:

Completeness (40 points)


 Did the student complete all parts of the activity?
 Are all questions answered correctly?
Understanding (30 points)
 Does the student demonstrate an understanding of the Linux commands?
 Are the questions answered correctly and with supporting evidence from the output?
Output (30 points)
 Are the outputs of the commands correctly recorded?
 Are the outputs accurately described and explained?

Grading Scale:
 90-100% Excellent
 80-89% Good
 70-79% Fair
 69% & below Needs Improvement

This hands-on activity covers many commonly used Linux commands, including:
 Navigation: pwd, cd, mkdir
 File management: touch, cp, mv, rm
 File editing and viewing: nano, cat, less, head, tail
 System administration: whoami, hostname, uname, df, free
 Process management: ps, kill, bg, fg

“Teachers can open the door, but you must enter it yourself.” —Chinese proverb

CC105 Data Structures and Algorithms Prepared by: Edwin S. Garcia

You might also like