Hands-On Activity 01 Linux Basic Commands-1
Hands-On Activity 01 Linux Basic Commands-1
Name: Section:
Subject: Date:
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:
10. Type the command rm myfile.txt and press Enter. What happens?
Question: What does the rm command do?
Output: _______________________________________________________
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: _______________________________________________________
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: _______________________________________________________
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