{"id":21508587,"url":"https://github.com/vedantmgoyal9/setup-wsl2","last_synced_at":"2025-04-23T23:27:48.871Z","repository":{"id":264151996,"uuid":"885841207","full_name":"vedantmgoyal9/setup-wsl2","owner":"vedantmgoyal9","description":"GitHub action to enable WSL2 and install a Linux distro in GitHub-hosted runners.","archived":false,"fork":false,"pushed_at":"2024-12-16T18:55:02.000Z","size":28,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-30T04:41:21.111Z","etag":null,"topics":["actions","github","github-actions","hacktoberfest","linux","powershell","ubuntu","windows","wsl"],"latest_commit_sha":null,"homepage":"https://github.com/marketplace/actions/setup-wsl2","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/vedantmgoyal9.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"vedantmgoyal9","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"lfx_crowdfunding":null,"polar":null,"buy_me_a_coffee":null,"thanks_dev":null,"custom":null}},"created_at":"2024-11-09T14:37:58.000Z","updated_at":"2025-03-07T12:02:16.000Z","dependencies_parsed_at":"2024-11-22T10:23:31.333Z","dependency_job_id":"67158b83-a984-4b8a-907b-5d36eabfb043","html_url":"https://github.com/vedantmgoyal9/setup-wsl2","commit_stats":null,"previous_names":["vedantmgoyal9/setup-wsl2"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vedantmgoyal9%2Fsetup-wsl2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vedantmgoyal9%2Fsetup-wsl2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vedantmgoyal9%2Fsetup-wsl2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vedantmgoyal9%2Fsetup-wsl2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vedantmgoyal9","download_url":"https://codeload.github.com/vedantmgoyal9/setup-wsl2/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250531029,"owners_count":21445909,"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","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":["actions","github","github-actions","hacktoberfest","linux","powershell","ubuntu","windows","wsl"],"created_at":"2024-11-23T21:07:03.674Z","updated_at":"2025-04-23T23:27:48.852Z","avatar_url":"https://github.com/vedantmgoyal9.png","language":null,"funding_links":["https://github.com/sponsors/vedantmgoyal9"],"categories":[],"sub_categories":[],"readme":"# setup-wsl2\n\nGitHub action to enable WSL2 and install a Linux distro in GitHub-hosted runners.\n\nGitHub-hosted Windows runners come with WSL 1 by default. This action upgrades to WSL 2 and installs a Linux distro of your choice (Ubuntu by default).\n\nIt also enables systemd support if you are using `windows-2022`/`windows-latest` runner. See https://learn.microsoft.com/windows/wsl/systemd.\n\n### Example Usage\n\n```yaml\nname: CI/CD\non:\n  push:\n    branches: [main]\njobs:\n  build:\n    # always windows. why would you use wsl on linux or macos 😂\n    runs-on: windows-latest\n    steps:\n      - uses: actions/checkout@v4\n      - uses: vedantmgoyal9/setup-wsl2@main\n      - run: apt update \u0026\u0026 apt upgrade -y\n        shell: wsl-run {0} # add this to run the commands inside linux\n      - run: |\n          ls -al\n          env\n        shell: wsl-run {0} # don't forget to add this\n        env:\n          MY_ENV_VAR: MY_VALUE\n          # WSLENV is a special environment variable to share environment variables between windows and linux\n          # see https://devblogs.microsoft.com/commandline/share-environment-vars-between-wsl-and-windows\n          WSLENV: MY_ENV_VAR\n```\n\n### Inputs\n\n| Input            | Description                                                                                                                                             | Default  |\n| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |\n| `distro`         | The Linux distro to install. You can use any distro which is available in `wsl --list --online`.\u003cbr\u003e**Note:** Use `none` to skip installing any distro. | `Ubuntu` |\n| `enable-systemd` | Enable systemd.\u003cbr\u003e**Note:** Please set it to `false` if you are using `windows-2019` runner.                                                           | `true`   |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvedantmgoyal9%2Fsetup-wsl2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvedantmgoyal9%2Fsetup-wsl2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvedantmgoyal9%2Fsetup-wsl2/lists"}