I have 5 devices could be called computer of my own: 3 desktops, 1 laptop and 1 MacBook. One of the desktops became my homelab server and NAS. 4 computers for me may be too more to use, but they can make sure anyone of them down, that I can still work.

The motivation to write this article is I want to install Linux on my laptop recently. Its CPU - Intel 8th gen i7-8550U - with terrible effeciency-energy ratio, makes me have no any interesting to use it. Then I spent one week (after work) to install and configure Linux on it. The desktop environments of Linux are not good, even though Gnome and KDE can out-of-box, but I still need to configure more things to make them look great and use conveiniently. I do not want to spend more time on it.

I back to Windows, the familir platform with a more complete DE. With Windows Subsystem for Linux (WSL), I also can developing on Linux environment.

So I wrote this article, for recoding how I setup my development environment. If I have a new device or re-installing OS, I can recover my workspace quickly.

Also, I hope this article can decide my choice of development and production environment.

Step 1: Resolve the network problem

The network problem is a big obstacle in China for any programmer. So the first thing for setup is to resolve the problem. For some reasons, I could not provide the detail of it.

Step 2: Enable WSL on Windows

# Enable the feature of WSL and Virtual Machine Platform
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
# Upgrade WSL
wsl --update
# Install Debian distro
wsl --install Debian

Step 3: Install package manager and git

On Windows

# 1. Allow execution for local script
# 2. Install scoop
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression
# Install git, it will also install the dependency of it: 7-zip
scoop install git

On macOS

Installing Command Line Tools for Xcode is necessary to install third-party package manager.

# after install command line tools, we can use the folloing command to install homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

On Debian

sudo apt update && sudo apt install git curl

Step 4: Setup dotfiles

For Windows(PowerShell)

git clone --depth=1 --bare https://github.com/sotvokun/config "$($env:USERPROFILE\.dotfiles)"
function dot { iex "git --work-tree=$($env:USERPROFILE) --git-dir="$($env:USERPROFILE\.dotfiles)" $($args -join ' ')" }
echo "*" > $env:USERPROFILE/.gitignore
dot checkout


git clone --depth=1 --bare https://github.com/sotvokun/config $HOME/.dotfiles
alias dotfiles='git --work-tree=$HOME --git-dir=$HOME/.dotfiles'
echo "*" > $HOME/.gitignore
dot checkout

Step 5: Install the development kit version manager

The package manager provide the convenient way to install program, but the version management of them are too weak. For developing, I prefer to use the common version manager to manage my development kit.

versionfox (vfox)

versionfox is a cross-platform resolution to manager versions of development kit. It is compatible with asdf-vm.

scoop install vfox


the powerful version manager, asdf-vm only supports the unix-like system. But it is easy to install.

git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.14.0

标签: none