Overview
When using Windows Subsystem for Linux (WSL), applications running inside Ubuntu maintain their own certificate trust store and do not automatically trust certificates installed in Windows.
This can cause issues such as:
- VS Code Server failing to install when running
code . curlcertificate validation errorswgetcertificate validation errors- Package installation failures
- Access issues to internal or corporate websites protected by SSL inspection
This article describes how to identify, export, and trust a corporate certificate from Windows within WSL.
Prerequisites
Prerequisites
- Windows 11
- WSL (Ubuntu)
- Local administrator access (recommended)
Step 1: Identify the Corporate Certificate
Option A: From the Windows Certificate Store
- Press Win + R
- Run: certmgr.msc
- Browse to: Trusted Root Certification Authorities
- Review certificates issued by:
- Your organisation
- Security appliances such as:
- Zscaler
- Fortinet
- Palo Alto
- Netskope
- Cisco Umbrella
- Symantec
- CrowdStrike
- Other corporate security products
- Locate the certificate that corresponds to your corporate security infrastructure.
Option B: From Microsoft Edge
If you're unsure which certificate is being used:
- Open a website experiencing certificate issues.
- Click the padlock icon in the address bar.
- Select: Connection is secure
- View the certificate details.
- Note the root or intermediate certificate issuer.
Step 2: Export the Certificate
- In certmgr.msc, locate the required certificate.
- Right-click the certificate.
- Select: All Tasks > Export
- Choose: No, do not export the private key
- Select format: Base-64 encoded X.509 (.CER)
- Save the certificate to: C:\temp
- Example: C:\temp\company-root.cer
Step 3: Copy the Certificate into WSL
Open Ubuntu.
Verify the certificate is visible: ls /mnt/c/temp/company-root.cer
Copy it to Ubuntu's local certificate directory:
sudo cp /mnt/c/temp/company-root.cer \ /usr/local/share/ca-certificates/company-root.crt
Note: Ubuntu expects trusted certificates to use the .crt extension.
Step 5: Update the Ubuntu Trust Store
Run: sudo update-ca-certificates
Expected output:
Updating certificates in /etc/ssl/certs...1 added, 0 removeddone.