Introduction
Congratulations! You've just been hired as a Junior System Administrator at LabEx Corporation, a rapidly growing tech startup. It's your first day, and your supervisor has assigned you to work on the company's most ambitious project yet: "Project Phoenix" - a revolutionary application that will transform how businesses manage their digital workflows.
Your first mission is to get "the lay of the land" on the development server that will host Project Phoenix. This involves performing essential reconnaissance to understand the system's identity, who is using it, and its current operational state.
In this challenge, you will use fundamental Linux commands to gather critical information about your new environment. You'll identify your user account, check system details, see who else is logged in, inspect user and group information, monitor real-time performance, and compile your findings into a comprehensive report.
This initial assessment will serve as the foundation for all future work on Project Phoenix. Your thoroughness today will ensure the project's success tomorrow.
Before starting this course, it's recommended to have basic Linux knowledge. If you're new to Linux, we suggest beginning with the Linux learning path at LabEx. This course is designed to test, consolidate, and deepen your Linux fundamentals through a series of hands-on challenges. Throughout your learning journey, feel free to discuss unfamiliar, forgotten, or unknown concepts with Labby, our AI assistant. This interactive approach simulates the problem-solving process you'll encounter in real work environments.
Important Notice: If you encounter difficulties during the challenge:
- Discuss with Labby or view the solution.
- Temporarily skip the challenge and continue with subsequent Guided Labs in the Linux learning path.
First Login and Environment Check
Your first action on a new system is to verify your own identity and the basic characteristics of the operating system. This confirms you are who you think you are and you're on the correct machine.
Tasks
- Find out the username of the current user.
- Display the kernel name of the operating system.
Requirements
- All commands must be executed in the terminal.
- Use the
whoamicommand to identify the current user. - Use the
unamecommand to show the kernel name.
Examples
After completing this step, you should see output similar to:
## Command output showing current user
labex
## Command output showing kernel name
Linux
These results confirm your identity as the labex user on a Linux system, which is essential for establishing your working environment.
Checking System Information and Uptime
After confirming your own identity, it's important to understand the complete system environment and how long it has been running. This information is crucial for system monitoring and maintenance planning.
Tasks
- Display comprehensive system information including operating system details, kernel version, and hardware architecture.
- Check how long the system has been running and current system load.
Requirements
- Use the
uname -acommand to display all system information. - Use the
uptimecommand to show system uptime and load average.
Examples
After running the required commands, you should see output similar to:
## Comprehensive system information
Linux labex-virtual-machine 5.15.0-76-generic #83-Ubuntu SMP Thu Jun 15 19:16:32 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
## System uptime and load information
14:51:52 up 183 days, 2:55, 0 users, load average: 6.02, 1.80, 0.94
The first output shows detailed system information including kernel version, hostname, and architecture. The second output indicates the system has been running for 183 days with current load averages showing system performance over different time periods.
Hints
- The
uname -acommand displays all available system information in one line. - The
uptimecommand shows how long the system has been running, number of users, and system load averages. - System load averages represent the average system load over 1, 5, and 15 minute periods.
Gathering User and Group Details
Understanding your user's permissions is fundamental. You need to know your user ID (UID), primary group ID (GID), and any other groups you belong to, as these determine your access rights on the system.
Tasks
- Display the detailed user and group information for your current user account.
Requirements
- Use the
idcommand to retrieve your user and group identifiers.
Examples
When you run the required command, you should see output similar to:
uid=5000(labex) gid=5000(labex) groups=5000(labex),27(sudo),121(ssl-cert),5002(public)
This output shows:
- uid=5000(labex): Your user ID is 5000 with username "labex"
- gid=5000(labex): Your primary group ID is 5000 with group name "labex"
- groups=...: You belong to multiple groups including "sudo" (administrative privileges), "ssl-cert" (SSL certificate access), and "public" (shared resources)
Understanding these permissions is crucial for knowing what system resources you can access and modify.
Hints
- The
idcommand, when run without any arguments, defaults to showing information for the current user. - The output will clearly label the UID, GID, and supplementary groups.
Monitoring Real-time System Performance
A key part of system reconnaissance is observing its current performance. This includes checking CPU and memory usage, and seeing which processes are running. The top command is the standard tool for this task.
Tasks
- Launch the interactive system monitoring tool to view active processes and resource usage.
- Exit the tool after observing the output for a few moments.
Requirements
- Use the
topcommand to start the monitoring interface. - After
topis running, press theqkey to exit and return to the command prompt.
Examples
When you launch the system monitoring tool, you'll see a dynamic display similar to:
top - 10:45:00 up 1:15, 1 user, load average: 0.00, 0.01, 0.05
Tasks: 123 total, 1 running, 122 sleeping, 0 stopped, 0 zombie
%Cpu(s): 0.1 us, 0.1 sy, 0.0 ni, 99.8 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
MiB Mem : 1987.2 total, 890.5 free, 540.1 used, 556.6 buff/cache
MiB Swap: 2048.0 total, 2048.0 free, 0.0 used. 1234.5 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1 root 20 0 169404 12920 8584 S 0.0 0.6 0:01.50 systemd
2 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kthreadd
...
This display shows:
- System summary: Current time, uptime, users, and load averages
- Task summary: Total processes and their states (running, sleeping, etc.)
- CPU usage: Breakdown of CPU utilization by category
- Memory usage: Total, free, used, and available memory
- Process list: Running processes sorted by CPU usage with PID, user, and resource consumption
The display updates automatically every few seconds, providing real-time system monitoring.
Hints
topprovides a dynamic, real-time view of a running system. It refreshes automatically.- The
qkey is the standard way to quit thetopprogram.
Generating a System Status Report
Finally, you will consolidate your findings into a simple text file. This is a common practice for logging the state of a system at a specific point in time. You will use output redirection to save the output of several commands to a single file.
Tasks
- Create a file named
system_report.txtin your current directory (~/project). - The file must contain the output of the
whoami,uname -a(all system information), anduptimecommands.
Requirements
- The final report file must be named
system_report.txt. - You must use output redirection operators (
>and>>) to write the command outputs into the file. - The file must be created in the
~/projectdirectory.
Examples
After completing this step, your system_report.txt file should contain output similar to:
labex
Linux labex-virtual-machine 5.15.0-76-generic #83-Ubuntu SMP Thu Jun 15 19:16:32 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
10:50:01 up 1:20, 1 user, load average: 0.00, 0.01, 0.05
This report file demonstrates:
- Line 1: Current user identity (from
whoamicommand) - Line 2: Complete system information including kernel version, hostname, and architecture (from
uname -acommand) - Line 3: System uptime and current load averages (from
uptimecommand)
The file serves as a snapshot of the system's current state, which is valuable for documentation and troubleshooting purposes. You can verify the file contents using the cat command after creation.
Hints
- Use the
>operator to redirect the output of the first command. This will create the file (or overwrite it if it already exists). - Use the
>>operator to append the output of the subsequent commands to the file without deleting its existing content. - The
uptimecommand shows how long the system has been running.
Summary
Excellent work! You have successfully completed your first day at LabEx Corporation and established the groundwork for Project Phoenix.
In this challenge, you practiced using several essential commands that every system administrator must master:
whoami: To confirm your user identity on the Project Phoenix server.uname: To check operating system information and ensure compatibility.who: To see who else is working on the development server.id: To inspect your user and group memberships for proper access control.top: To monitor system processes and resource usage to ensure optimal performance.- Output Redirection (
>and>>): To document your findings in professional reports.
These commands form the foundation of your system administrator toolkit. Your thorough assessment today has prepared the Project Phoenix environment for the exciting development work ahead. Tomorrow, you'll begin organizing the project's file structure as the Digital Architect!



