Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

📜 The setup I run on every computer (Linux/macOS/Windows/WSL)

License

NotificationsYou must be signed in to change notification settings

jonz94/dotfiles

Repository files navigation

Pre-Requirements

Linux or WSL

  • Installgit via package manager

macOS

xcode-select --install# or just install entire Xcode from Apple App Store/usr/bin/ruby -e"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Then installgit viabrew
brew install git

Windows

Set-ExecutionPolicy RemoteSigned-scope CurrentUserirm get.scoop.sh| iex
  • Installmingit orgit viascoop

    • mingit: minimal git for Windows
    scoop install mingit
    • git: standard git
    scoop install git

Note for Ubuntu/Linux to install latest git

sudo add-apt-repository ppa:git-core/ppasudo apt update&& sudo apt upgrade -ysudo apt install -y git

Note for WSL 1

  • Create/etc/wsl.conf inside the WSL system

  • Copy the content ofwsl.conf into/etc/wsl.conf

  • Restart WSL via the following powershell command (Administrator permissoin is required):

net stop LxssManager
  • Or usegsudo

    • Installgsudo
    scoop install gsudo
    • Usesudo to get Administrator permission
    sudo net stop LxssManager

Bootstrap

Linux, macOS, and WSL 2

  • 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
  • Executebootstrap.sh viabash

cd ~/dotfiles && bash bootstrap.sh
  • Done 🎉

PowerShell on Windows

  • 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
  • Executebootstrap.ps1 script

    • for powershell version < 7
    cd ~\dotfiles; .\bootstrap.ps1
    • for powershell version >= 7
    cd ~\dotfiles && .\bootstrap.ps1
  • Done 🎉

WSL 1

NOTE: ALL STEP SHOULD BE DONE INSIDE WSL 1!

  • Setumask to 0022
umask 0022
  • Clone this repo to/c/Users/<WindowsUserName>/dotfiles, this will make sure that all the files are save inWindows 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 isDo not change Linux files using Windows apps and tools

If you want to useboth 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.)
  • Executebootstrap.sh viabash to settting up WSL.
cd~/dotfiles&& bash bootstrap.sh
  • Done 🎉

CMD (Command Prompt) on Windows

  1. PressWin +r
  2. Typeregedit and pressEnter
  3. FindHKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor
  4. Add a new Key namedAUTORUN (Type: String)
  5. SetAUTORUN's value to%USERPROFILE%\dotfiles\cmd\jonz94.cmd

[8]ページ先頭

©2009-2025 Movatter.jp