Embracing the Terminal!
Embracing the Terminal!
From Newbie Struggles to Practical Mastery (With Some Fun Along the Way)
I first dabbled with Linux in the late 90s. Back then, it wasn’t the polished, beginner-friendly operating system some of us know today. I was a late teenager, rummaging through computer magazines for free Linux distribution CDs, maybe even floppy disks, mesmerised by screenshots of what I thought was the “cool spy-like interface” of window managers like KDE or GNOME. My dreams of becoming some kind of tech wizard were often thwarted by the harsh reality: making Linux do anything required monumental effort.
Imagine installing Linux, only to realise that my modem wasn’t supported out of the box. But now I had Linux—I didn’t dual boot—so there was no easy fallback. Off I’d trudge to college (an hour-long bus trip each way) to download drivers on the lab computers, returning home with files carefully stored on floppy disks (or later, CDs, maybe even Zip Disks). If the drivers worked, it felt like a victory. If they didn’t? Back to square one the next day.
Fast forward to today, and the command line interface (CLI) has become a trusted tool in my arsenal, even if I now spend most of my time on a MacBook. Whether it’s troubleshooting, managing a server, or just playing around, the CLI often delivers what I need quickly and efficiently. So for this article, I wanted to share the commands that have served me well over the years; practical, nostalgic, and even a little silly.
Starting Simple: Navigating the File System
1. ls
- What it does: Lists files and directories in your current location.
- Why use it: Essential for seeing what’s in a directory. Add
-l
for a detailed view or-a
to include hidden files. - MacOS compatibility: Works perfectly.
Linux (and macOS) treats the CLI as home base, so knowing how to see where you are and what’s around is fundamental. It felt magical in those early days—typing commands into a terminal and seeing the results. Today, ls
is just part of muscle memory.
2. cd
- What it does: Changes the current directory.
- Why use it: To move around the file system quickly.
- MacOS compatibility: Identical functionality.
This command goes hand in hand with pwd
, which tells you what your Present Working Directory is. These were the first steps in my early Linux journey—learning where things were and how to move between them.
Digging Deeper: Files, Permissions, and Management
3. chmod
and chown
- What they do:
chmod
changes file permissions, whilechown
changes ownership. - Why use them: To control access to files and scripts.
- MacOS compatibility: Fully supported.
Permissions always tripped me up early on. Why wouldn’t my script run? Learning chmod +x script.sh
was a revelation, and chown
became essential for managing server files later in my career.
4. mkdir
and rm
- What they do: Create and remove directories.
- Why use them: Basic housekeeping tasks in the terminal.
- MacOS compatibility: Fully functional.
During my Solaris days at university, I developed a habit of structuring my projects neatly using these commands. It was the CLI equivalent of tidying up my desk.
Linux on Windows: WSL and PowerShell
While I spend most of my time on macOS, Windows Subsystem for Linux (WSL) has brought Linux to Windows users in a way I’d never have dreamed of in the 90s. WSL allows you to run Linux commands natively on Windows, meaning you can use commands like ls
, grep
, or even install a full Linux distribution, all without leaving Windows.
For those still anchored to the Windows ecosystem, PowerShell deserves a nod. It’s a powerful CLI tool that can perform many of the same tasks as Linux commands but with its own syntax. For instance:
Get-ChildItem
(the PowerShell equivalent ofls
)Set-ExecutionPolicy
(manage script permissions)
Practical Magic: Managing Systems
5. top
(and friends: htop
, nmon
, gtop
)
- What they do: Display real-time system stats like CPU usage, memory, and running processes.
- Why use them: To monitor system performance and identify resource hogs.
- MacOS compatibility:
top
works out of the box; others can be installed with Homebrew.
I remember the joy of running htop
for the first time—colours, interactive sorting, and no need to quit just to check a process!
6. nginx
and systemctl
- What they do: Manage web servers and system services, respectively.
- Why use them: To deploy and maintain web servers, often with SSL.
- MacOS compatibility: Limited—best suited to Linux.
Fun and Festive Commands
Linux isn’t all work and no play.
7. cowsay
and fortune
- What they do: Add whimsy to your day by displaying talking cows and random quotes.
- Why use them: For a chuckle.
Example:
fortune | cowsay
8. xmas
, aafire
, and asciiquarium
- What they do: Festive ASCII art like trees, fire effects, or aquariums.
- Why use them: Because the terminal deserves a holiday too.
Nearly the New Year…
Linux has come so far since my early modem-driver woes. The CLI may seem intimidating, but it’s a versatile and rewarding tool. Whether you’re using Linux, macOS, or even WSL on Windows, these commands are a great place to start.
And remember—amidst the productivity, take a moment to have fun. Because sometimes, the best part of the terminal is the silliness it allows.