Please read all of this file before starting
This is a very simple (for now) script to set up a NEW UNMODIFIED Windows Subsystem for Linux
(WSL hereafter) with the following functionality :
- Updated to the latest package versions from Ubuntu upstream
- Have the
build-essential
,llvm
,clang
and other packages installed plus all required support libraries to enable the below functionality to work - Enable resolution of WINS hostnames
Git
installed withgit-flow
andgit-lfs
. A skeleton.gitconfig
will be set up with a few aliasesGitHub CLI
Node.js
with npm prefix pointing to~/.local/
Deno.land
with prefix pointing to~/.local/
Rust
compiler and Cargo installed through Rustup.Go
compiler.Python3
interpreter withpip
.- DotNet SDK 6.0 with ASP .Net Core and Powershell Core
- Network tools like
nmap
,ncat
,mosh
,curl
,wget
- Fish shell using Starship prompt with OhMyFish and profile loading with
foreign-env
- Various shell tools like:
sd
,hx
,fd
,exa
,bat
,ripgrep
,procs
- Various dev tools like:
jq
,hyperfine
,tokei
- Various bash, fish and pwsh tunnings to have same prompts, aliases, profiles and configs
- Installed https://cht.sh/.`
Starship
installed and set as the shell prompt forbash
,fish
andpwsh
.K0s
local Kubernets clusterK9s
installed to manage the K0s cluster
Note also since WSL is basically just a standard Ubuntu installation this script should also work unmodified on an Ubuntu Distribution, though currently untested.
Some changes have been made to make it easy to add enviroment variables.
The user .profile
have been changed to source ~/.config/shell/profile.d/*.sh
.
Bash .bashrc
have been changed to source ~/.config/bash/rc.d/*.sh
.
Fish profile.fish
sources ~/.profile
through fenv to use the same enviroment variables.
Powershell profile.ps1
have been changed to source ~/.config/powershell/profile.d/*.ps1
and load custom formats from ~/.config/powershell/formats.d/*.ps1xml
.
The Windows host to WSL is changed to enable the following features.
- Enable UNC paths at cmd.exe to allow access to
\\$wsl\
.- Editing
HKCU\Software\Microsoft\Command Processor\DisableUNCCheck
- Editing
- Enable Windows LongPath support breaking very old Win32 compatibility.
- Editing
HKLM\SYSTEM\CurrentControlSet\Control\FileSystem\LongPathsEnabled
.
- Editing
The simplest way to use this script is to clone into a completely new WSL environment.
From within WSL run the following:
git clone https://github.com/brunoschmidt/ubuntu-win-bootstrap.git
cd ubuntu-win-bootstrap
./bootstrap.sh
Single Line Version:
curl https://raw.githubusercontent.com/brunoschmidt/ubuntu-win-bootstrap/master/bootstrap.sh | bash