Failed to Fork error with Ubuntu on Windows 10

The Ubuntu terminal may throw out an error – Failed to fork on Windows 10. This terminal gets installed under the feature of Windows Subsystem for Linux. The cause of this error comes down to be lack of memory and can occur when a user is trying to get the latest updates for the terminal. The error reads:

# apt-get update
FATAL -> Failed to fork.

Failed to Fork error with Ubuntu on Windows 10

Failed to Fork error with Ubuntu on Windows 10

If you receive Failed to Fork error with Ubuntu on Windows 10, we suggest you try our following suggestions:

  1. Create a new Swap file.
  2. Disable the Antivirus.

1] Create a new Swap file

Open the Terminal for the Windows Subsystem for Linux distro and enter the following command to create a new swap file and allocate 4 Gigabytes to it:

sudo fallocate -1 4G /swapfile

Make the file more secure by entering this command:

sudo chmod 600 /swapfile

Set the swap space with this command:

sudo mkswap /swapfile

Next, enable the swap space with this command:

sudo swapon /swapfile

Reboot your computer after closing the distro and check. Your error should be fixed.

2] Disable the Antivirus

Your antivirus might be affecting the proper functioning of the activities in the WSL Terminal. We recommend you to temporarily turn the Antivirus solution or Windows Defender off and check if that fixes the error.

Turn it on after the operation completes successfully.

We hope you found the steps easy to follow and you were successful in resolving the issue.

Posted by on , in Category Windows with Tags
Ayush has been a Windows enthusiast since the day he got his first PC with Windows 98SE. He is an active Windows Insider since Day 1 and is now a Windows Insider MVP. He has been testing pre-release services on his Windows 10 PC, Lumia, and Android devices.

Leave a Reply

Your email address will not be published. Required fields are marked *


8 + 3 =