├── .travis.yml ├── LICENSE ├── README.md └── env.sh /.travis.yml: -------------------------------------------------------------------------------- 1 | dist: xenial 2 | language: bash 3 | addons: 4 | apt: 5 | packages: 6 | - aria2 7 | - zip 8 | - unzip 9 | script: 10 | - source ./env.sh 11 | - "${DLR} ${ROOTFS_URL} -o ${ROOTFS_TXZ}" 12 | - "${DLR} ${LNCR_URL} -o ${LNCR_ZIP}" 13 | - 14 | - unzip ${LNCR_ZIP} ${LNCR_FN} 15 | - 16 | - mkdir rootfs 17 | - sudo tar xf ${ROOTFS_TXZ} -C ./rootfs 18 | - 19 | - echo "# This file was automatically generated by WSL. To stop automatic generation 20 | of this file, remove this line." | sudo tee ./rootfs/etc/resolv.conf 21 | - 22 | - cd rootfs 23 | - sudo tar -zcpf ../rootfs.tar.gz --hard-dereference * 24 | - cd .. 25 | - 26 | - mkdir out 27 | - mv -f ${LNCR_FN} ./out/ 28 | - mv -f rootfs.tar.gz ./out/ 29 | - cd out 30 | - zip Clear.zip * 31 | - cd .. 32 | notifications: 33 | email: false 34 | deploy: 35 | provider: releases 36 | api_key: 37 | secure: 0V4OswSYOn9bpxKMRJN0oxU4yTvkr6YHiJ/69HYl9pay3Z3onBdl5pQWfa/HyQgVpS/uCPK+DfoIMmc2oBa9nRqz0L6wCnlsvTutryKGf6M5fbsq/YiCAvAX3ItNQ2lb1oUwc7QDkXspGfLT9VqXbgGQoETSfq9yMuTHnDXuAP14/T+GojFkylFNDHvUCAh8j/s4oAqiP+4IMFe8YNOMSGJ42ms5EazFATtbqYaf+7lF3DrCL32yKY7gQkadvnKMMcACqO16v/50iujc5n7xIiJ90uqVgUJcRTNvVPwUIF9DQCqKhBb2go/d/5aqbP/+RmVAjlbUPr4O3t0QmuBNIG76GFinsp5J2wxtWDkPPAQZIXyJmVosgviPj0i40Z5M5U31+ael+3Bya0ew/Xn7YMOfkiH3NMDYxFOp3mzy2TM2KfXyOiETssd5DOdB8QnVEgTe6mhIYTJtbKiHgjmp9jQQ/5eHXGkMmIt82Ca/b0UTEtW5atvQ8Wzl2MHwzqaxnt4ORjVnuO9E/QxNNJsxaf6f9ytgHbY2HXVtaPjFzemAI7/LeWYKkkEdZvg+Mx5XzNlIiAkJipBPwxwA2VsJ9OwnPkka+1edqWLU6bD8tADq3bXJLol78F8ZcAK2pme/J/Xfuj9zD+qXfikARP1OfO9tfoIZ5ltM/vBzOgzEEmE= 38 | file: out/Clear.zip 39 | on: 40 | repo: wight554/ClearWSL 41 | tags: true 42 | all_branches: true 43 | skip_cleanup: true -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017-2019 wight554 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ClearWSL 2 | Clear Linux on WSL (Windows 10 FCU or later) 3 | based on [wsldl](https://github.com/yuk7/wsldl) 4 | 5 | ![screenshot](https://raw.githubusercontent.com/wiki/yuk7/wsldl/img/Cent_Arch_Alpine.png) 6 | [![Build Status](https://img.shields.io/travis/com/wight554/ClearWSL.svg?style=flat-square)](https://travis-ci.com/wight554/ClearWSL) 7 | [![Github All Releases](https://img.shields.io/github/downloads/wight554/ClearWSL/total.svg?style=flat-square)](https://github.com/wight554/ClearWSL/releases/latest) 8 | [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com) 9 | ![License](https://img.shields.io/github/license/wight554/ClearWSL.svg?style=flat-square) 10 | 11 | ### [Download](https://github.com/wight554/ClearWSL/releases/latest) 12 | 13 | 14 | ## Requirements 15 | * Windows 10 Fall Creators Update x64 or later. 16 | * Windows Subsystem for Linux feature is enabled. 17 | 18 | ## Install 19 | #### 1. [Download](https://github.com/wight554/ClearWSL/releases/latest) installer zip 20 | 21 | #### 2. Extract all files in zip file to same directory 22 | 23 | #### 3.Run Clear.exe to Extract rootfs and Register to WSL 24 | Exe filename is using to the instance name to register. 25 | If you rename it you can register with a diffrent name and have multiple installs. 26 | 27 | 28 | ## How-to-Use(for Installed Instance) 29 | #### exe Usage 30 | ```dos 31 | Usage : 32 | 33 | - Open a new shell with your default settings. 34 | 35 | run 36 | - Run the given command line in that distro. Inherit current directory. 37 | 38 | config [setting [value]] 39 | - `--default-user `: Set the default user for this distro to 40 | - `--default-uid `: Set the default user uid for this distro to 41 | - `--append-path `: Switch of Append Windows PATH to $PATH 42 | - `--mount-drive `: Switch of Mount drives 43 | 44 | get [setting] 45 | - `--default-uid`: Get the default user uid in this distro 46 | - `--append-path`: Get on/off status of Append Windows PATH to $PATH 47 | - `--mount-drive`: Get on/off status of Mount drives 48 | - `--lxuid`: Get LxUID key for this distro 49 | 50 | backup 51 | - Output backup.tar.gz to the current directory using tar command. 52 | 53 | clean 54 | - Uninstall the distro. 55 | 56 | help 57 | - Print this usage message. 58 | ``` 59 | 60 | 61 | #### How to uninstall instance 62 | ```dos 63 | >Clear.exe clean 64 | 65 | ``` 66 | -------------------------------------------------------------------------------- /env.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ROOTFS_VER="33820" 4 | ROOTFS_TXZ="base.tar.xz" 5 | ROOTFS_SRC="https://raw.githubusercontent.com/clearlinux/docker-brew-clearlinux/" 6 | 7 | LNCR_BLD="20100500" 8 | LNCR_ZIP="icons.zip" 9 | LNCR_FN="Clear.exe" 10 | LNCR_URL="https://github.com/yuk7/wsldl/releases/download/${LNCR_BLD}/${LNCR_ZIP}" 11 | 12 | if type curl >/dev/null 2>&1 ;then 13 | DLR="curl" 14 | fi 15 | if type wget >/dev/null 2>&1;then 16 | DLR="wget" 17 | fi 18 | if type aria2c >/dev/null 2>&1; then 19 | DLR="aria2c -x4" 20 | fi 21 | 22 | if [[ "$(curl ${ROOTFS_SRC}/base/VERSION)" == "${ROOTFS_VER}" ]]; then 23 | ROOTFS_URL="${ROOTFS_SRC}/base/${ROOTFS_TXZ}" 24 | else 25 | ROOTFS_URL="${ROOTFS_SRC}/base-${ROOTFS_VER}/${ROOTFS_TXZ}" 26 | fi 27 | --------------------------------------------------------------------------------