After seven years as a dedicated Ubuntu user, I switched back to Windows last week. Windows 11, to be precise. This is my story of the seven-year itch that made me turn to the dark side.
It started when I purchased a laptop. It also came with a licensed copy of Windows 11. The fact that I needed software that works only on Windows, with the Linux-based replacements not being up to par, is another story.
If you’re wondering why I experimented with Linux distros without the essential nerd skills, I’d say that is a legitimate question. Seven years ago, I needed to do some development work that required Docker, which, as you know, works seamlessly on Ubuntu. That, plus the need to send PGP-encrypted emails regularly, kept me on the open-source side of the world.
Navigating Windows’ screens, I had an epiphany. It struck me that in seven years of using Ubuntu, I never did anything truly “open-sourcey.” For example, I didn’t tweak the kernel or contribute a single line of code to their Git repositories. My only contribution was raising a bug, which I later closed, unsure if it was a bug, a feature, or just my old eyes playing tricks. All I did was, when in trouble, search online, zero in on a command, copy-paste it, and move on.
What struck me on my return to Windows was the sleek UI and charming fonts. Every piece of software I downloaded worked, and installation was just a matter of clicking a button. My one concern was whether my humble development work and the PGP emails would still work. Docker, Inc Desktop and Kleopatra (the software not the lady) helped resolve these issues.
This didn’t mean I had said goodbye to Linux altogether. Hidden in the shadows of WSL2 it helps me run Docker. I still have traces of my open-source infection. I find Thunderbird a better option compared to Outlook. Audacity is my first choice for an audio editor.
On the privacy front, I got a stark reminder of the world I was back in. Clicking “Solitaire and Casual Games” on the Start menu, I was greeted by a screen that asked if I wanted to resume the FreeCell game I last played on April 13, 2017!
That made me wonder what other dark secrets from my shady past lurked in Windows closed-source corridors. Inexplicably, my local ISP seems to block Microsoft-related sites! Privacy ISP style!
My take on this shift in OS is simple: use tools that suit your use case. Don’t overestimate your techy abilities or underestimate the time you have to complete tasks. Use a combination of tools that suits you and be more productive. Also, just because you have access to a plethora of tools and games do not lower your guard. Be careful what bits and pieces of information you share with the world. Your online safety is your responsibility and should be your first priority. Be safe and enjoy the ride on the technology express.
docker
How to Install and Use Docker on Windows 11
This comprehensive guide walks you through installing Docker Desktop on Windows 11, setting up WSL 2, and managing your projects effectively.
Prerequisites
- Windows 11 64-bit (Home or Pro edition)
- Administrator access to your computer
- Virtualization enabled in BIOS (we’ll verify this)
Step 1: Verify Virtualization is Enabled
Before installing Docker, check if virtualization is enabled on your system.
Quick Method – Task Manager
- Right-click on the taskbar and select Task Manager (or press
Ctrl + Shift + Esc) - Click on the Performance tab
- Click on CPU in the left panel
- Look at the bottom right for “Virtualization: Enabled”
If it shows “Disabled”, you’ll need to enable it in BIOS:
- Restart your computer
- Enter BIOS (usually by pressing
F2,F10,Del, orEscduring startup) - Find virtualization settings under Advanced, CPU Configuration, or Security:
- Intel processors: Look for “Intel VT-x” or “Intel Virtualization Technology”
- AMD processors: Look for “AMD-V” or “SVM Mode”
- Enable it and save changes
- Restart your computer
Step 2: Install WSL 2 and Ubuntu
Docker Desktop on Windows requires WSL 2 (Windows Subsystem for Linux).
Install WSL and Ubuntu
- Open PowerShell as Administrator:
- Right-click Start menu ? Terminal (Admin) or Windows PowerShell (Admin)
- Run the installation command:
wsl --installThis installs WSL 2 and Ubuntu by default. - Restart your computer when prompted
- After restart, Ubuntu will automatically open:
- Create a username (can be different from your Windows username)
- Create a password (characters won’t appear as you type – this is normal)
- Remember this password – you’ll need it for admin tasks
Verify WSL Installation
Open PowerShell and run:
wsl --list --verbose
You should see Ubuntu listed with VERSION 2.
Step 3: Install Docker Desktop
Download and Install
- Go to https://www.docker.com/products/docker-desktop
- Download Docker Desktop for Windows
- Run the installer
- When prompted, choose “Use WSL 2 instead of Hyper-V” (recommended)
- Complete the installation
- Restart your computer
Start Docker Desktop
- Launch Docker Desktop from the Start menu
- Wait for it to start (you’ll see a whale icon in the system tray)
- Accept the terms and conditions if prompted
Verify Docker Installation
Open PowerShell or Command Prompt and run:
docker --version
docker run hello-world
If you see a “Hello from Docker!” message, Docker is working correctly!
Step 4: Configure Docker with WSL
Enable WSL Integration
- Open Docker Desktop
- Click the gear icon (Settings)
- Go to Resources ? WSL Integration
- Enable “Enable integration with my default WSL distro”
- Toggle on your Ubuntu distribution
- Click Apply & Restart
Now Docker will work from both Windows and Ubuntu terminals!
Step 5: Choose Where to Store Your Projects
You have two options for project location:
Option A: Keep Projects in Windows (Recommended for Cursor AI Users)
Location: C:\Users\YourUsername\Projects\your-project
Pros:
- Easy access with Windows tools and IDEs like Cursor AI
- Familiar file structure
- Simple drag-and-drop
Access from Docker:
cd C:\Users\YourUsername\Projects\your-project
docker run --rm -v ${PWD}:/app your-image
Option B: Store Projects in WSL Ubuntu
Location: /home/yourusername/projects/your-project (inside Ubuntu)
Pros:
- Faster Docker performance
- Native Linux development environment
Access from Windows:
- In File Explorer, type:
\\wsl$\Ubuntu\home\yourusername\projects - Bookmark this location for easy access
- Cursor AI can open projects from this path
Access from Ubuntu Terminal:
cd ~/projects/your-project
docker run --rm -v $(pwd):/app your-image
Working with Git in WSL
If your project is stored in WSL, follow these best practices:
Initial Setup
When you first access a Git repository in WSL from Windows PowerShell, you might see:
fatal: detected dubious ownership in repository
Solution: Always run Git commands from the Ubuntu terminal, not PowerShell.
Set Up SSH for Git
If you’re using SSH for Git (like GitLab or GitHub):
- Open Ubuntu terminal
- Generate SSH key:
ssh-keygen -t ed25519 -C "your_email@example.com"Press Enter to accept defaults - Copy your public key:
cat ~/.ssh/id_ed25519.pub - Add the key to your Git hosting service:
- GitHub: Settings ? SSH and GPG keys ? New SSH key
- GitLab: User Settings ? SSH Keys
- Paste your public key and save
- Test the connection:
# For GitHub ssh -T git@github.com # For GitLab ssh -T git@gitlab.com
Use SSH Agent (If Your Key Has a Passphrase)
To avoid entering your passphrase repeatedly:
# Start SSH agent
eval "$(ssh-agent -s)"
# Add your key
ssh-add ~/.ssh/id_ed25519
Enter your passphrase once – it will be cached for the session.
Make SSH Agent Start Automatically
Edit your bash profile:
nano ~/.bashrc
Add these lines at the end:
# Start SSH agent and add key
if [ -z "$SSH_AUTH_SOCK" ] ; then
eval "$(ssh-agent -s)" > /dev/null
ssh-add ~/.ssh/id_rsa 2>/dev/null
fi
Save (Ctrl+X, Y, Enter), then reload:
source ~/.bashrc
Fixing Git Line Ending Issues
If Git shows all files as modified after cloning, it’s likely a line ending issue (Windows uses CRLF, Linux uses LF).
Fix in Ubuntu Terminal
cd ~/your-project
# Configure Git to use Linux line endings
git config core.autocrlf input
git config core.filemode false
# Reset all files with correct line endings
git rm --cached -r .
git reset --hard HEAD
# Verify
git status
Prevent Future Issues
Create a .gitattributes file in your project root:
cat > .gitattributes << 'EOF'
* text=auto eol=lf
*.sh text eol=lf
EOF
git add .gitattributes
git commit -m "Add gitattributes to enforce LF line endings"
Recommended Workflow
For the best experience when using Cursor AI with WSL:
- Store projects in Windows (
C:\Users\YourUsername\Projects\) - Edit code in Cursor AI (Windows application)
- Run Docker commands from either PowerShell or Ubuntu terminal
- Run Git commands from Ubuntu terminal
- Keep both Cursor AI and Ubuntu terminal open side-by-side
This workflow gives you the best of both worlds: easy editing with Windows tools and proper Linux environment for Docker and Git.
Common Docker Commands
Running Containers
# Run a container
docker run image-name
# Run with port mapping
docker run -p 4000:4000 image-name
# Run with volume mounting
docker run -v ${PWD}:/app image-name
# Run in detached mode
docker run -d image-name
Managing Containers
# List running containers
docker ps
# List all containers
docker ps -a
# Stop a container
docker stop container-id
# Remove a container
docker rm container-id
Managing Images
# List images
docker images
# Remove an image
docker rmi image-name
# Build an image
docker build -t my-image .
Docker Compose
# Start services
docker-compose up
# Start in detached mode
docker-compose up -d
# Stop services
docker-compose down
# View logs
docker-compose logs
Troubleshooting
Docker Desktop Won’t Start
- Ensure virtualization is enabled in BIOS
- Check that WSL 2 is properly installed:
wsl --list --verbose - Restart Docker Desktop
- Restart your computer
“Cannot connect to Docker daemon”
- Make sure Docker Desktop is running (check system tray)
- In Docker Desktop settings, verify WSL integration is enabled
Slow Performance
- Store projects in WSL filesystem instead of Windows for better performance
- Allocate more resources to Docker in Settings ? Resources
Git Shows All Files Modified
- Follow the line ending fix in the “Fixing Git Line Ending Issues” section above
Conclusion
You now have a fully functional Docker development environment on Windows 11! This setup allows you to:
- Run Docker containers efficiently using WSL 2
- Use your favorite Windows tools like Cursor AI for development
- Leverage Linux commands and tools through Ubuntu
- Manage Git repositories properly with SSH authentication
Happy coding!