Part 0: Setting Up Your Environment
Table of Contents
Get your Linux command-line environment ready for the workshop Before we dive into the workshop, let’s get your environment set up! This guide will walk you through installing everything you need, regardless of your operating system. This tutorial is written for Bash (the most common Linux shell). If you’re using Zsh (default on macOS Catalina+), don’t worry—almost everything will work identically! The main differences you might notice are in advanced customization ( WSL lets you run a full Linux environment directly on Windows. It’s the best way to learn Linux commands on a Windows machine. WSL Ubuntu can be installed via the Microsoft store as well, but installing it via powershell is recommended. Open PowerShell as Administrator (Right-click Start → Windows PowerShell (Admin)) and run: This command will: Restart your computer when prompted. After restart, search for and launch ubuntu through windows search. It will ask you to create a new user: Important: Once Ubuntu is set up, run these commands: This updates all packages to their latest versions. Let’s install You should see a beautiful display of your system information! You can open WSL in several ways: Access Windows files: Your Windows drives are mounted at Access WSL files from Windows: Type Copy/Paste: macOS comes with a Unix-based terminal, so you’re already halfway there! We’ll install Homebrew, the package manager for macOS. Open Terminal (⌘+Space, type “Terminal”) and run: Follow the on-screen instructions. After installation completes, read the “Next steps” section carefully—it will tell you the exact commands to run. For Apple Silicon Macs (M1-M4), run: For Intel Macs, run: Not sure which Mac you have? Click the Apple Menu → About This Mac. If it says ‘Chip: Apple M1/M2/M3/M4’, you have Apple Silicon. If it says ‘Processor: Intel’, you have an Intel Mac. Close and reopen Terminal for changes to take effect. You should see the Homebrew version number. You should see your Mac system info! Your shell: macOS Catalina+ uses Access your files: Your home folder is at If you’re already on Linux, you’re all set! Here are the common package managers for popular distributions: Not sure which one you have? Try: Install neofetch to test: Let’s make sure everything works! Run these commands: If all these commands work, you’re ready to go! “WSL command not found”: “This operation requires elevation”: Ubuntu doesn’t launch after restart: “Command not found” after installing: “Permission denied”: “E: Could not get lock”: “Permission denied”: Now that your environment is set up, you’re ready to start learning! Your checklist: Ready to begin? Let’s dive into the actual command-line skills! Having issues? Drop a comment below or check the WSL documentation / Homebrew documentation.Navigation
.zshrc vs .bashrc), but we’ll point those out when relevant.Windows Users: Installing WSL (Windows Subsystem for Linux)
Prerequisites
Step 1: Enable WSL
wsl --install ubuntu
Step 2: Set Up Ubuntu
sudo commandsStep 3: Update Your System
Step 4: Verify Installation
neofetch to test everything:
Accessing WSL
wsl in PowerShell or Command PromptWSL Tips
/mnt/:
\\wsl$ in File ExplorermacOS Users: Installing Homebrew
Step 1: Install Homebrew
Step 2: Verify Installation
Step 3: Test with neofetch
macOS Tips
zsh by default (which is great! We’ll customize it later)~/ or /Users/YourName/Linux Users: Package Managers
Debian/Ubuntu/Linux Mint
Fedora/RHEL/CentOS
# Or on older versions:
Arch Linux/Manjaro
openSUSE
Alpine Linux
Check Your Package Manager
# Check if apt exists
# Check if dnf exists
# Check if pacman exists
Verify Installation
# Debian/Ubuntu
# Fedora
# Arch
# Then run it:
Testing Your Environment
# Check your shell
# Check your home directory
# List files
# Create a test file
# Check for basic tools
Troubleshooting
WSL Issues
wsl in PowerShellHomebrew Issues
echo command to add Homebrew to your PATHsudo with Homebrew commandsLinux Issues
sudo for system-wide installationsWhat’s Next?
neofetch showing system infoQuick Reference
# WSL (Windows)
# macOS
# Linux (Debian/Ubuntu)