Developing In Wsl Visual Studio Codesetting Up A Development Environme

Gombloh
-
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 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).