Windows Subsystem Linux

Posted

Setup notes for running current Debian (9.5 at this writing) on Windows Subssytem for Linux (WSL).

Pre-requisites

WSL requires Windows 10 Pro or higher. Press Windows key, type system and select System Information to verify.

Enable WSL on Windows

Follow: https://docs.microsoft.com/en-us/windows/wsl/install-win10

You’ll need to restart your machine.

Install Debian

Press Windows key, type store and select Microsoft Store. Within Store search for Debian. Get it.

Once downloaded run Debian from the Windows start menu. The first start will cause Debian to install - it’s quite fast.

Install some must haves

wget is already installed. curl in addition to being a useful dev tool will also install ca-certificates as a byproduct.

sudo apt-get install curl openssl git man

Install your preferences / optional

Neovim

Using Go language support in Neovim as opposed to stock vim. This appimage is more up to date than the release available from apt-get.

Appimages need FUSE to run, but FUSE isn’t a supported file system on WSL at this writing. So, we’ll extract the appimage to ~/appimages

cd ~
mkdir -p appimages
cd appimages
curl -LO https://github.com/neovim/neovim/releases/download/nightly/nvim.appimage
chmod +x nvim.appimage
./nvim.appimage --appimage-extract
mv squashfs-root nvim
cd ~
mkdir -p bin
cd bin
ln -s ../appimages/nvim/AppRun nvim
cd ~
echo 'alias vim="nvim"' >> ~/.bash_aliases

Open a new Debian window and your PATH should now include ~/bin and vim will be aliased to nvim. Try it:

vim

tmux

I miss the ultra simple and fast dwm window manager; trying to live within tmux, something I’ve used for years on remote servers. Not the same but maybe.

sudo apt-get install tmux

ssh

sudo apt-get install openssh-client
# generate your keys
ssh-keygen -t rsa
# copy them to a remote server

Go

###