Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tanakh/wsl-get
https://github.com/tanakh/wsl-get
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/tanakh/wsl-get
- Owner: tanakh
- Created: 2021-06-19T15:02:03.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-06-19T16:25:25.000Z (over 3 years ago)
- Last Synced: 2024-10-14T11:49:09.051Z (4 months ago)
- Language: Rust
- Size: 11.7 KB
- Stars: 12
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# wsl-get
A command line tool to install any Linux distribution on WSL2.
## Requirements* [Rust compiler](https://www.rust-lang.org/)
* [Docker Desktop](https://www.docker.com/products/docker-desktop)
This program uses the docker command to get a rootfs tarball that can be used with WSL.
You can install Docker Desktop via `winget`:
```
> winget install docker
```## Install
```
> cargo install wsl-get
```## Usage
### Install distribution
```
> wsl-get install
```To find available distributions and versions, search on [Docker Hub](https://hub.docker.com/).
And you can install it by just replacing `docker pull` with `wsl-get install` in the command. For example,Installing Ubuntu:
```
> wsl-get install ubuntu
```Installing specified version of distribution:
```
> wsl-get install ubuntu:21.04
```You can specify the name of installation.
```
> wsl-get install
```You can create many instances of same distribution.
```
> wsl-get install ubuntu ubuntu-1
> wsl-get install ubuntu ubuntu-2
> wsl-get install ubuntu ubuntu-3
```### Uninstall distribution
```
> wsl-get uninstall
```### List installed distributions
```
> wsl-get list
```Just same as `wsl.exe --list`.
### Set default user of distribution
```
> wsl-get set-default-user
```### Download rootfs tarball
You can download the rootfs tarball in order to install the distribution yourself using the `wsl.exe` command.
```
> wsl-get download
```For more information, please run `wsl-get help`.