Skip to content

scottmckendry/ps-arch-wsl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

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

Install-Module -Name ps-arch-wsl

🚀 Usage

Install with the default configuration (root user account only, no post-install script):

# Must be run as an administrator
Install-ArchWSL

Uninstall:

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.

#!/bin/bash
# post-install.sh
cd ~
mkdir git && cd git
git clone https://github.com/scottmckendry/dots && cd dots
./setup.sh
#requires -RunAsAdministrator
$Credential = Get-Credential -UserName "scott"
Install-ArchWSL -Credential $Credential -PostInstallScript "./post-install.sh"

Example in my personal dotfiles