Web Dev Setup (WSL/Windows Terminal/tmux)
Section titled “Web Dev Setup (WSL/Windows Terminal/tmux)”1. Windows Terminal – Role & Configuration
Section titled “1. Windows Terminal – Role & Configuration”Key realization: Windows Terminal should be boring.
Its job is only to:
-
Launch shells (Ubuntu, PowerShell, CMD)
-
Provide a UI window
It should not:
-
Orchestrate projects
-
Restore complex sessions
-
Launch multiple tabs automatically
Final approach
Section titled “Final approach”-
Single Ubuntu profile
-
No
startupActions -
No project-specific WSL profiles
-
No session restore dependency
Windows Terminal is the door, not the workspace.
2. Linux Text Editor: nano
Section titled “2. Linux Text Editor: nano”nano filename
3. tmux – The Real Workspace
Section titled “3. tmux – The Real Workspace”tmux replaces Windows Terminal tabs: Stable, Scriptable, Survives terminal crashes, Independent of Windows UI state
Instead of multiple Terminal tabs:
- One Ubuntu tab
- Multiple tmux virtual windows inside it
4. Workspace Bootstrap Script
Section titled “4. Workspace Bootstrap Script”~/.tmux/work.shPurpose
Section titled “Purpose”- Single source of truth for my daily workspace
- Idempotent (safe to run multiple times)
- Creates or re-attaches to the same tmux session
Responsibilities
Section titled “Responsibilities”-
Create tmux session (
work) -
Create named tmux windows
-
cdinto correct project directories -
Launch
claudein the appropriate window
This replaces all Windows Terminal startup automation.
5. Safe Auto‑Startup Hook
Section titled “5. Safe Auto‑Startup Hook”~/.bashrcPattern used
Section titled “Pattern used”-
Auto-start tmux only when:
-
Shell is interactive
-
tmux is installed
-
Not already inside tmux
-
This ensures:
-
No recursion
-
No script breakage
-
No surprises in non-interactive shells
Result:
Open Terminal → Ubuntu → tmux workspace appears
6. CRLF (Carriage Return / Line Feed) Problems
Section titled “6. CRLF (Carriage Return / Line Feed) Problems”What causes CRLF issues
Section titled “What causes CRLF issues”-
❌ Editing Linux files from Windows editors
-
❌ Git auto-converting line endings
-
❌ Copy/paste through clipboard tools
What does not cause CRLF issues
Section titled “What does not cause CRLF issues”-
Symlinks
-
Windows backups
-
Git (when configured correctly)
-
Reading Linux files from Windows
7. Ground Truth Summary
Section titled “7. Ground Truth Summary”✔ Keep tmux scripts in Linux (~/.tmux)
✔ Symlink from Windows to Linux, not the other way around
✔ Windows sees files and backs them up
✔ Linux owns execution
✔ No CRLF issues if Windows never edits
✔ Git configuration locks line endings
8. Mental Model (Important)
Section titled “8. Mental Model (Important)”Windows Terminal → DoorWSL → Housetmux → Office-
Reduce complexity at higher layers
-
Push orchestration downward
-
Keep Windows UI state simple
This architecture trades cleverness for reliability.
9. Why This Works
Section titled “9. Why This Works”This setup succeeds because:
-
Each layer has a single responsibility
-
Automation lives in Linux, not Windows UI
-
Execution, configuration, and backup concerns are separated
Calm systems are predictable systems.
Last updated: 2026‑01‑16