打开Goland,在File>Settings>Build,Execution,Deployment>Run Targets中新建WSL,配置如下图: 上面Add language runtime选择Go,完成后在Goland右上角Edit Configurations中新建Go build并保存,完成配置 以上GOROOT等配置因人而异,仅作参考,配置完成运行go代码成功。
打开项目,进入设置(File -> Settings) 找到Project: xxx -> Python Interpreter,看向右边,点击小齿轮按钮,点击 Add 在左侧选择 WSL,选择正确的 Linux distribution 和 Python interpreter path(比如作者的是 Ubuntu 和 /usr/bin/python),点击 OK 此时,列表中会显示子系统中安装的所有 Python 包,点击 OK 等待PyC...
[command]with a WSL command, such as:wsl -l -vto list installed distributions orwsl pwdto see where the current directory path is mounted in wsl. From PowerShell, the commandget-datewill provide the date from the Windows file system andwsl datewill provide the date from the Linux file ...
appendWindowsPathbooleantrueSetting this key will determine whether WSL will add Windows path elements to the $PATH environment variable. User settings wsl.conf section label:[user] These options are available in Build 18980 and later. keyvaluedefaultnotes ...
Open your WSL terminal and enter cd ~ to be sure you're in the root directory. Open the .profile file, which controls the settings for your terminal, with the terminal text editor, Nano: sudo nano .profile At the bottom of the file (don't change the # set PATH settings), add the...
[wsl2] kernel=<path> # An absolute Windows path to a custom Linux kernel. memory=<size> # How much memory to assign to the WSL2 VM. processors=<number> # How many processors to assign to the WSL2 VM. swap=<size> # How much swap space to add to the WSL2 VM. 0 for no swap...
[wsl2] kernel=<path> # An absolute Windows path to a custom Linux kernel. memory=<size> # How much memory to assign to the WSL2 VM. processors=<number> # How many processors to assign to the WSL2 VM. swap=<size> # How much swap space to add to the WSL2 VM. 0 for no swap...
[wsl2] kernel=<path> # An absolute Windows path to a custom Linux kernel. memory=<size> # How much memory to assign to the WSL2 VM. processors=<number> # How many processors to assign to the WSL2 VM. swap=<size> # How much swap space to add to the WSL2 VM. 0 for no swap...
Add thedescriptorelement and provide settings to access your custom distribution. Note that theidvalue should be unique. For example: <!-- ... --><descriptor><id>DEBIAN_CUSTOM</id><microsoft-id>Debian</microsoft-id><executable-path>debian-custom.exe</executable-path><presentable-name>Debian ...
Note:When prompted toSelect Additional Tasksduring installation, be sure to check theAdd to PATHoption so you can easily open a folder in WSL using thecodecommand. Install theWSL extension. If you plan to work with other remote extensions in VS Code, you may choose to install theRemote Deve...