{"id":27195269,"url":"https://github.com/tvatdci/wsl-ubuntu-setup-guide","last_synced_at":"2026-01-22T20:09:10.872Z","repository":{"id":276455600,"uuid":"929332295","full_name":"TVATDCI/wsl-ubuntu-setup-guide","owner":"TVATDCI","description":"\"A complete guide to setting up WSL on Windows 11, installing Ubuntu, and using Zsh with Oh My Zsh + Powerlevel10k for a customized terminal experience. Also includes Neovim setup for an improved coding workflow inside WSL.\"","archived":false,"fork":false,"pushed_at":"2025-02-11T23:02:43.000Z","size":16,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-09T19:50:07.409Z","etag":null,"topics":["neovim","neovim-plugin","ohmyzsh","powerlevel10k","terminal-customization","vs","window-11","wsl","wsl-environment","wsl-terminal","wsl-ubuntu"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TVATDCI.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-08T09:50:51.000Z","updated_at":"2025-02-11T23:02:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"c6a264d6-ce0a-4105-bd75-4090d19105e2","html_url":"https://github.com/TVATDCI/wsl-ubuntu-setup-guide","commit_stats":null,"previous_names":["tvatdci/wsl-ubuntu-setup-guide"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/TVATDCI/wsl-ubuntu-setup-guide","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TVATDCI%2Fwsl-ubuntu-setup-guide","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TVATDCI%2Fwsl-ubuntu-setup-guide/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TVATDCI%2Fwsl-ubuntu-setup-guide/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TVATDCI%2Fwsl-ubuntu-setup-guide/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TVATDCI","download_url":"https://codeload.github.com/TVATDCI/wsl-ubuntu-setup-guide/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TVATDCI%2Fwsl-ubuntu-setup-guide/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28670366,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T19:36:09.361Z","status":"ssl_error","status_checked_at":"2026-01-22T19:36:05.567Z","response_time":144,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["neovim","neovim-plugin","ohmyzsh","powerlevel10k","terminal-customization","vs","window-11","wsl","wsl-environment","wsl-terminal","wsl-ubuntu"],"created_at":"2025-04-09T19:45:15.590Z","updated_at":"2026-01-22T20:09:10.864Z","avatar_url":"https://github.com/TVATDCI.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# **Complete Guide: Setting Up WSL, Ubuntu, and Zsh in VS Code**\r\n\r\n## **1. Install Windows Subsystem for Linux (WSL) and Ubuntu**\r\n\r\n### **Enable WSL and Virtual Machine Platform**\r\n\r\n1. Open **PowerShell as Administrator** and run:\r\n   ```powershell\r\n   wsl --install\r\n   ```\r\n2. Restart your computer if prompted.\r\n\r\n### **Install Ubuntu**\r\n\r\n1. Open **PowerShell** and install Ubuntu:\r\n   ```powershell\r\n   wsl --install -d Ubuntu\r\n   ```\r\n2. Once installed, search for **Ubuntu** in the Start Menu and open it.\r\n3. Set up your **UNIX username** and **password** (this is different from your Windows account).\r\n\r\n---\r\n\r\n## **2. Update Ubuntu and Install Essential Packages**\r\n\r\nAfter opening Ubuntu, update and upgrade packages:\r\n\r\n```bash\r\nsudo apt update \u0026\u0026 sudo apt upgrade -y\r\n```\r\n\r\nInstall essential tools:\r\n\r\n```bash\r\nsudo apt install -y curl git zsh wget\r\n```\r\n\r\n---\r\n\r\n## **3. Install and Set Up Zsh with Oh My Zsh**\r\n\r\n### **Install Oh My Zsh**\r\n\r\n```bash\r\nsh -c \"$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)\"\r\n```\r\n\r\nPress **Y** when asked to change your default shell.\r\n\r\n### **Install Plugins for Zsh**\r\n\r\nEnhance your Zsh experience with the following plugins:\r\n\r\n```bash\r\ngit clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting\r\ngit clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/zsh-autosuggestions\r\n```\r\n\r\nEdit the Zsh configuration file:\r\n\r\n```bash\r\nnano ~/.zshrc\r\n```\r\n\r\nFind the `plugins=` line and modify it:\r\n\r\n```bash\r\nplugins=(git zsh-syntax-highlighting zsh-autosuggestions)\r\n```\r\n\r\nSave and exit (**Ctrl + X**, then **Y**, then **Enter**), then apply the changes:\r\n\r\n```bash\r\nsource ~/.zshrc\r\n```\r\n\r\n---\r\n\r\n## **4. Install Powerlevel10k for a Beautiful Terminal**\r\n\r\n### **Download Powerlevel10k Theme**\r\n\r\n```bash\r\ngit clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k\r\n```\r\n\r\n### **Set Powerlevel10k as the Default Theme**\r\n\r\n1. Open the Zsh configuration file:\r\n   ```bash\r\n   nano ~/.zshrc\r\n   ```\r\n2. Find the line:\r\n   ```bash\r\n   ZSH_THEME=\"robbyrussell\"\r\n   ```\r\n   Replace it with:\r\n   ```bash\r\n   ZSH_THEME=\"powerlevel10k/powerlevel10k\"\r\n   ```\r\n3. Save and exit.\r\n4. Apply changes:\r\n   ```bash\r\n   source ~/.zshrc\r\n   ```\r\n5. Restart your terminal to begin **Powerlevel10k configuration** and follow the prompts.\r\n\r\n---\r\n\r\n## **5. Install Neovim for an Improved Terminal Editor**\r\n\r\n### **Install Neovim**\r\n\r\n```bash\r\nsudo apt install -y neovim\r\n```\r\n\r\n### **Set Neovim as the Default Editor**\r\n\r\n```bash\r\necho \"export EDITOR=nvim\" \u003e\u003e ~/.zshrc\r\nsource ~/.zshrc\r\n```\r\n\r\n### **Enhance Neovim with Plugins**\r\n\r\n1. Install **vim-plug** (plugin manager for Neovim):\r\n   ```bash\r\n   curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs \\\r\n       https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim\r\n   ```\r\n2. Open Neovim and edit the config file:\r\n   ```bash\r\n   nvim ~/.config/nvim/init.vim\r\n   ```\r\n3. Add the following basic plugin setup:\r\n\r\n   ```vim\r\n   call plug#begin()\r\n   Plug 'morhetz/gruvbox'\r\n   Plug 'tpope/vim-sensible'\r\n   Plug 'junegunn/fzf.vim'\r\n   call plug#end()\r\n\r\n   syntax on\r\n   colorscheme gruvbox\r\n   set number\r\n   ```\r\n\r\n4. Save and exit **(Esc, then type `:wq`)**.\r\n5. Install the plugins inside Neovim:\r\n   ```vim\r\n   :PlugInstall\r\n   ```\r\n6. Restart Neovim for changes to take effect.\r\n\r\n---\r\n\r\n## **6. Sync VS Code Extensions Between Windows and WSL**\r\n\r\nTo use the same extensions in both environments:\r\n\r\n1. Open **VS Code on Windows**.\r\n2. Sign in to your **GitHub or Microsoft account** to enable **Settings Sync**.\r\n3. Open **VS Code inside WSL** using:\r\n   ```bash\r\n   \u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c Temporary merge branch 1\r\n   =========\r\n   git config --global user.name \"YourName\"\r\n   git config --global user.email \"youremail@example.com\"\r\n   ```\r\n4. Check if Git is installed:\r\n   ```bash\r\n   git --version\r\n   ```\r\n5. Clone a GitHub repository:\r\n   ```bash\r\n   git clone https://github.com/yourusername/yourrepository.git\r\n   ```\r\n\r\n---\r\n\r\n## **8. Useful Commands to Test Your Setup**\r\n\r\n- **Check Ubuntu version:**\r\n  ```bash\r\n  lsb_release -a\r\n  ```\r\n- **List files in home directory:**\r\n  ```bash\r\n  ls -la ~\r\n  ```\r\n- **Check installed Node.js version:**\r\n  ```bash\r\n  node -v\r\n  ```\r\n- **Display system info using Neofetch:**\r\n  ```bash\r\n  sudo apt install -y neofetch\r\n  neofetch\r\n  ```\r\n\r\n---\r\n\r\n## **9. Accessing Ubuntu Files from Windows**\r\n\r\nYour Ubuntu files are stored inside WSL. You can access them in **Windows File Explorer** by typing:\r\n\r\n```plaintext\r\n\\\\wsl.localhost\\Ubuntu\\home\\\u003cyour-UNIX-username\u003e\r\n```\r\n\r\nOr navigate to:\r\n\r\n```plaintext\r\nC:\\Users\\YourWindowsUsername\\AppData\\Local\\Packages\\CanonicalGroupLimited...\\LocalState\\rootfs\\home\\\u003cyour-UNIX-username\u003e\r\n```\r\n\r\n---\r\n\r\n## **10. Moving Old Projects to WSL**\r\n\r\n1. Move your old project folders to:\r\n   ```plaintext\r\n   /home/\u003cyour-ubuntu-username\u003e/\r\n   ```\r\n2. Open **VS Code** and navigate to the folder inside WSL.\r\n3. Run it in **Ubuntu terminal** using:\r\n\r\n   ```bash\r\n   cd ~/your-project-folder\r\n   \u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e Temporary merge branch 2\r\n   code .\r\n   ```\r\n\r\n4. Sign in again and **enable syncing**.\r\n5. Your extensions and settings should now be synced!\r\n\r\n---\r\n\r\n## **7. Difference Between Zsh and Neovim**\r\n\r\n- **Zsh** is an interactive shell for running commands, while **Neovim** is a powerful text editor.\r\n- **Zsh** helps with command-line efficiency, auto-suggestions, and plugins.\r\n- **Neovim** is optimized for coding, with syntax highlighting, plugins, and customization.\r\n- **Using Both:** You can configure **Neovim as your Zsh editor** by setting:\r\n  ```bash\r\n  export EDITOR=nvim\r\n  ```\r\n  This allows you to edit files inside your terminal seamlessly.\r\n\r\n**Pros:**\r\n✅ Neovim as default editor in Zsh streamlines workflow.\r\n✅ Zsh enhances command-line experience.\r\n\r\n```plaintext\r\nC:\\Users\\YourWindowsUsername\\AppData\\Local\\Packages\\CanonicalGroupLimited...\\LocalState\\rootfs\\home\\\u003cyour-UNIX-username\u003e\r\n```\r\n\r\n=======\r\n**Cons:**\r\n❌ Using both might be overwhelming for beginners.\r\n❌ Requires time to configure properly.\r\n\r\n---\r\n\r\n✅ **Now you have the perfect dual-terminal setup: Windows for daily tasks \u0026 Ubuntu for development!** 🚀\r\n\r\n## Ps.\r\n\r\nSince I have been often using multiple terminal tabs for your full-stack development, tmux is a great addition. Here’s why: It is part of my learning experiences of things are 😁\r\n\r\n### Split Your Terminal Efficiently\r\n\r\nYou can divide your terminal into multiple panes and navigate between them easily.\r\nExample use case: Have backend logs on one side and your frontend dev server on another.\r\n\r\n### Persistent Sessions\r\n\r\nIf you close your terminal by mistake, your running processes (like servers, databases, etc.) won’t die! You can reattach to them.\r\n\r\n### Better Navigation \u0026 Productivity\r\n\r\nYou don’t have to constantly open and close new terminal tabs.\r\nInstead, just split panes inside tmux and jump between them with key bindings.\r\n\r\nSince you already have Zsh + Oh My Zsh + Powerlevel10k, I’d add tmux and configure it to work seamlessly with your current setup.\r\n\r\n1️⃣ **Install tmux**\r\n\r\n```sh\r\nsudo apt update \u0026\u0026 sudo apt install tmux -y\r\n```\r\n\r\n2️⃣ **Configure tmux for a Better Experience**\r\nCreate a `~/.tmux.conf` file to customize it:\r\n\r\n```sh\r\nnano ~/.tmux.conf\r\n```\r\n\r\nPaste the following configuration:\r\n\r\n```sh\r\n# Set better keybindings\r\n\r\nset -g mouse on # Enable mouse support for easier pane resizing\r\nunbind C-b # Unbind default tmux prefix (Ctrl+b)\r\nset -g prefix C-a # Set \"Ctrl + a\" as the new prefix (easier to use)\r\nbind C-a send-prefix # Let you send Ctrl+A to applications if needed\r\n\r\n# Split panes with shortcuts\r\n\r\nbind | split-window -h # Ctrl+A then | → Split horizontally\r\nbind - split-window -v # Ctrl+A then - → Split vertically\r\n\r\n# Switch panes with arrow keys\r\n\r\nbind -r Left select-pane -L\r\nbind -r Right select-pane -R\r\nbind -r Up select-pane -U\r\nbind -r Down select-pane -D\r\n\r\n# Resize panes with Shift + Arrow keys\r\n\r\nbind -r S-Left resize-pane -L 5\r\nbind -r S-Right resize-pane -R 5\r\nbind -r S-Up resize-pane -U 5\r\nbind -r S-Down resize-pane -D 5\r\n\r\n# Reload config with Ctrl+A then r\r\n\r\nbind r source-file ~/.tmux.conf \\; display-message \"Tmux config reloaded!\"\r\n```\r\n\r\nSave \u0026 exit (**Ctrl+X → Y → Enter**).\r\n\r\n3️⃣ **Reload tmux Configuration**\r\n\r\n```sh\r\ntmux source ~/.tmux.conf\r\n```\r\n\r\n4️⃣ **Start a New tmux Session**\r\n\r\n```sh\r\ntmux\r\n```\r\n\r\n### Explanation\r\n\r\n- **Mouse Support**: `set -g mouse on`\r\n\r\n  - Enables mouse support for easier pane resizing and navigation.\r\n\r\n- **Prefix Key**: `set -g prefix C-a`\r\n\r\n  - Changes the default prefix key from `Ctrl+b` to `Ctrl+a` for easier access.\r\n  - `unbind C-b` unbinds the default prefix key.\r\n\r\n- **Send Prefix**: `bind C-a send-prefix`\r\n\r\n  - Allows you to send `Ctrl+a` to applications if needed.\r\n\r\n- **Split Panes**:\r\n\r\n  - `bind | split-window -h`: `Ctrl+a` then `|` splits the window horizontally.\r\n  - `bind - split-window -v`: `Ctrl+a` then `-` splits the window vertically.\r\n\r\n- **Switch Panes**:\r\n\r\n  - `bind -r Left select-pane -L`: `Ctrl+a` then Left Arrow switches to the left pane.\r\n  - `bind -r Right select-pane -R`: `Ctrl+a` then Right Arrow switches to the right pane.\r\n  - `bind -r Up select-pane -U`: `Ctrl+a` then Up Arrow switches to the upper pane.\r\n  - `bind -r Down select-pane -D`: `Ctrl+a` then Down Arrow switches to the lower pane.\r\n\r\n- **Resize Panes**:\r\n\r\n  - `bind -r S-Left resize-pane -L 5`: `Shift + Left Arrow` resizes the pane to the left by 5 units.\r\n  - `bind -r S-Right resize-pane -R 5`: `Shift + Right Arrow` resizes the pane to the right by 5 units.\r\n  - `bind -r S-Up resize-pane -U 5`: `Shift + Up Arrow` resizes the pane upwards by 5 units.\r\n  - `bind -r S-Down resize-pane -D 5`: `Shift + Down Arrow` resizes the pane downwards by 5 units.\r\n\r\n- **Reload Configuration**:\r\n  - `bind r source-file ~/.tmux.conf \\; display-message \"Tmux config reloaded!\"`: `Ctrl+a` then `r` reloads the tmux configuration file and displays a message.\r\n\r\nNow, try these:\r\n\r\n- **Split panes:**\r\n  - `Ctrl + A` then `|` (vertical split)\r\n  - `Ctrl + A` then `-` (horizontal split)\r\n- **Switch between panes:** `Ctrl + A` then arrow keys\r\n- **Resize panes:** Shift + Arrow keys\r\n- **Detach from tmux (without closing it):** `Ctrl + A` then `D`\r\n- **Reattach to your session after closing the terminal:**\r\n  ```sh\r\n  tmux attach-session -t 0\r\n  ```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftvatdci%2Fwsl-ubuntu-setup-guide","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftvatdci%2Fwsl-ubuntu-setup-guide","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftvatdci%2Fwsl-ubuntu-setup-guide/lists"}