My Linux Devlog: From WSL to the Cloud (Days 1–5)
Source: Dev.to
TL;DR
I’m taking the Linux Upskill Challenge to move beyond just “using” Linux and start actually managing it. I want to handle my own remote servers for my full‑stack and AI projects instead of relying on magic.
Setup: WSL locally, connecting to a Google Cloud Platform (GCP) Virtual Machine.
Below is everything I learned in my first week.
Day 1 – The “Front Door”
The Problem
The public internet is fundamentally insecure. Data is transmitted in plaintext, so a hacker on the same network can sniff passwords and other sensitive information.
The Solution – SSH
Secure Shell (SSH) creates an encrypted tunnel between my local machine and the remote server. Even if someone intercepts the traffic, it looks like gibberish.
Key‑Based Authentication vs. Passwords
- Passwords – vulnerable to brute‑force attacks.
- Key pairs (asymmetric cryptography) – far more secure.
| Component | Role |
|---|---|
| Public key | Stored on the server (the “lock”). |
| Private key | Stored on my local machine (the “physical key”). |
The server sends a challenge that only the private key can solve. No private key → no entry.
# Connecting via WSL, using the -i flag to point to my private key
ssh -i ~/.ssh/id_ed25519 gcp-tyronemt@34.9.x.x
The “First 5 Minutes” Health Check
| Command | What it shows |
|---|---|
uptime | How long the system has been running + load average |
free -m | Available RAM (zero → apps crash) |
df -h | Disk usage (ensure logs haven’t filled the drive) |
htop / top | Real‑time CPU usage (Linux task manager) |
uname -a | Kernel version & system architecture |
Key Takeaway (Day 1) – SSH is non‑negotiable for remote connections; key pairs are infinitely safer than passwords, and you should always run a quick health check (free, df, etc.) right after logging in.
Day 2 – Reading the Manual & Navigating the Filesystem
How to Read the Manual Efficiently
man <command>– Full reference (e.g.,man ls).help <builtin>– For built‑in shell commands (cd,export, …). Runtype <command>to see if it’s built‑in.tldr <command>– Concise, example‑rich cheat sheet (install withsudo apt install tldr).apropos "<keyword>"– Search for commands by description.
Navigating the Tree
| Command | Description |
|---|---|
pwd | Print Working Directory – shows where you are. |
cd /var/log | Absolute path (starts from /). |
cd ~ or cd | Go to your home directory. |
cd - | Return to the previous directory. |
ls -ltra | Long format, time‑sorted, reverse, include hidden files. |
File Manipulation
mkdir <folder> # Create a folder
touch <file> # Create an empty file
rm -r <folder> # Delete a folder and everything inside it
# Safer interactive delete:
rm -ri <folder>
Key Takeaway (Day 2) – Knowing how to read the manual saves you from guessing, and understanding that everything branches out from the root (/) makes navigation far easier.
Day 3 – Privilege Management
Who Has the Power?
| Role | Description |
|---|---|
| root | Superuser with total power – a single typo can destroy the server. Never log in directly as root. |
| sudoers | Regular users granted super‑privileges via sudo. |
| regular users | Limited to their own home directory (~). Cannot make global changes (e.g., install packages). |
What Is sudo?
- Not root itself – it acts as an audit layer to prevent mistakes.
- Example:
cat /etc/shadow→ Permission denied;sudo cat /etc/shadowworks.
Useful sudo Commands
# Become root temporarily (full root shell)
sudo -i
# See who logged in
last
# See failed login attempts (e.g., bots)
sudo lastb
Global Administrative Tasks
- Hostname
hostnamectl # Show current hostname sudo hostnamectl set-hostname <new-name> # On cloud providers, ensure persistence: # Edit /etc/cloud/cloud.cfg → preserve_hostname: true - Timezone
timedatectl # Show current timezone sudo timedatectl set-timezone <Region/City> # Correct timezone = correct timestamps in logs.
Key Takeaway (Day 3) – sudo is a safety net. Never log in as root directly, and always set the correct timezone so logs are meaningful when debugging.
Day 4 – Package Management & Filesystem Hierarchy
APT (Advanced Package Tool)
- Sources list –
/etc/apt/sources.list.d/ubuntu.sources - Search –
apt search "<keyword>" - Install –
sudo apt install <package>(requiressudobecause installations affect the whole system).
Filesystem Hierarchy (see man hier)
/
├─ /root – root user’s home folder
├─ /home – standard users’ home folders
├─ /sbin – system binaries (admin commands, root‑only)
├─ /etc – global configuration files
└─ /var
└─ /log – system & security logs
Key Config & Log Files (all plain text!)
| Path | Purpose |
|---|---|
/etc/passwd | User account information |
/etc/ssh/sshd_config | SSH daemon configuration |
/var/log/auth.log | Records all sudo usage & logins |
I also installed Midnight Commander (sudo apt install mc), a visual, text‑based file manager. Launch with mc; use F3 to view files and F10 to exit.
Key Takeaway (Day 4) – Linux is essentially a collection of text files. To change settings, edit files under /etc. To troubleshoot, inspect logs under /var/log.
Day 5 – (Coming Soon)
Stay tuned for the next entry where I’ll dive into networking, firewalls, and automating deployments with Ansible.
Managing text files directly in the terminal is a mandatory skill
Viewing & Editing
lessvsmore– Uselessto read large files. It lets you scroll up and down and search for text, whereasmoreis much more limited.- Dotfiles – Hidden files starting with a dot (e.g.,
.bashrc). They hold user configurations. Usels -ato see them. nano– A simple, built‑in terminal text editor.
Working Faster in the CLI
- Tab Completion – Hit Tab to auto‑complete a file or folder name. Hit it twice if there are multiple matches.
- Command History (
history) – Shows everything you’ve typed. - Execution by Number – Type
 to instantly rerun that exact command from your history. - Reverse Search (
Ctrl+R) – Start typing a past command, and the shell will auto‑suggest the rest. Huge time saver.
Advanced Workspaces
- Bash shell – The default interactive shell for many systems.
- Custom Prompts – Edit your
PS1variable to change how your prompt looks. - Alternative Shells –
zshorfishoffer better auto‑suggestions and richer completions. - Multiplexers (
tmux/screen) – Split one terminal window into multiple panes, and keep scripts running in the background even if your SSH connection drops.
Key Takeaway (Day 5)
Stop typing everything out manually. Master Tab completion, useCtrl+Rto find old commands, and always uselessto read log files.