Welcome to LabEx! In this lab, you'll get your feet wet with Linux. We'll cover the famous "Hello, World!" program, some fundamental commands (whoami, id), navigating the terminal, and even installing a handy system monitoring tool. No prior experience is necessary โ we'll walk you through it!
Click the Continue button below or the VM icon on the left to start the lab.
Skills Graph
%%%%{init: {'theme':'neutral'}}%%%%
flowchart RL
linux(("Linux")) -.-> linux/BasicSystemCommandsGroup(["Basic System Commands"])
shell(("Shell")) -.-> shell/BasicSyntaxandStructureGroup(["Basic Syntax and Structure"])
linux(("Linux")) -.-> linux/UserandGroupManagementGroup(["User and Group Management"])
linux(("Linux")) -.-> linux/PackagesandSoftwaresGroup(["Packages and Softwares"])
linux/BasicSystemCommandsGroup -.-> linux/echo("Text Display")
shell/BasicSyntaxandStructureGroup -.-> shell/comments("Comments")
shell/BasicSyntaxandStructureGroup -.-> shell/quoting("Quoting Mechanisms")
linux/UserandGroupManagementGroup -.-> linux/sudo("Privilege Granting")
linux/UserandGroupManagementGroup -.-> linux/whoami("User Identifying")
linux/UserandGroupManagementGroup -.-> linux/id("User/Group ID Displaying")
linux/PackagesandSoftwaresGroup -.-> linux/apt("Package Handling")
linux/PackagesandSoftwaresGroup -.-> linux/software("Linux Software")
subgraph Lab Skills
linux/echo -.-> lab-270253{{"Your First Linux Lab"}}
shell/comments -.-> lab-270253{{"Your First Linux Lab"}}
shell/quoting -.-> lab-270253{{"Your First Linux Lab"}}
linux/sudo -.-> lab-270253{{"Your First Linux Lab"}}
linux/whoami -.-> lab-270253{{"Your First Linux Lab"}}
linux/id -.-> lab-270253{{"Your First Linux Lab"}}
linux/apt -.-> lab-270253{{"Your First Linux Lab"}}
linux/software -.-> lab-270253{{"Your First Linux Lab"}}
end
Hello LabEx
Let's get your computer to say hello! ๐ First up, the terminal. Think of it as your text-based command center for interacting with your computer.
To open the terminal:
Look on the left side of your desktop.
Find the Xfce Terminal icon.
Click it!
The terminal window is where you'll type commands. It's a powerful tool and often a quicker way to accomplish many tasks in Linux than using a mouse.
Now, let's make it say hello! We'll use the echo command. echo simply repeats whatever you tell it to.
The best way to learn Linux (and programming in general) is by doing. Don't just passively read through this โ try things out in the LabEx environment! It's the perfect place to experiment and learn.
Type this command into your terminal exactly as shown:
echo "Hello LabEx"
Press Enter.
You should see "Hello LabEx" appear. Congratulations, you just ran your first Linux command!
Key things to remember:
Linux is case-sensitive: echo, Echo, and ECHO are all different.
Spaces matter. Make sure there's a space between echo and the quotation mark (").
The quotes tell echo precisely what string of text to repeat.
Tips: This Lab is part of the Linux Skill Tree, a structured knowledge system with various skills. After each step, the system verifies your actions, awarding skill points for correct responses ๐ก. Review your accumulated points by visiting the Linux Skill Tree after completing the lab.
Click Continue below to keep going. Labby will automatically verify your work.
Displaying the Current User
Let's find out who the computer thinks you are.
Type this command and press Enter:
whoami
Tips: Click "Explain Code" at the bottom right of the code block to chat with Labby AI for code clarification. After chatting with Labby, click "Continue" to return to the lab.
This is asking the computer, "Who am I?" It'll respond with your username.
You should see:
labex
whoami is useful when you're working on different machines or using different accounts.
Keep going by clicking Continue below.
Displaying User and Group Information
Let's get some more user information with the id command. This is a cool way to see what groups you belong to.
In Linux, users are organized into groups. These groups determine the permissions and access rights a user has.
Don't worry too much about the numbers right now. Here's the breakdown:
uid: Your User ID (a unique numerical identifier).
gid: Your primary Group ID.
groups: All the groups you are a member of.
You can also use id to look up other users. Try:
id root
You'll see:
uid=0(root) gid=0(root) groups=0(root)
root is the superuser โ like the administrator of the system!
Don't be concerned if this seems a bit complex right now. You'll learn more about users and groups as you progress. Remember, practice makes perfect. The more you use these commands in LabEx, the more comfortable you'll become with them!
Click Continue to move on.
htop System Monitor
Let's install a helpful tool called htop. It's like a dashboard that gives you a real-time view of what's happening inside your computer.
In Linux, you typically install software using a package manager. Package managers are similar to app stores for your phone. They simplify the process of finding and installing software.
apt is a widely used package manager for Debian-based systems, such as Ubuntu. First, let's update the list of available packages. This ensures we're installing the latest version of htop. Type this command and press Enter:
sudo apt update
Next, we'll use sudo apt install to install htop:
sudo: Stands for "SuperUser DO." It allows you to execute commands with administrator privileges (temporarily).
apt: The tool for installing and managing software.
install: Tells apt that we want to install a program.
htop: The specific program we want to install.
Type this command and press Enter:
sudo apt install htop
You might see a message like "htop is already the newest version," which means htop is already installed. That's perfectly fine! You can still run it.
Once it's installed, run htop:
htop
Tips: In LabEx, you can open the terminal using the Xfce terminal on your desktop or the terminal icon in the menu bar. Both options generally have the same functionality.
You'll see a screen packed with information about your computer's activity.
htop shows:
Top: CPU and memory usage, as well as how long your computer has been running (uptime).
Middle: A list of all the running programs (processes).
Bottom: Options for interacting with htop.
Use the arrow keys to navigate.
Press q to exit htop when you're done. The best way to understand htop is to experiment with it! Explore its features and see what you can discover. LabEx provides a safe environment for you to learn.
Click Continue to verify your progress. You'll earn Skill Points for completing this step!
Learn By Doing
Congratulations on completing your first hands-on lab! You've just experienced the core of LabEx's learning philosophy: Learn By Doing.
At LabEx, we believe that the most effective way to learn technical skills is through practical, hands-on experience. Let's explore how LabEx's learning system works:
๐ Guided Labs vs. ๐งฉ Challenges
What you just completed is a Guided Lab - a step-by-step tutorial with clear instructions and verifications. Guided Labs are perfect for learning new concepts and skills.
Challenges (Next Lab), on the other hand, present you with a problem to solve without detailed instructions. They test your understanding and ability to apply what you've learned. For example, after mastering this lab, you might face a challenge to:
Install a different system monitoring tool
Create a simple shell script that displays system information
Configure a specific terminal setting
๐ณ The Skill Tree System
Every step you completed in this lab helped you acquire specific skills in the Linux Skill Tree. For instance:
When you ran echo "Hello LabEx", you learned about basic command execution
When you installed htop, you learned about package management with apt
These skills are now recorded in your profile, and you can track your progress in the Linux Skill Tree.
As you complete more labs and challenges, you'll gradually "light up" more skills in the tree, creating a visual representation of your growing expertise.
๐บ๏ธ Your Learning Journey
To continue learning effectively:
Do Guided Labs for core skills
Try Challenges to test yourself
Check the Skill Tree to track progress
Create projects to apply your skills
Keep practicing consistently with LabEx to master Linux!
Click Continue to complete this lab and see your updated Skill Tree!
Summary
Congratulations! You learned how to:
Open and use the terminal.
Use basic commands: echo, whoami, id.
Install software (htop) using sudo apt install.
Monitor your system's performance using htop.
This is just the beginning of your Linux journey! You've seen how powerful even simple commands can be. Ready to take your skills to the next level?
LabEx Pro unlocks a whole new world of learning, including:
Thousands more interactive labs: Covering everything from basic commands to advanced system administration.
Hands-on projects: Build real-world skills and confidence.
Expert support: Get help whenever you need it.
Skill Tree and achievements: Build a strong foundation for a career in tech.
Continue your Linux adventure with more free labs, or upgrade to LabEx Pro and become a Linux expert faster!