Developing In Wsl Visual Studio Codesetting Up A Development Environme
π Set Up Your Dev Environment Welcome to your step-by-step guide for setting up a powerful development environment using Windows Subsystem for Linux (WSL), Visual Studio Code (VSCode), and essential tools like Git and Node Version Manager (NVM).
π Table of Contents - π» IDE - Install Visual Studio Code (VSCode) - π§ Configure VSCode for Development - π§ WSL - Setting Up Ubuntu and Updating Linux Kernel - π οΈ Essential Dev Tools - π Python and pip - β‘ Git - Installation and Configuration - π Git Credential Manager (GCM) - π Configure Security Settings - π Final Congratulations π» IDE - Install Visual Studio Code (VSCode) VSCode is a crucial tool for development. Let's get it installed and ready!
π½ Steps to Install VSCode: - Download VSCode: Visit Visual Studio Code and download the Windows installer. - Run the Installer: Double-click the downloaded file and follow the instructions. Check the options to: - Add VSCode to the PATH. - Create a desktop icon for quick access.
π Install VSCode Using PowerShell CLI: $InstallerUrl = "https://code.visualstudio.com/sha/download?build=stable&os=win32-x64-user" $InstallerPath = "$env:TEMP\VSCodeInstaller.exe" Invoke-WebRequest -Uri $InstallerUrl -OutFile $InstallerPath Start-Process -FilePath $InstallerPath -ArgumentList "/verysilent" -NoNewWindow -Wait Remove-Item $InstallerPath π Install VSCode Using Linux CLI: sudo apt install curl gpg curl -fsSL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor -o /usr/share/keyrings/ms.gpg echo "deb [arch=amd64 signed-by=/usr/share/keyrings/ms.gpg] https://packages.microsoft.com/repos/code stable main" | sudo tee /etc/apt/sources.list.d/vscode.list sudo apt update sudo apt install code After installing, launch VSCode by typing code in your terminal.
π§ Configure VSCode for Development π οΈ Steps to Configure VSCode: - Open VSCode: Launch VSCode from your Start Menu or Desktop Icon. - Install Extensions: Go to the Extensions Marketplace by pressing Ctrl+Shift+X . Recommended extensions:- π Remote Development β for remote development within WSL. - π Python β for Python development. - π§© GitLens β enhances Git capabilities. - π³ Docker β for containerization. - β¨ ESLint β for JavaScript development. - π YAML β for YAML language support. - π» Live Share β for collaborative coding.
π Remote - SSH β to connect via SSH to remote servers. π§ WSL - Setting Up Ubuntu and Updating Linux Kernel Build a robust foundation by setting up WSL and Ubuntu on your Windows machine. π οΈ Steps to Install WSL & Ubuntu: - Install WSL Ubuntu: - In VSCode Open a PowerShell terminal and enter: wsl --install -d Ubuntu - Click Yes if prompted to allow program to make changes, view install progress in terminal. - Wait for the installation to complete, - Reboot your machine.
(a terminal window will open upon reboot) - In the terminal window type a username when prompted (all lowercase), enter a password wait for the process to complete then close the window. - Update Linux Packages: - Now that WSL is up and running, we need to ensure our Linux packages are up-to-date.
Open VSCode open your Ubuntu(WSL) terminal and run: sudo apt update && sudo apt upgrade -y π οΈ Essential Dev Tools To build high-quality software, install these essential tools: sudo apt-get install wget ca-certificates curl π Node Version Manager (NVM): Manage your Node.js versions efficiently with NVM: curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash π AWS CLI v2: The AWS Command Line Interface (CLI) v2 is essential for interacting with AWS services directly from the command line.
Install it with the following steps: Installation: For Linux: curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" unzip awscliv2.zip sudo ./aws/install For Windows (via PowerShell): msiexec.exe /i https://awscli.amazonaws.com/AWSCLIV2.msi Verify the installation: aws --version This should return the installed version of AWS CLI v2. π Python and pip Python is an essential tool for cloud development. Install Python and pip with: sudo apt install python3-pip -y β CFN-Lint (CloudFormation Linter): Ensure quality in your CloudFormation templates: pip3 install cfn-lint Don't forget to install the CloudFormation Linter extension in VSCode!
π§ jq (Command-line JSON processor): jq is a lightweight command-line JSON processor, essential for parsing and manipulating JSON data: sudo apt-get install jq π½ Install Database Tools (if needed) If your development requires a database, install the appropriate database. For example, for MySQL: - Download MySQL: Go to the MySQL Downloads page and select the Windows version. - Install MySQL: Follow the setup wizard, set up your root password, and configure the server. β‘ Git - Installation and Configuration Git is essential for version control.
Install and configure Git with the following: π οΈ Install Git: sudo apt-get install git π§π» Configure Git Identity: git config --global user.name "Your Name" git config --global user.email "your.email@example.com" π View Git Configuration: git config --list Install Git CLI: sudo apt install gh π Git Credential Manager (GCM) Git Credential Manager (GCM) simplifies authentication for Git services like GitHub and Azure DevOps.
π‘ Setting Up GCM in WSL: Set up GCM within WSL: git config --global credential.helper "/mnt/c/Program\ Files/Git/mingw64/bin/git-credential-manager.exe" π Configure Security Settings π§ Steps to Secure Your System: ### (Optional) - Windows Security: Ensure Windows Defender or your preferred antivirus is active and updated. - Firewall Settings: Configure your Windows Firewall to allow development tools while blocking unauthorized access. - Secure Browsers: Install security extensions like HTTPS Everywhere and ensure your browsers are up to date. - Regular Updates: Keep Windows OS, VSCode, and all installed packages/extensions updated.
π Final Congratulations You now have a fully configured, secure development environment on your Windows machine using WSL, VSCode, Git, and other standard development tools. You're ready for cloud development and ensuring your CloudFormation templates are linted before merging into the main branch. Happy Coding! π»π Top comments (0)
People Also Asked
- Developing in WSL - Visual Studio Code
- Set up a WSL development environment | Microsoft LearnDevelop with Ubuntu on WSLSetting up a Linux development environment on Windows with WSLSetting Up a Basic Dev Environment on a Windows/Linux MachineSetting up a development environment with WSL on WindowsHow to Set Up VS Code with WSL 2 on Windows 10 and 11
- Develop with Ubuntu on WSL
- Setting up a Linux development environment on Windows with WSL
- Setting Up a Basic Dev Environment on a Windows/Linux Machine
- How to Set Up a Complete Dev Environment on WSL
- Quick-Start Guide: Setting Up an Ubuntu Development ...
- How to Set Up VS Code with WSL 2 on Windows 10 and 11
Developing in WSL - Visual Studio Code?
π Set Up Your Dev Environment Welcome to your step-by-step guide for setting up a powerful development environment using Windows Subsystem for Linux (WSL), Visual Studio Code (VSCode), and essential tools like Git and Node Version Manager (NVM).
Set up a WSL development environment | Microsoft LearnDevelop with Ubuntu on WSLSetting up a Linux development environment on Windows with WSLSetting Up a Basic Dev Environment on a Windows/Linux MachineSetting up a development environment with WSL on WindowsHow to Set Up VS Code with WSL 2 on Windows 10 and 11?
π Set Up Your Dev Environment Welcome to your step-by-step guide for setting up a powerful development environment using Windows Subsystem for Linux (WSL), Visual Studio Code (VSCode), and essential tools like Git and Node Version Manager (NVM).
Develop with Ubuntu on WSL?
π§ Configure VSCode for Development π οΈ Steps to Configure VSCode: - Open VSCode: Launch VSCode from your Start Menu or Desktop Icon. - Install Extensions: Go to the Extensions Marketplace by pressing Ctrl+Shift+X . Recommended extensions:- π Remote Development β for remote development within WSL. - π Python β for Python development. - π§© GitLens β enhances Git capabilities. - π³ Docker β for co...
Setting up a Linux development environment on Windows with WSL?
π Set Up Your Dev Environment Welcome to your step-by-step guide for setting up a powerful development environment using Windows Subsystem for Linux (WSL), Visual Studio Code (VSCode), and essential tools like Git and Node Version Manager (NVM).
Setting Up a Basic Dev Environment on a Windows/Linux Machine?
π Set Up Your Dev Environment Welcome to your step-by-step guide for setting up a powerful development environment using Windows Subsystem for Linux (WSL), Visual Studio Code (VSCode), and essential tools like Git and Node Version Manager (NVM).