Add certificate into WSL

December 29, 2020

I’ve recently been playing with WSL2, and one of the things that quickly bites you, is trying to move between your Linux distribution, and the main Windows system. In this particular instance, I had a certificate that I needed to apply to the WSL system.

The process turns out to be as follows

Copy cert to ```


For example, say your certificate was here:


You can copy this inside the WSL:

cp /mnt/c/tmp/mycert.cer /usr/local/share/ca-certificates

Once you've copied it here, run the update-ca-certificates command:

sudo update-ca-certificates

If it works, your certificate will be here:


# Notes

This was done on an Ubuntu distribution, but I'm not aware it would change based on that.

# References


Profile picture

A blog about one man's journey through code… and some pictures of the Peak District

© Paul Michaels 2024