Task 1: Installing Ubuntu
For this project, the goal was to “Build a Personal Linux Lab.” While the instruction suggested a traditional or Cloud VM, I opted for WSL (Windows Subsystem for Linux). However, I immediately ran into a fascinating environment quirk that taught me a very key lesson in Linux distributions.
The Setup: Encountering the “Docker Trap”
Initially, when I launched my terminal, I noticed something odd. My prompt was BENNANDO:~# (indicating I was logged in as root), and basic commands like sudo were missing.
To investigate, I ran:
|
|
The Output:
PRETTY_NAME="Docker Desktop"
The Lesson: I wasn’t in a full Ubuntu OS; I was inside Docker Desktop’s internal utility backend! This is a common pitfall when Docker is installed on Windows. To fix this, I had to pivot to a dedicated instance.
How I Resolved It:
- Opened Windows PowerShell. (You can also use Windows Command Prompt for this)
- Ran
wsl -l -vto list all installed distros. Unfortunately, I had none installed. - Installed a dedicated Ubuntu instance:
wsl --install -d Ubuntu. - Launched the correct environment:
wsl -d Ubuntu.
Task 2: Navigating the Linux File System
Once inside the correct Ubuntu environment, I practiced moving through the filesystem without a GUI.
|
|
Task 3: File Operations & Text Editing
Linux revolves around the concept that “everything is a file.” I practiced creating metadata and editing content via the CLI.
|
|
Inside the editor: I typed “Project 1: Linux environment successfully configured on dedicated Ubuntu WSL." and saved using Ctrl+O followed by Ctrl+X.
Task 4: User Management & Security
Operating as the root user is dangerous. I practiced creating a restricted user and granting them sudo privileges for specific administrative tasks.
|
|
Security Tip: Using
usermod -aG sudoadds the user to the “SuperUser Do” group, allowing them to run admin commands only when explicitly requested.
Task 5: SSH Configuration (Remote Access)
SSH (Secure Shell) is the industry standard for managing remote servers. I configured my lab to accept local SSH connections to simulate remote management.
|
|
Result: Successful login! This confirms the machine is ready to be managed “headless” (without a direct monitor/GUI).
Key Commands Mastered This Week
| Command | Purpose |
|---|---|
cat /etc/os-release |
Identify the Linux distribution and version. |
wsl -l -v |
List all WSL distros installed on the Windows host. |
pwd |
Print Working Directory (The “You Are Here” marker). |
ls -la |
List all files, including hidden system files. |
sudo |
Execute a command with administrative privileges. |
ssh |
Securely access a remote terminal. |
Final Thoughts
This week taught me that the “environment” matters just as much as the “commands.” Distinguishing between a Docker backend and a full Linux OS was a vital first step in my journey toward Linux system administration.