Setup Windows 11 từ A-Z cho dev 2026: từ clean install đến production-ready
Hướng dẫn chi tiết setup Windows 11 cho lập trình viên năm 2026: từ bước partition, tắt bloatware, cài WSL2 Ubuntu, Windows Terminal, VS Code, Git, Docker, đến các tweak giảm RAM và tối ưu năng suất.
- 1Setup Windows 11 cho dev 2026 — 20 bước ngắn›
- 2Bước 1-5: Clean install + phân vùng ổ đĩa›
- 3Bước 6-10: WSL2 + Ubuntu + dotfiles›
- 4Bước 11-15: Windows Terminal + VS Code + Extension pack›
- 5Bước 16-20: Docker, Bitwarden, 7-Zip, tweak RAM›
- 6Tweak nâng cao: GPU passthrough, systemd, WSL mirrored networking›
- 7Tool list checklist download›
- 8Câu hỏi thường gặp›
- 9Nguồn tham khảo›
Setup Windows 11 cho dev 2026 — 20 bước ngắn
Cài Windows 11 23H2 hoặc mới hơn, bật WSL2 + Ubuntu 24.04, dùng Windows Terminal làm shell chính, VS Code + GitHub Copilot làm editor, Docker Desktop (hoặc Rancher Desktop cho team không có license), 7-Zip + Bitwarden + Notepad++ bổ trợ. Thời gian chuẩn ~2 giờ cho toàn bộ checklist.
Bài viết này áp dụng cho Windows 11 23H2/24H2 (build ≥ 22631), được viết tháng 4/2026 khi Windows 10 đã hết support chính thức tháng 10/2025. Nếu bạn còn Windows 10, nên upgrade trước khi follow — nhiều tính năng WSL2 GPU passthrough và Terminal split-pane chỉ hoạt động ổn trên Win11.
Mục tiêu sau khi hoàn thành: một máy sạch, partition tách rõ C (system 100GB) và D (data), WSL2 Ubuntu chạy native, terminal profile đã config, VS Code extension đủ cho stack TypeScript/Python/Go, Docker Compose chạy được, và các tweak giảm RAM từ ~8GB idle xuống ~4GB.
Quảng cáo tài trợ
Bước 1-5: Clean install + phân vùng ổ đĩa
Bước 1 — Download Media Creation Tool từ microsoft.com/software-download/windows11. Tạo USB boot 8GB+. Luôn tải file ISO trực tiếp từ Microsoft, không dùng bản ghost/lậu — bản ghost thường bỏ Windows Defender và inject malware.
Bước 2 — Trong cài đặt, chọn Custom install → delete all partition hiện tại → tạo 2 partition: C (100GB NTFS cho system) và D (phần còn lại cho data, dev project, Docker image). Tách C/D để khi cần cài lại Windows không mất source code.
Bước 3 — Khi tới màn hình Microsoft Account bắt buộc, nhấn Shift + F10 → gõ oobe\BypassNRO (nhấn Enter) → máy restart và bạn có thể chọn I don't have internet để tạo local account. Mẹo này vẫn hoạt động trên 24H2.
Bước 4 — Sau khi vào desktop, Settings → Windows Update → chạy update full 2-3 vòng cho tới khi không còn pending. Đừng bỏ qua — nhiều driver chipset chỉ đến qua Windows Update.
Bước 5 — Tắt bloatware: mở PowerShell admin → Get-AppxPackage *xbox* | Remove-AppxPackage, tương tự với *bing*, *zune*, *getstarted*. Hoặc dùng script Win11Debloat từ GitHub (Raphire/Win11Debloat) an toàn hơn cho người mới.
Bước 6-10: WSL2 + Ubuntu + dotfiles
Bước 6 — PowerShell admin: wsl --install -d Ubuntu-24.04. Restart máy. Sau restart, Ubuntu tự mở lần đầu → tạo user + password. Nếu lỗi 0x8004032d, bật Virtualization trong BIOS (Intel VT-x hoặc AMD SVM).
Bước 7 — Trong WSL Ubuntu: sudo apt update && sudo apt upgrade -y, sau đó cài các build tool cơ bản: sudo apt install -y build-essential curl wget git zsh unzip.
Bước 8 — Cài Zsh + Oh My Zsh làm shell chính: sh -c "$(curl -fsSL https://install.ohmyz.sh)". Plugin phổ biến: zsh-autosuggestions, zsh-syntax-highlighting. Theme: powerlevel10k nhẹ và đẹp.
Bước 9 — Cài Node.js qua nvm (không dùng apt — apt lock Node cũ): curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash. Sau đó nvm install --lts cho Node 22 LTS. Cài pnpm: npm install -g pnpm.
Bước 10 — Cấu hình Git: git config --global user.name "Your Name", git config --global user.email [email protected]. Tạo SSH key: ssh-keygen -t ed25519 -C [email protected] → copy cat ~/.ssh/id_ed25519.pub → paste vào GitHub Settings → SSH keys.
Bước 11-15: Windows Terminal + VS Code + Extension pack
Bước 11 — Windows Terminal đã pre-install trên Win11. Settings → Default profile → chọn Ubuntu-24.04. Tick "Run as Administrator by default" nếu bạn cần, thêm profile PowerShell, cmd, Azure Cloud Shell. Font: JetBrains Mono hoặc Cascadia Code PL (có ligature).
Bước 12 — Cài VS Code từ code.visualstudio.com. Bật setting "Remote - WSL" để khi gõ code . trong WSL Ubuntu, VS Code tự mở project trên WSL filesystem (hiệu năng hơn gấp 10× so với mount /mnt/c).
Bước 13 — Extension pack must-have (install từ VS Code marketplace): - ESLint + Prettier (JS/TS) - GitHub Copilot + Copilot Chat (nếu có subscription) - GitLens (Git history overlay) - Error Lens (hiển thị lỗi inline) - Docker + Dev Containers - Python + Pylance (nếu làm Python) - Todo Tree (highlight TODO/FIXME) > [!TIP] > Export profile VS Code sang Gist để sync giữa các máy — Command Palette → "Profiles: Export".
Bước 14 — Cấu hình VS Code settings.json các key quan trọng: "editor.formatOnSave": true, "editor.defaultFormatter": "esbenp.prettier-vscode", "files.autoSave": "afterDelay", "terminal.integrated.defaultProfile.windows": "Ubuntu-24.04 (WSL)".
Bước 15 — Cài Notepad++ từ notepad-plus-plus.org cho việc mở file nhỏ/log nhanh (VS Code khởi động chậm hơn nhiều). Associate .log, .ini, .bat với Notepad++ qua Control Panel → Default Apps.
Quảng cáo tài trợ
Bước 16-20: Docker, Bitwarden, 7-Zip, tweak RAM
Bước 16 — Docker Desktop từ docker.com (free cho personal/small team < 10 người). Sau khi cài, Settings → General → tick "Use WSL 2 based engine". Thêm file ~/.wslconfig trong Windows home để giới hạn RAM Docker:
```
[wsl2]
memory=6GB
processors=4
swap=2GB
```
Hoặc dùng Rancher Desktop free thay thế nếu team > 10 người.
Bước 17 — Cài Bitwarden desktop + browser extension từ bitwarden.com. Quản lý mật khẩu tập trung, đồng bộ giữa Windows và mobile. Tạo master password mạnh (≥ 14 ký tự, bao gồm symbol).
Bước 18 — 7-Zip từ 7-zip.org làm default archive tool thay cho Windows Explorer (vốn xử lý ZIP lớn rất chậm và không hỗ trợ RAR, 7z tốt). Chuột phải file → 7-Zip → chọn thao tác.
Bước 19 — Tweak giảm RAM idle: - Settings → Personalization → Background → chọn Picture thay vì Windows Spotlight (Spotlight chạy service nền tốn 200MB) - Task Manager → Startup apps → disable tất cả trừ những app bạn cần lúc boot - Settings → Privacy & Security → tắt "Let apps run in the background" - Disable Fast Startup: Control Panel → Power Options → "Choose what the power buttons do" → untick Fast Startup (giúp shutdown sạch hơn)
Bước 20 — Cài fonts lập trình: JetBrains Mono, Fira Code, Cascadia Code PL (tất cả free từ GitHub). Setup wallpaper từ Unsplash → Settings → Personalization → Background. Cuối cùng chạy winget upgrade --all hàng tuần để keep app up-to-date.
Hoàn thành 20 bước, máy Windows 11 của bạn đã sẵn sàng cho production dev. Thời gian trung bình 2-3 giờ cho lần đầu, 45 phút cho lần cài lại (nhờ winget + script automation).
Tweak nâng cao: GPU passthrough, systemd, WSL mirrored networking
GPU passthrough cho WSL — Nếu bạn cần CUDA cho ML: cài NVIDIA driver bản mới nhất trên Windows (không cần cài driver Linux trong WSL), sau đó trong WSL Ubuntu sudo apt install nvidia-cuda-toolkit. Test: nvidia-smi trong WSL phải ra GPU.
Systemd trong WSL — Mặc định WSL2 không chạy systemd. Tạo file /etc/wsl.conf với nội dung [boot]\nsystemd=true. Restart WSL: wsl --shutdown trong PowerShell. Sau đó systemctl status trong Ubuntu sẽ hoạt động.
WSL mirrored networking — Từ Windows 11 22H2, WSL có chế độ mirrored networking giúp WSL và Windows dùng chung network stack (localhost truy cập được 2 chiều). Thêm vào ~/.wslconfig:
```
[experimental]
networkingMode=mirrored
```
Restart WSL. Rất hữu ích cho dev full-stack khi frontend chạy Windows + backend chạy WSL.
Tool list checklist download
Checklist tools một chỗ để download (tất cả đều free, đã kiểm chứng): | Tool | Mục đích | Link | |---|---|---| | Windows Terminal | Terminal mặc định | Microsoft Store | | VS Code | Editor chính | code.visualstudio.com | | Notepad++ | Editor nhẹ | notepad-plus-plus.org | | Docker Desktop | Container | docker.com | | 7-Zip | Nén/giải nén | 7-zip.org | | Bitwarden | Password | bitwarden.com | | Everything | Search file | voidtools.com | | PowerToys | Utilities | Microsoft Store | | Git for Windows | Git client | git-scm.com |
Ngoài ra bạn nên tham khảo các bài chi tiết về VS Code, Windows Terminal, 7-Zip, Bitwarden trên trang /phan-mem để setup tối ưu từng tool.
Câu hỏi thường gặp
Windows 11 Home hay Pro cho dev?
▾
WSL2 hay dual-boot Ubuntu?
▾
Docker Desktop free còn an toàn cho công ty?
▾
Windows Defender có đủ không, có cần cài thêm antivirus?
▾
Máy yếu (8GB RAM, SSD 256GB) có theo được setup này?
▾
.wslconfig, không chạy Docker Desktop cùng lúc với VS Code khi không cần, tắt tất cả background apps. Nên partition C ≥ 60GB thay vì 100GB để dành cho D chứa project.Nên dùng PowerShell hay CMD hay WSL bash làm shell chính?
▾
Làm sao sync dotfiles giữa nhiều máy?
▾
dotfiles chứa .zshrc, .gitconfig, settings.json của VS Code. Dùng symlink từ home directory về repo. Hoặc dùng chezmoi / yadm làm dotfile manager. VS Code có tính năng Settings Sync built-in qua GitHub account.Nguồn tham khảo chính thức
Quảng cáo tài trợ