Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install centos via WSL #2

Open
MakerGYT opened this issue Feb 16, 2021 · 0 comments
Open

Install centos via WSL #2

MakerGYT opened this issue Feb 16, 2021 · 0 comments
Labels
linux Operating skills and system analysis

Comments

@MakerGYT
Copy link
Owner

MakerGYT commented Feb 16, 2021

Basic tips

  • windows Version 1903 or higher
  • Enable the "Windows Subsystem for Linux" optional feature,Enable Virtual Machine feature
  • Set WSL 2 as your default version

Note

1. Chocolatey

a software management solution that allows you to manage 100% of your software, anywhere you have Windows, with any endpoint management tool.

# run powershell(administrator), close protection software
Get-ExecutionPolicy
Set-ExecutionPolicy AllSigned
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))

2. LxRunOffline

A full-featured utility for managing Windows Subsystem for Linux (WSL)

choco install lxrunoffline

reopen powershell(administrator)

3. Centos-WSL

wget https://github.com/CentOS/sig-cloud-instance-images/raw/CentOS-7/docker/centos-7-docker.tar.xz
LxRunOffline install -n centos -d E:/centos -f D:\centos-8-x86_64.tar.xz
LxRunOffline.exe list

uninstall

LxRunOffline.exe uninstall -n centos

4. WSL2

wsl -l -v
wsl --set-version centos 2
# start
wsl -d centos
uname -a
cat /proc/version
cat /etc/redhat-release
# stop
wsl --shutdown -n

5. Windows Terminal

open setting, automatically attach when saving

Question

The above centos is not pure, how to use iso to package it yourself

Refrence

@MakerGYT MakerGYT added the linux Operating skills and system analysis label Feb 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
linux Operating skills and system analysis
Projects
None yet
Development

No branches or pull requests

1 participant