These are the dotfiles I personally use for my WSL set up for Ubuntu.
The following are my system versions. Newer systems should be able to use a similar dotfiles setup as mine without issues.
| Host OS | Windows 11 Pro (Build 22622.575) |
| WSL2 version | 0.65.3.0 |
| Linux version | 5.15.57.1-microsoft-standard-WSL2 |
| Linux distro | Ubuntu 22.04.1 LTS |
The rationale for this repo is for me to easily replicate the same dev environment setup whenever a new version of Ubuntu is released for WSL, as I prefer to have a clean installation to running do-release-upgrade.
I mainly use WSL for web and Flutter development. For web development, I'm able to use Docker to make sure the dev environment for each projects are reproducible consistently. However, for Flutter, it's not feasible to use a Dockerized setup for each project and thus a big part of these dotfiles are about Flutter environment setup.
- Minimal Android SDK setup without Android Studio. Use
sdkmanagerto install new platform SDK or tools - Latest Flutter SDK installed via
fvm nalaas a faster alternative toapthomebrewas an alternative package managergit-deltaas a bettergit diffpager with code differences highlighted in colorsugitas a handy shortcut to undo the last git command- Latest Node installed via
nvm pnpmas an alternative package manager for Node alongside withnpm- Easily launch VS Code in Windows with remote connection to WSL environment via
codecommand - Ability to run Flutter web projects on Microsoft Edge in Windows
- Neat and sensible
$PATHwithout paths copied from Windows - Bash prompt with
starship - OpenJDK 17 as the Java runtime for Android tools and JDK environment for Android dev
neofetchand custom MOTD with it
If you wish to set up your Ubuntu in WSL2 in a similar way as mine, you should first fork this repository.
Then, replace my name and email in .gitconfig. You may also make changes to any other files according to your preference.
- To set up the dotfiles in WSL Ubuntu, first install yadm
sudo apt install yadmTo install the dotfiles as-is, run:
yadm clone https://github.com/glsee/dotfiles-wsl --no-bootstrapIt's likely that some local files like .profile and .bashrc already exist and yadm won't overwrite them.
To overwrite the files, run the following command:
yadm checkout "/home/kaiden"Next, run the following command to run the bootstrap scripts:
yadm bootstrapOnce finished, relaunch the shell to enjoy. Alternatively, run the following command to reload the shell profile:
source ~/.profileFor more details on how to make changes on the bootstrap scripts, refer to yadm documentation