Skip to content

sroepges/wsl-ubuntu-setup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

wsl-ubuntu-setup

Install WSL

Open the Powsershell as admin and run the following command:

wsl --install

Microsoft Docs

(Optional) Install Windows Terminal

via MS Store:

Windows Terminal

via winget:

winget install -e --id Microsoft.WindowsTerminal

Clone the repo and run the setup script

git clone https://github.com/sroepges/wsl-ubuntu-setup.git &&
cd wsl-setup &&
bash run.sh

(Optional) Additional setup

GPG

Generate a new GPG key pair:

gpg --full-generate-key

Please select what kind of key you want: [ENTER]

What keysize do you want? [4096]

Key is valid for? [ENTER]

List the long form of the gpg key pair:

gpg --list-secret-keys --keyid-format=long

Add the gpg key pair to your git config:

git config --global user.signingkey GPG-KEY-ID

If you want to automatically sign your commits use:

git config --global commit.gpgSign true

Add this line to your .zshrc file:

[ -f ~/.zshrc ] && echo 'export GPG_TTY=$(tty)' >> ~/.zshrc
gpg --armor --export GPG-KEY-ID

Now we add the gpg key pair to github in the browser under your settings page.


GPG & VS-Code

If you use WSL in combination with VS-Code, you need to setup the GPG pinentry dialog for Windows.

Install the simple installer of the current GnuPG:

GnuPG - Download Page

GnuPG - Direct Download Link v.2.4.7

Edit the gpg-agent config so it shows the pinentry dialog in Windows:

nano ~/.gnupg/gpg-agent.conf

Paste the following inside:

default-cache-ttl 34560000
max-cache-ttl 34560000
pinentry-program "/mnt/c/Program Files (x86)/gnupg/bin/pinentry-basic.exe"

Restart the gpg agent:

gpgconf --kill gpg-agent

About

Instructions for the initial WSL Setup on Windows using Ubuntu.

Topics

Resources

Stars

Watchers

Forks

Contributors