Skip to content

A very simple bootstrap script to install some development tools to the Windows 10 Ubuntu Bash system - Ruby, Perl, Python, Node, Sublime Text and more!

Notifications You must be signed in to change notification settings

brunoschmidt/ubuntu-win-bootstrap

 
 

Repository files navigation

Bootstrap script for the Windows Subsystem for Linux (WSL)

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 with git-flow and git-lfs. A skeleton .gitconfig will be set up with a few aliases
  • GitHub 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 with pip.
  • 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 for bash, fish and pwsh.
  • K0s local Kubernets cluster
  • K9s 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.

Shell enviroment changes

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.

Host Windows changes

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
  • Enable Windows LongPath support breaking very old Win32 compatibility.
    • Editing HKLM\SYSTEM\CurrentControlSet\Control\FileSystem\LongPathsEnabled.

Usage

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

About

A very simple bootstrap script to install some development tools to the Windows 10 Ubuntu Bash system - Ruby, Perl, Python, Node, Sublime Text and more!

Resources

Stars

Watchers

Forks

Languages

  • Shell 83.3%
  • PowerShell 16.7%