diff --git a/src/content/blog/windows-ddev-setup.md b/src/content/blog/windows-ddev-setup.md index 89e2dd91..1f047440 100644 --- a/src/content/blog/windows-ddev-setup.md +++ b/src/content/blog/windows-ddev-setup.md @@ -31,9 +31,9 @@ Two recent Windows machines I set up were the new ARM64/Qualcomm/CoPilot variety 6. In PowerShell, `wsl --install` and `wsl --update` 7. Windows Terminal is a fantastic terminal and is installed by default these days. I always set it up early with "Default Terminal Application: Windows Terminal" and "Interaction->Automatically Copy Selection to Clipboard", and set Ubuntu as default, and have it auto-start on login. 8. Once Ubuntu is installed: - - `sudo apt update && sudo apt install -y apt-transport-https autojump build-essential ca-certificates ccache clang curl dirmngr etckeeper expect git gnupg jq libcurl4-gnutls-dev libnss3-tools lsb-release mariadb-client nagios-plugins net-tools postgresql-client unzip vim xdg-utils zip` - - sudo snap install —classic go - - sudo snap install ngrok and ngrok config add-authtoken + - `sudo apt update && sudo apt install -y apt-transport-https autojump build-essential ca-certificates ccache clang curl dirmngr etckeeper expect git gnupg jq libcurl4-gnutls-dev libnss3-tools lsb-release mariadb-client nagios-plugins net-tools postgresql-client unzip vim xdg-utils zip && sudo apt upgrade -y` + - `sudo snap install --classic go` + - `sudo snap install ngrok and ngrok config add-authtoken ` 9. In Windows Explorer, add my WSL2 home directory to favorites by copying it into the favorites area. 10. Run the [DDEV WSL2 install script](https://ddev.readthedocs.io/en/stable/users/install/ddev-installation/#wsl2-docker-ce-inside-install-script). * On ARM64 this will fail the Chocolatey installation because Chocolatey doesn't plan to support ARM64. But you can ignore the failure; the script continues on anyway. @@ -42,16 +42,16 @@ Two recent Windows machines I set up were the new ARM64/Qualcomm/CoPilot variety 11. Install and test the fantastic [1Password ssh agent](https://developer.1password.com/docs/ssh/agent/). 12. On Windows PowerShell `ssh git@github.com git@github.com` to verify that the 1Password SSH agent is working. If it says "PTY Allocation Failed", just hit `` and ignore it. You should get the confirmation message from GitHub. 13. 1Password WSL2 adaptation: - `sudo ln -s /mnt/c/WINDOWS/System32/OpenSSH//ssh.exe /usr/local/bin/ssh && sudo ln -s /mnt/c/WINDOWS/System32/OpenSSH//ssh-add.exe /usr/local/bin/ssh-add` (Makes ssh use `ssh.exe` on Windows and the 1Password SSH and Git integrations then work great. This assumes that `/usr/local/bin` in your PATH comes before `/usr/bin`) -14. If you have a `dotfiles` repository (containing your shared `.bash_profile`, `.zshrc`, etc.) clone it into your projects directory on WSL2 your WSL2 home directory. + `sudo ln -s /mnt/c/WINDOWS/System32/OpenSSH/ssh.exe /usr/local/bin/ssh && sudo ln -s /mnt/c/WINDOWS/System32/OpenSSH/ssh-add.exe /usr/local/bin/ssh-add` (Makes ssh use `ssh.exe` on Windows and the 1Password SSH and Git integrations then work great. This assumes that `/usr/local/bin` in your PATH comes before `/usr/bin`) +14. If you have a `dotfiles` repository (containing your shared `.bash_profile`, `.zshrc`, etc.) clone it in WSL2 . 15. Check out DDEV's code. `mkdir -p ~/workspace && cd ~/workspace && git clone -o upstream git@github.com:ddev/ddev` 16. `echo "capath=/etc/ssl/certs/" >>~/.curlrc` to make Curl work right with `mkcert`. 17. GoLand setup: - - Set GOROOT to /snap/go - - For ARM64 you have to do `go install [github.com/go-delve/delve/cmd/dlv@latest](http://github.com/go-delve/delve/cmd/dlv@latest)` and put this in IDE properties (under help)`dlv.path=//wsl.localhost/Ubuntu/home/rfay/go/bin/dlv`. + - Set `GOROOT` to `/snap/go` + - For ARM64 you have to do `go install github.com/go-delve/delve/cmd/dlv@latest` and put this in IDE properties (under help) `dlv.path=//wsl.localhost/Ubuntu/home/rfay/go/bin/dlv`. 18. DDEV repository setup - Run `.githooks/linkallchecks.sh` - - Install `golangci-lint` for `make staticrequired`: `go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest` ) + - Install `golangci-lint` for `make staticrequired`: `go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest` We'd love to hear your own hints and tips on how you set up a Windows machine (or any other computer!). You can contribute to this article with a [PR to the blog](https://github.com/ddev/ddev.com) or make your suggestions on [Discord](https://discord.com/invite/5wjP76mBJD). We welcome guest blogs too!