How To Fix: Failed to fork on WSL with Ubuntu

Updated September 2023: Stop getting error messages and slow down your system with our optimization tool. Get it now at this link
  1. Download and install the repair tool here.
  2. Let it scan your computer.
  3. The tool will then repair your computer.

WSL (Windows Subsystem for Linux) is a compatibility layer used to run Linux binaries on Windows 10. The program was introduced in Windows 10 and Windows Server 2019 and has enabled many developers to easily use Linux-based executables on Windows. However, there have been many recent reports of an error “# apt-get update FATAL -> Failed to fork” when trying to update the Ubuntu system.

In general, this message indicates that the apt process is running out of disk space. The fact that Virtualmin has also failed is a good sign that the whole system is running out of steam. Most likely, the database collapsed. You can search for messages outside the memory in /var/log/syslog to confirm this.

Create a new swap file

It is possible that the space on the exchange file has expired, causing the error. Therefore, we will create a new exchange file in this step. For that:

  • Start Ubuntu.
  • Type the following command and press “Enter”.

sudo fallocate -1 4G /swapfile

  • The exchange file is now created, but must still be enabled.
  • To make the file more secure, type the following command and press Enter.

sudo chmod 600 /swapfile

September 2023 Update:

You can now prevent PC problems by using this tool, such as protecting you against file loss and malware. Additionally it is a great way to optimize your computer for maximum performance. The program fixes common errors that might occur on Windows systems with ease - no need for hours of troubleshooting when you have the perfect solution at your fingertips:

  • Step 1 : Download PC Repair & Optimizer Tool (Windows 10, 8, 7, XP, Vista – Microsoft Gold Certified).
  • Step 2 : Click “Start Scan” to find Windows registry issues that could be causing PC problems.
  • Step 3 : Click “Repair All” to fix all issues.


  • Enter the following command to configure the swap space and press “Enter”.

sudo mkswap /swapfile

  • To activate the swap space, enter the following command and press “Enter”.

sudo swapon /swapfile

  • Check if the problem persists after executing these commands.

Disable Windows Defender Antivirus on Windows 10.

To temporarily disable the security function of your device, proceed as follows:

  1. Open Start.
  2. Search for Windows Security and click on the top result to open the experience.
  3. Click on Virus and Threat Protection.
  4. In the Virus and Threat Protection Settings section, click Manage Settings.
  5. Disable the Real-time protection option.

Once these steps are completed, the antivirus program disables real-time protection, allowing you to install applications or perform a specific task that you couldn’t do before because the security function blocked the action.


This is the most frequently requested function of the Windows subsystem. Interoperability between NT and Linux processes is a feature that allows users of the Windows for Linux subsystem to merge and match NT and Linux binaries from the same shell, all running natively on the NT kernel. We briefly discussed LxBus, the underlying IPC mechanism that allows communication between NT and WSL processes. With this knowledge, the authors then discussed the use of LxBus to allow the sharing of NT and VFS file objects between NT and WSL processes.

Expert Tip: This repair tool scans the repositories and replaces corrupt or missing files if none of these methods have worked. It works well in most cases where the problem is due to system corruption. This tool will also optimize your system to maximize performance. It can be downloaded by Clicking Here