{"id":25649881,"url":"https://github.com/phoihos/wsl2-vscode","last_synced_at":"2026-03-01T15:31:52.706Z","repository":{"id":56565026,"uuid":"308847481","full_name":"phoihos/wsl2-vscode","owner":"phoihos","description":"How to setup Linux Native VS Code on WSL2 Ubuntu","archived":false,"fork":false,"pushed_at":"2021-01-04T09:39:36.000Z","size":48,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-23T14:38:23.484Z","etag":null,"topics":["linux-vscode","ubuntu","ubuntu-vscode","vscode","wsl","wsl2"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/phoihos.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-10-31T09:31:12.000Z","updated_at":"2020-11-01T05:06:42.000Z","dependencies_parsed_at":"2022-08-15T21:00:53.565Z","dependency_job_id":null,"html_url":"https://github.com/phoihos/wsl2-vscode","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/phoihos/wsl2-vscode","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phoihos%2Fwsl2-vscode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phoihos%2Fwsl2-vscode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phoihos%2Fwsl2-vscode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phoihos%2Fwsl2-vscode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phoihos","download_url":"https://codeload.github.com/phoihos/wsl2-vscode/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phoihos%2Fwsl2-vscode/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29973317,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T15:29:09.406Z","status":"ssl_error","status_checked_at":"2026-03-01T15:28:28.558Z","response_time":124,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["linux-vscode","ubuntu","ubuntu-vscode","vscode","wsl","wsl2"],"created_at":"2025-02-23T14:35:12.612Z","updated_at":"2026-03-01T15:31:47.698Z","avatar_url":"https://github.com/phoihos.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# wsl2-vscode\nHow to setup Linux Native VS Code on WSL2 Ubuntu\n\n## Install VS Code with Snap\n\n\u003e ref : https://code.visualstudio.com/docs/setup/linux\n\n1. [Install X-Server for GUI Rendering](https://sourceforge.net/projects/vcxsrv/)\n    - Configurations\n        - Configure Launch Setting\n            1. Windows Firewall \u0026 network protection -\u003e Allow VcXsrv on Domain / Public / Private checked\n            2. Launch VcXsrv with \"Disable access control\" checked\n        - Configure `~/.bashrc`\n            ```sh\n            echo \"export DISPLAY='$(cat /etc/resolv.conf | grep nameserver | awk '{print $2}'):0'\" \u003e\u003e ~/.bashrc\n            echo \"export LIBGL_ALWAYS_INDIRECT=1\" \u003e\u003e ~/.bashrc\n            ```\n\n2. [Install Snap for VS Code Installation](https://snapcraft.io/docs/installing-snap-on-ubuntu)\n    - Prerequisites\n        1. [Install **ubuntu-wsl2-systemd-script** to enable systemd](https://github.com/damionGans/ubuntu-wsl2-systemd-script)\n\n3. Install VS Code\n    ```sh\n    sudo snap install --classic code # or code-insiders\n    ```\n\n## Run VS Code\n\n```sh\nsnap run code\n# and type y \u003cEnter\u003e to pass the prompt\n```\n\u003e If you run `code` command with out `snap run`, it'll be launch The Windows Native VS Code.\n\n## Using Settings Sync (Built in VS Code)\n\n\u003e ref : https://code.visualstudio.com/docs/editor/settings-sync\n\n1. [Install GNOME Keyring for Settings Sync](https://wiki.archlinux.org/index.php/GNOME/Keyring#Installation)\n    - Configurations\n        - Configure `~/.bashrc`\n            ```sh\n            echo \"eval $(/usr/bin/gnome-keyring-daemon --start --components=gpg,pkcs11,secrets,ssh)\" \u003e\u003e ~/.bashrc\n            echo \"export SSH_AUTH_SOCK\" \u003e\u003e ~/.bashrc\n            echo \"dbus-update-activation-environment --systemd DISPLAY\" \u003e\u003e ~/.bashrc\n            ```\n    - Optional\n        - If you want to use GUI-Tool, install seahorse too\n\n2. [Install Firefox for Settings Sync](https://linuxconfig.org/how-to-install-uninstall-and-update-firefox-on-ubuntu-18-04-bionic-beaver-linux#h6-1-install-and-update-firefox-from-ubuntu-repository)\n    - Configurations\n        - [Make sure to default web browser](https://wiki.debian.org/DefaultWebBrowser#Default_for_foreign_programs_.28user-specific.29)\n\n## `~/.bashrc`\n\n![bashrc](./bashrc.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphoihos%2Fwsl2-vscode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphoihos%2Fwsl2-vscode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphoihos%2Fwsl2-vscode/lists"}