{"id":22956723,"url":"https://github.com/biswa96/wslbridge2","last_synced_at":"2025-07-27T16:11:25.111Z","repository":{"id":44498223,"uuid":"195289440","full_name":"Biswa96/wslbridge2","owner":"Biswa96","description":"Explore various ways to connect Windows Subsystem for Linux with Windows terminal emulators.","archived":false,"fork":false,"pushed_at":"2024-11-29T04:42:25.000Z","size":266,"stargazers_count":165,"open_issues_count":5,"forks_count":27,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-05-24T12:06:31.380Z","etag":null,"topics":["cpp11","cygwin","gplv3","hyper-v","linux","msys2","socket","terminal","windows-10","windows-subsystem-for-linux","wsl"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Biswa96.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-07-04T18:58:18.000Z","updated_at":"2025-05-18T15:25:04.000Z","dependencies_parsed_at":"2024-11-29T09:46:15.482Z","dependency_job_id":null,"html_url":"https://github.com/Biswa96/wslbridge2","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/Biswa96/wslbridge2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Biswa96%2Fwslbridge2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Biswa96%2Fwslbridge2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Biswa96%2Fwslbridge2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Biswa96%2Fwslbridge2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Biswa96","download_url":"https://codeload.github.com/Biswa96/wslbridge2/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Biswa96%2Fwslbridge2/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267384366,"owners_count":24078577,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-27T02:00:11.917Z","response_time":82,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["cpp11","cygwin","gplv3","hyper-v","linux","msys2","socket","terminal","windows-10","windows-subsystem-for-linux","wsl"],"created_at":"2024-12-14T17:03:26.055Z","updated_at":"2025-07-27T16:11:25.094Z","avatar_url":"https://github.com/Biswa96.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!--\n * This file is part of wslbridge2 project.\n * Licensed under the terms of the GNU General Public License v3 or later.\n * Copyright (C) 2019-2020 Biswapriyo Nath.\n *\n * README.md: Main README file for wslbridge2 project\n--\u003e\n\n# wslbridge2\n\n[![Licence](https://img.shields.io/github/license/Biswa96/wslbridge2.svg?style=flat-square)][1]\u0026nbsp;\u0026nbsp;\u0026nbsp;\n[![Top Language](https://img.shields.io/github/languages/top/Biswa96/wslbridge2.svg?style=flat-square)][2]\u0026nbsp;\u0026nbsp;\u0026nbsp;\n[![Code size](https://img.shields.io/github/languages/code-size/Biswa96/wslbridge2.svg?style=flat-square)]()\u0026nbsp;\u0026nbsp;\u0026nbsp;\n[![GitHub release](https://img.shields.io/github/release/Biswa96/wslbridge2.svg?style=flat-square)][3]\u0026nbsp;\u0026nbsp;\u0026nbsp;\n[![GitHub Actions](https://github.com/Biswa96/wslbridge2/actions/workflows/main.yml/badge.svg)][4]\u0026nbsp;\u0026nbsp;\u0026nbsp;\n\nExplore various ways to connect Windows Subsystem for Linux (WSL) with\nWindows terminal emulators and command line programs.\n\n\n## Requirements:\n\n* **Windows 10 version 1809** (build 17763) aka. October 2018 Update\n* A POSIX-compatible environment - cygwin or msys2\n* A terminal emulator - mintty or ConEmu\n* For compiling - GCC, make, linux-headers\n\n\n## How to build\n\nClone this git repository. Run `make` in cygwin (or msys2) and WSL to make all.\nTo build individual programs, go to `src` folder and run `make` command with\nthe corresponding Makefile. By default the `make` command will create dynamically\nlinked executables. For statically liked binaries, use `make RELEASE=1` command.\nAll binaries will be placed in `bin` folder.\n\n\n## How to use\n\nDownload the released stable binaries from [Release page][3]. Or to test\nnightly builds, download the build artifacts from [GitHub Actions](https://github.com/Biswa96/wslbridge2/actions).\nHere are some info about the directories of this project.\n\n### samples: sample C code using Hyper-V sockets\n\nPick up any one of 1. `win_client` \u0026 `wsl_server` 2. `win_server` \u0026 `wsl_client`.\nRun `wsl.exe` first. Paste the VM ID from the last argument of `wslhost.exe`\nprocess's command line. Compile the `win_` part in cygwin or msys2 and\nthe `wsl_` part in WSL. Run the server part first. It will wait for the client.\n\n### wslbridge2: connect with WSL using network sockets\n\nPlace `wslbridge2.exe` and `wslbridge2-backend` in same Windows folder.\nRun `wslbridge2.exe`. This requires cygwin or msys2 environment.\n\n### Options\n\nRunning `wslbridge2.exe` without any options will open default shell in default\nWSL distribution. Here are the list of valid options:\n\n* `-b` or `--backend`: Overrides the default path of backend binaries.\n* `-d` or `--distribution`: Run the specified distribution.\n* `-e` or `--env`:  Copies Windows environment variable into the WSL.\n* `-h` or `--help`: Show this usage information.\n* `-l` or `--login`: Start a login shell in WSL.\n* `-s` or `--show`: Shows hidden backend window and debug output.\n* `-u` or `--user`: Run as the specified user in WSL.\n* `-w` or `--windir`: Changes the working directory to a Windows path.\n* `-W` or `--wsldir`: Changes the working directory to WSL path.\n* `-x` or `--xmod`: Enables X11 forwarding.\n\nAlways use single quote or double quote to mention any folder path. For paths\nin WSL, `\"~\"` can also be used for user's home folder. The non-options arguments\nwill be executed as is. For example, `wslbridge2.exe ls` will execute `ls` in\ncurrent working directory in default WSL distribution.\n\n\n## Frequently Asked Questions\n\nSee the [FAQ page](FAQ.md) for the answers to commonly asked questions.\n\n\n## Caveats\n\n* The graphics may lag sometimes due to multiple layers of data transitions\nbetween Windows and WSL side programs. Suggestions are welcomed to speed it up.\n\n* There is no documented way to get VM ID of running WSL2 utility VM. See this\n[issue](https://github.com/microsoft/WSL/issues/4131). Hence `GetVmId.cpp` will\nchange in future Windows 10 releases due to usage of undocumented COM methods.\n\n\n## Further Readings\n\n  - [Make your own integration services][6]\n  - [Linux kernel: af_vsock.c][7]\n  - [Linux kernel: vm_sockets.h][8]\n  - [VMWare: VMCI Socket Programming Guide][9]\n  - [man7: vsock(7)][10]\n  - [wslbridge][11]\n  - [win32-console-docs][12]\n  - [XConPty][13]\n\n\n## Acknowledgments\n\nThis is based on the Ryan Prichard's (@rprichard) [wslbridge][11] project.\nAlso thanks to @mintty, @therealkenc, @dxhisboy and all [contributors][14]\nfor helping with this project.\n\n\n## Contributions\n\nContributions are greatly appreciated. Please keep these following points:\n\n* For a big change, try to add an issue before creating a pull request.\n* Append a tag name in commit message, see previous commits as reference.\n* Make the code easy to read and understand with proper syntax.\n* If possible try to minimize memory usage.\n* Use 4 spaces for indentation.\n* If you are not programmer you can contribute to further improve or additions\nto documentations. Also share and discuss what features you like to have.\n\n\n## License\n\nwslbridge2 is licensed under the GNU General Public License v3.\nA full copy of the license is provided in [LICENSE](LICENSE).\n\n    wslbridge2 -- Explore various ways to connect WSL with Windows terminal emulators.\n    Copyright (C) Biswapriyo Nath\n    \n    This program is free software: you can redistribute it and/or modify\n    it under the terms of the GNU General Public License as published by\n    the Free Software Foundation, either version 3 of the License, or\n    (at your option) any later version.\n    \n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU General Public License for more details.\n    \n    You should have received a copy of the GNU General Public License\n    along with this program.  If not, see \u003chttp://www.gnu.org/licenses/\u003e.\n\n\u003c!-- Links --\u003e\n\n[1]: LICENSE\n[2]: https://github.com/Biswa96/wslbridge2.git\n[3]: https://github.com/Biswa96/wslbridge2/releases\n[4]: https://github.com/Biswa96/wslbridge2/actions/workflows/main.yml\n[6]: https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/user-guide/make-integration-service\n[7]: https://github.com/torvalds/linux/blob/master/net/vmw_vsock/af_vsock.c\n[8]: https://github.com/torvalds/linux/blob/master/include/uapi/linux/vm_sockets.h\n[9]: https://www.vmware.com/support/developer/vmci-sdk/\n[10]: http://man7.org/linux/man-pages/man7/vsock.7.html\n[11]: https://github.com/rprichard/wslbridge.git\n[12]: https://github.com/rprichard/win32-console-docs.git\n[13]: https://github.com/Biswa96/XConPty.git\n[14]: https://github.com/Biswa96/wslbridge2/graphs/contributors\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbiswa96%2Fwslbridge2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbiswa96%2Fwslbridge2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbiswa96%2Fwslbridge2/lists"}