WSL Setup
There seem to even newer notes of mine here and here. However I’ve stopped using WSL and now have dual-booted Fedora. I spent two years using WSL and came to the conclusion that it is not worth tackling WSL issues, even with GUI support. I still commend the efforts WSL and WSL GUI team did.
For Windows 11
- In Powershell:
sudo wsl --install
You can get sudo
pkg from scoop.
Restart your computer.
- Open Windows Terminal, and wait for installation to complete.
A new tab would open. Type in credentials and then close and reopen Terminal.
Do:
sudo apt update
sudo apt full-upgrade
-
Install make, xclip, ghq (using
curl -sf https://gobinaries.com/x-motemen/ghq | sh
, ignore sudo error), setup ssh using github docs -
Download dotfiles. cd into dotfiles folder and do
stow kitty -t ~
for each folder wherekitty
refers to all folders (git, nvim, etc.) except.git
-
Create
/etc/wsl.conf
and fill it with these contents:
[interop]
enabled=false
appendwindowspath=false
^ actually here, you can keep enabled=true. Make it enabled, and disable it if you get any issues
- Open bashrc and append:
PATH=$(/usr/bin/printenv PATH | /usr/bin/perl -ne 'print join(":", grep { !/\/mnt\/[a-z]/ } split(/:/));')
Close WSL tabs and in Powershell tab write wsl --shutdown
. Open a new WSL tab.
- Install fish shell
sudo apt-add-repository ppa:fish-shell/release-3
sudo apt update
sudo apt install fish
Make it default using chsh
(/usr/bin/fish
)
- Open new WSL terminal
Install Sublime Merge Install fzf Install ripgrep Install fd (sudo apt install fd-find)
mkdir ~/.local/bin
ln -s (which fdfind) ~/.local/bin/fd
^ you need to use $
before (which fdfind
if you are running this command on bash.
- Add minimize maximize buttons to windows
gsettings set org.gnome.desktop.wm.preferences button-layout ":minimize,maximize,close"
-
Run
fisher update
. Fisher might update pkgs files. Commit them (dotfiles folder). Check if ctrl+r works -
Install node with mklement0/n-install using automated (without confirmation prompt):
curl -L https://git.io/n-install | bash -s -- -y
This would append a line in config.fish. If this line is same as the originally insterted one in the file, then discard it. Otherwise replace it with the old one.
Open a new tab and check node version using node -v
.
- Install
build-essential
sudo apt-get install --reinstall build-essential
- Install pulse audio to hear audio and alsa-utils to use aplay to play audio
sudo apt install pulseaudio
sudo apt install alsa-utils
^ See https://github.com/microsoft/wslg/issues/29#issuecomment-879909577
Neovim
- Download nvim appimage from github and put it under
~/execs
. dochmod +x <filename>
on it. - Type
v
and enter to open neovim. - run
:PlugInstall
- Close neovim and open it again
- Treesitter might install stuff. Reopen vim once its done
- Type
:Redir messages
to see all current errors
Install go
sudo tar -C /usr/local -xzf go<latest-version>.tar.gz
export PATH=$PATH:/usr/local/go/bin # its already in your fish config
Remove go → sudo rm -rf /usr/local/go