Development Setup
Setting up development environments, IDEs, build tools, and path management on Windows for Linux developers.
Development Environment Philosophy
Windows vs Linux Development Approaches
| Aspect | Linux Approach | Windows Approach | Recommendation |
|---|---|---|---|
| Package management | Native package managers | Multiple solutions | Use WSL + native tools |
| Path structure | /usr/bin, /usr/local | Program Files, user paths | Learn both systems |
| Dependencies | System-wide packages | Per-project or global | Use virtual environments |
| Build tools | Make, autotools | MSBuild, Visual Studio | Use cross-platform tools |
| Environment isolation | chroot, containers | VMs, containers | Use WSL + Docker |
Setting Up WSL for Development
WSL Installation and Configuration
# Install WSL 2 with Ubuntu
wsl --install -d Ubuntu
# Update WSL
wsl --update
# Set WSL 2 as default
wsl --set-default-version 2
WSL Development Setup
# Update package lists
sudo apt update && sudo apt upgrade
# Install essential development tools
sudo apt install build-essential git curl wget
# Install additional tools
sudo apt install vim tmux htop tree jq
# Install programming languages
sudo apt install python3 python3-pip nodejs npm
WSL File System Best Practices
# Development work in WSL filesystem (better performance)
mkdir -p ~/dev/projects
# Access Windows files when needed
ls /mnt/c/Users/username/Documents
# Share SSH keys between Windows and WSL
ln -s /mnt/c/Users/username/.ssh ~/.ssh
IDE and Editor Setup
Visual Studio Code
Installation:
# Install via winget
winget install Microsoft.VisualStudioCode
# Or via chocolatey
choco install vscode
Essential Extensions for Linux Developers:
| Extension | Purpose | Linux Equivalent |
|---|---|---|
| Remote - WSL | WSL integration | Native development |
| Remote - SSH | Remote development | SSH + vim/emacs |
| Docker | Container support | docker CLI |
| GitLens | Git integration | git CLI + gitk |
| Terminal | Integrated terminal | Native terminal |
WSL Integration:
# Install VS Code in WSL (installs Windows version with WSL support)
code .
# Open WSL project from Windows
code --remote wsl+Ubuntu ~/dev/project
JetBrains IDEs
| IDE | Purpose | Linux Availability | Notes |
|---|---|---|---|
| IntelliJ IDEA | Java development | Yes | Full cross-platform |
| PyCharm | Python development | Yes | Professional/Community |
| WebStorm | Web development | Yes | JavaScript/TypeScript |
| CLion | C/C++ development | Yes | Cross-platform C++ |
| Rider | .NET development | Yes | Cross-platform .NET |
Installation:
# Via JetBrains Toolbox
winget install JetBrains.Toolbox
# Individual IDEs
winget install JetBrains.IntelliJIDEA.Community
Vim/Neovim on Windows
# Install Neovim
winget install Neovim.Neovim
# Or install in WSL
sudo apt install neovim
# Vim for Windows
winget install vim.vim
Text Editors
| Editor | Windows | Linux | Cross-platform |
|---|---|---|---|
| Notepad++ | Native | Wine only | No |
| Sublime Text | Yes | Yes | Yes |
| Atom | Yes | Yes | Yes (discontinued) |
| VS Code | Yes | Yes | Yes |
Programming Language Setup
Python Development
Windows Native Python:
# Install Python from Microsoft Store (recommended)
# Or via winget
winget install Python.Python.3.11
# Install pip packages
pip install virtualenv poetry black flake8
Python in WSL:
# Ubuntu comes with Python 3
python3 --version
# Install pip and development tools
sudo apt install python3-pip python3-venv python3-dev
# Create virtual environment
python3 -m venv myproject
source myproject/bin/activate
Python Environment Comparison:
| Aspect | Windows Python | WSL Python | Recommendation |
|---|---|---|---|
| Performance | Good | Better | Use WSL for CPU-intensive |
| Package compatibility | Some issues | Excellent | Use WSL for Linux packages |
| GUI applications | Native | X11 forwarding | Use Windows for GUI |
| System integration | Better | Limited | Depends on use case |
Node.js Development
Windows Installation:
# Install Node.js
winget install OpenJS.NodeJS
# Or install LTS version
winget install OpenJS.NodeJS.LTS
# Install global packages
npm install -g yarn pnpm typescript
WSL Installation:
# Install via NodeSource repository
curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
sudo apt-get install -y nodejs
# Or use Node Version Manager (nvm)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
nvm install --lts
Java Development
Windows Installation:
# Install OpenJDK
winget install Microsoft.OpenJDK.11
# Or Oracle JDK
winget install Oracle.JDK.18
# Install Maven
winget install Apache.Maven
# Install Gradle
winget install Gradle.Gradle
WSL Installation:
# Install OpenJDK
sudo apt install openjdk-11-jdk
# Install Maven
sudo apt install maven
# Install Gradle
sudo apt install gradle
Go Development
Windows Installation:
# Install Go
winget install GoLang.Go
# Set GOPATH (optional, Go modules are preferred)
setx GOPATH "%USERPROFILE%\go"
WSL Installation:
# Install Go
sudo apt install golang-go
# Or install latest version manually
wget https://golang.org/dl/go1.20.linux-amd64.tar.gz
sudo tar -xf go1.20.linux-amd64.tar.gz -C /usr/local
export PATH=$PATH:/usr/local/go/bin
Rust Development
Cross-platform Installation:
# Install Rust (same on Windows and Linux)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Or via winget (Windows)
winget install Rustlang.Rustup
Build Tools and Automation
Make on Windows
# Install Make via chocolatey
choco install make
# Or install via winget (GNU Make)
winget install GnuWin32.Make
# Alternative: Use WSL for Make
wsl make
CMake
# Install CMake
winget install Kitware.CMake
# Use from command line
cmake --version
Docker Development
Docker Desktop Installation:
# Install Docker Desktop
winget install Docker.DockerDesktop
Configuration for WSL 2:
- Enable WSL 2 integration in Docker Desktop settings
- Enable integration with specific WSL distros
- Use Docker from both Windows and WSL
Usage Patterns:
| Pattern | Command Location | Files Location | Best For |
|---|---|---|---|
| Windows development | Windows | Windows | .NET, Windows-specific |
| WSL development | WSL | WSL | Linux-focused development |
| Hybrid | Both | WSL | Cross-platform projects |
Git Setup
Windows Git:
# Install Git for Windows
winget install Git.Git
# Configure Git
git config --global user.name "Your Name"
git config --global user.email "your.email@example.com"
# Use Windows Credential Manager
git config --global credential.helper manager-core
WSL Git:
# Git is usually pre-installed in WSL
git --version
# Configure Git
git config --global user.name "Your Name"
git config --global user.email "your.email@example.com"
# Share credentials with Windows Git
git config --global credential.helper "/mnt/c/Program\ Files/Git/mingw64/libexec/git-core/git-credential-manager-core.exe"
Path Management
Understanding Windows PATH
# View current PATH
$env:PATH -split ';'
# Add to PATH temporarily
$env:PATH += ";C:\new\path"
# Add to PATH permanently (requires restart)
[Environment]::SetEnvironmentVariable("PATH", $env:PATH + ";C:\new\path", "User")
Environment Variables
| Variable | Windows | Linux | Purpose |
|---|---|---|---|
| PATH | %PATH% | $PATH | Executable search paths |
| HOME | %USERPROFILE% | $HOME | User home directory |
| TEMP | %TEMP% | /tmp | Temporary files |
Managing Multiple Versions
Node.js Version Management:
# Windows: nvm-windows
winget install CoreyButler.NVMforWindows
# Usage
nvm install 18.0.0
nvm use 18.0.0
Python Version Management:
# Windows: pyenv-win
git clone https://github.com/pyenv-win/pyenv-win.git %USERPROFILE%\.pyenv
# Add to PATH
[Environment]::SetEnvironmentVariable("PATH", $env:PATH + ";%USERPROFILE%\.pyenv\pyenv-win\bin;%USERPROFILE%\.pyenv\pyenv-win\shims", "User")
Package Managers Comparison
System Package Managers
| Feature | Chocolatey | winget | Scoop | Linux (apt) |
|---|---|---|---|---|
| Official | No | Yes | No | Yes |
| Package count | Large | Growing | Medium | Huge |
| CLI focus | Mixed | Mixed | Yes | Mixed |
| Admin required | Sometimes | Sometimes | No | Yes (sudo) |
| Configuration | XML | YAML | JSON | Text files |
Language-Specific Package Managers
| Language | Windows | Linux | Cross-platform |
|---|---|---|---|
| Python | pip | pip | pip |
| Node.js | npm, yarn, pnpm | npm, yarn, pnpm | npm, yarn, pnpm |
| Java | Maven, Gradle | Maven, Gradle | Maven, Gradle |
| Rust | cargo | cargo | cargo |
| Go | go modules | go modules | go modules |
| Ruby | gem | gem | gem |
Database Development
Database Servers
| Database | Windows Installation | Linux Installation | Docker Option |
|---|---|---|---|
| PostgreSQL | winget install PostgreSQL.PostgreSQL | sudo apt install postgresql | docker run postgres |
| MySQL | winget install Oracle.MySQL | sudo apt install mysql-server | docker run mysql |
| MongoDB | winget install MongoDB.Server | Manual installation | docker run mongo |
| Redis | winget install Redis.Redis | sudo apt install redis-server | docker run redis |
| SQLite | Built into many languages | Built into many languages | Not needed |
Database Tools
| Tool | Purpose | Windows | Linux |
|---|---|---|---|
| DBeaver | Universal DB client | Yes | Yes |
| pgAdmin | PostgreSQL admin | Yes | Yes |
| MySQL Workbench | MySQL admin | Yes | Yes |
| MongoDB Compass | MongoDB GUI | Yes | Yes |
Container and Virtualization
Docker Setup Best Practices
# docker-compose.yml for development
version: '3.8'
services:
app:
build: .
volumes:
- .:/app
- /app/node_modules # Performance optimization on Windows
ports:
- '3000:3000'
environment:
- NODE_ENV=development
WSL 2 Performance Optimization
# .wslconfig in Windows user directory
[wsl2]
memory=8GB
processors=4
localhostForwarding=true
Development Container Patterns
| Pattern | Use Case | Pros | Cons |
|---|---|---|---|
| Bind mounts | Live development | Real-time changes | Windows performance |
| Named volumes | Database storage | Performance | Not directly accessible |
| Dev containers | Consistent environment | Reproducible | Initial setup |
Testing and CI/CD
Testing Frameworks
| Language | Framework | Windows | Linux | WSL |
|---|---|---|---|---|
| JavaScript | Jest, Mocha | Yes | Yes | Yes |
| Python | pytest, unittest | Yes | Yes | Yes |
| Java | JUnit, TestNG | Yes | Yes | Yes |
| C# | NUnit, xUnit | Yes | Limited | Yes |
| Go | built-in testing | Yes | Yes | Yes |
CI/CD Tools
| Tool | Windows Agent | Linux Agent | Self-hosted |
|---|---|---|---|
| GitHub Actions | Yes | Yes | Yes |
| Azure DevOps | Yes | Yes | Yes |
| Jenkins | Yes | Yes | Yes |
| GitLab CI | Yes | Yes | Yes |
Local CI/CD Testing
# GitHub Actions local testing
winget install nektos.act
# Run GitHub Actions locally
act -P ubuntu-latest=node:16-buster-slim
Performance and Debugging
Profiling Tools
| Language | Windows Tools | Linux Tools | Cross-platform |
|---|---|---|---|
| Python | py-spy, cProfile | py-spy, perf | py-spy |
| Node.js | clinic.js | clinic.js, perf | clinic.js |
| Java | JProfiler, YourKit | JProfiler, async-profiler | JProfiler |
| C/C++ | Visual Studio Profiler | gprof, perf | None built-in |
Debugging Setup
VS Code Debugging:
{
"version": "0.2.0",
"configurations": [
{
"name": "Python: Current File",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal"
},
{
"name": "Node.js: Current File",
"type": "node",
"request": "launch",
"program": "${file}"
}
]
}
Security and Certificates
SSL/TLS Development
# Create self-signed certificate for development
New-SelfSignedCertificate -DnsName "localhost" -CertStoreLocation "cert:\LocalMachine\My"
# Export certificate
Export-Certificate -Cert $cert -FilePath "localhost.crt"
Development Security Tools
| Tool | Purpose | Windows | Linux |
|---|---|---|---|
| OWASP ZAP | Security testing | Yes | Yes |
| Nmap | Network scanning | Yes | Yes |
| Wireshark | Network analysis | Yes | Yes |
| Burp Suite | Web security | Yes | Yes |
Cross-Platform Development Tips
File System Considerations
- Case sensitivity: Linux is case-sensitive, Windows is not
- Path separators: Use path.join() or similar in code
- Line endings: Configure Git properly (
core.autocrlf) - File permissions: Different models between systems
Best Practices
- Use WSL for Linux-focused development
- Use Windows native tools for Windows-specific development
- Containerize applications for consistency
- Test on both platforms if targeting both
- Use cross-platform tools when possible
- Keep development environments isolated
- Document setup procedures for team consistency
Recommended Development Workflow
- Primary development: WSL for most work
- GUI applications: Windows for testing/debugging
- Version control: Git in WSL with Windows credential manager
- IDE: VS Code with WSL extension
- Containers: Docker Desktop with WSL 2 backend
- Databases: Docker containers for isolation
- Testing: Both environments when targeting both platforms