How to connect to WSL in VS Code - Easy!

  Рет қаралды 332

Ferds Tech Channel

Ferds Tech Channel

Күн бұрын

In this video, I discuss how to connect to Windows Subsystem for Linux (WSL) in Visual Studio Code. See steps below.
1. Install WSL and a Linux Distribution
• Open PowerShell as an administrator and run:
o wsl --install
• Restart your computer if prompted.
2. Install Visual Studio Code:
• Download and install Visual Studio Code from the official website.
3. Install the WSL Extension:
• Open Visual Studio Code.
• Go to the Extensions view by clicking the Extensions icon in the Activity Bar on the side of the window.
• Search for “WSL” and install it.
4. Open a WSL Terminal in VS Code:
• Open your Linux distribution terminal.
• Navigate to the folder you want to work in.
o mkdir new_folder
o cd new_folder
o touch hello.py
• Type code . to open the folder in Visual Studio Code
5. Connect to WSL:
• In Visual Studio Code, press F1 to open the Command Palette.
• Type WSL: Connect to WSL and select it.
6. Start Coding:
• You should now see a WSL indicator in the bottom-left corner of Visual Studio Code.
• You can now use VS Code as you normally would but with the power of WSL!
• When you hover over hello.py, you get the proper Linux path.
7. Ending your WSL connection
• You can end your session in WSL and go back to running VS Code locally with File, Close Remote Connection.
References:
Work in Windows Subsystem for Linux with Visual Studio Code
code.visualstu...
#vscode #wsl #linux

Пікірлер
7 Apps Better Than The Defaults Your Distro Ships
12:43
DistroTube
Рет қаралды 79 М.
How To Run Linux Code on Windows with WSL 2 & VS Code
13:41
TypeScript TV with Benny
Рет қаралды 144 М.
Офицер, я всё объясню
01:00
История одного вокалиста
Рет қаралды 6 МЛН
когда не обедаешь в школе // EVA mash
00:51
EVA mash
Рет қаралды 4,2 МЛН
Ultimate Guide to VSCode on Android: Coding on Tab S9 Ultra
17:37
👋 Goodbye, CoPilot!  Hello, Codeium!
7:46
Coding in Public
Рет қаралды 38 М.
How to connect VMware VM to your GNS3 Lab
6:51
CMD Tech
Рет қаралды 4,6 М.
Tutorial: Setup a Development Environment on Windows (Docker, WSL2, Ubuntu, Vscode)
15:30
KAUST Visualization Core Lab
Рет қаралды 41 М.
Stow has forever changed the way I manage my dotfiles
8:09
Dreams of Autonomy
Рет қаралды 247 М.
18 Weird and Wonderful ways I use Docker
26:18
NetworkChuck
Рет қаралды 263 М.
Setup python on Linux in Windows using WSL and VS Code
14:36
Learning Software
Рет қаралды 31 М.
Visual Studio Code Setup for C/C++ with WSL
14:40
EdgeLord
Рет қаралды 22 М.