Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/scottmckendry/ps-arch-wsl
Install Arch on Windows the easy way
https://github.com/scottmckendry/ps-arch-wsl
archlinux powershell wsl
Last synced: about 4 hours ago
JSON representation
Install Arch on Windows the easy way
- Host: GitHub
- URL: https://github.com/scottmckendry/ps-arch-wsl
- Owner: scottmckendry
- License: mit
- Created: 2024-05-19T18:56:40.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-05-25T01:39:20.000Z (9 months ago)
- Last Synced: 2024-12-10T17:17:57.269Z (about 2 months ago)
- Topics: archlinux, powershell, wsl
- Language: PowerShell
- Homepage: https://powershellgallery.com/packages/ps-arch-wsl
- Size: 22.5 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
A simple PowerShell module to aid in the installation of Arch Linux on Windows Subsystem for Linux (WSL).
Uses the pre-built distribution available from [yuk7's GitHub](https://github.com/yuk7/ArchWSL).
Automates the installation process by:
- Installing yuk7's signing key to the local machine's trusted keys.
- Downloads and installs the appx package from the latest release.
- Initialises the pacman keyring and updates the system.
- Installs the `git` and `base-devel` packages.
- Optionally creates a new user account and sets the password (Using a `PSCredential` object).
- Optionally runs a post-install script to perform any additional configuration.## 📦 Installation
```powershell
Install-Module -Name ps-arch-wsl
```## 🚀 Usage
Install with the default configuration (`root` user account only, no post-install script):
```powershell
# Must be run as an administrator
Install-ArchWSL
```Uninstall:
```powershell
Uninstall-ArchWSL
```## 🧙♂️ Advanced Usage
Install with a custom user account and post-install script:
> [!TIP]
> The post-install script must be a relative path to the script file from the current working directory.```bash
#!/bin/bash
# post-install.sh
cd ~
mkdir git && cd git
git clone https://github.com/scottmckendry/dots && cd dots
./setup.sh
``````powershell
#requires -RunAsAdministrator
$Credential = Get-Credential -UserName "scott"
Install-ArchWSL -Credential $Credential -PostInstallScript "./post-install.sh"
```[Example in my personal dotfiles](https://github.com/scottmckendry/Windots/tree/main/wsl)