- Install
git
via package manager
- Install
Homebrew
xcode-select --install
# or just install entire Xcode from Apple App Store
/usr/bin/ruby -e "$(curl -fsSL https://github.com/raw/Homebrew/install/master/install)"
- Then install
git
viabrew
brew install git
- Install
scoop
via powershell
Set-ExecutionPolicy RemoteSigned -scope CurrentUser
irm get.scoop.sh | iex
-
Install
mingit
orgit
viascoop
mingit
: minimal git for Windows
scoop install mingit
git
: standard git
scoop install git
- Latest
git
can be installed via git-core ppa
sudo add-apt-repository ppa:git-core/ppa
sudo apt update && sudo apt upgrade -y
sudo apt install -y git
-
Create
/etc/wsl.conf
inside the WSL system -
Copy the content of wsl.conf into
/etc/wsl.conf
-
Restart WSL via the following powershell command (Administrator permissoin is required):
net stop LxssManager
-
Or use gsudo
- Install
gsudo
scoop install gsudo
- Use
sudo
to get Administrator permission
sudo net stop LxssManager
- Install
-
Clone this repo to your
~/dotfiles
- via https
git clone https://github.com/jonz94/dotfiles.git ~/dotfiles
- or via ssh
git clone git@github.com:jonz94/dotfiles.git ~/dotfiles
-
Execute
bootstrap.sh
viabash
cd ~/dotfiles && bash bootstrap.sh
- Done π
-
Clone this repo to
$HOME\dotflies
- via https
git clone https://github.com/jonz94/dotfiles.git $HOME\dotfiles
- or via ssh
git clone git@github.com:jonz94/dotfiles.git $HOME\dotfiles
-
Execute
bootstrap.ps1
script- for powershell version < 7
cd ~\dotfiles; .\bootstrap.ps1
- for powershell version >= 7
cd ~\dotfiles && .\bootstrap.ps1
-
Done π
NOTE: ALL STEP SHOULD BE DONE INSIDE WSL 1!
- Set
umask
to 0022
umask 0022
-
Clone this repo to
/c/Users/<WindowsUserName>/dotfiles
, this will make sure that all the files are save in Windows file system, also make sure that all files are usingLF
as EOL.- via https
git clone https://github.com/jonz94/dotfiles.git /c/Users/$(powershell.exe '$env:USERNAME' | tr -d $'\r')/dotfiles
- or via ssh
git clone git@github.com:jonz94/dotfiles.git /c/Users/$(powershell.exe '$env:USERNAME' | tr -d $'\r')/dotfiles
-
In WSL 1, create a symbolic link via following command:
ln -s /c/Users/$(powershell.exe '$env:USERNAME' | tr -d $'\r')/dotfiles ~/dotfiles
These step are important! And the reason is Do not change Linux files using Windows apps and tools
If you want to use both Windows Tools and Linux Tools to changing some files or directories in WSL. The solution I found is:
- Put those thing in Windows file system. (This makes Windows Tools happy.)
- In WSL, create a symbolic link which points to file/directory in Windows file system. (This makes Linux Tools happy.)
- Execute
bootstrap.sh
viabash
to settting up WSL.
cd ~/dotfiles && bash bootstrap.sh
- Done π
- Press Win + r
- Type
regedit
and press Enter - Find
HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor
- Add a new Key named
AUTORUN
(Type: String) - Set
AUTORUN
's value to%USERPROFILE%\dotfiles\cmd\jonz94.cmd