--- title: "How to enable/disable core dumps on Linux" slug: "how-to-enable-core-dumps-on-linux" updated: 2025-12-10T22:19:32Z published: 2025-12-10T22:19:32Z canonical: "docs.swxtch.io/how-to-enable-core-dumps-on-linux" stale: true --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.swxtch.io/llms.txt > Use this file to discover all available pages before exploring further. # How to enable/disable core dumps on Linux Occasionally there can be issues within a VM that the swxtch.io logs do not capture. In this case core dumps will assist in trouble shooting the issue. Caution: Core dumps can take space and should only be enabled when issues occur. To check to see if core dumps are enabled for unlimited, 0 means disabled. ```plaintext ulimit -c ``` Example: ![](https://cdn.document360.io/84c5db44-f675-4f33-a980-5d3fc63073ca/Images/Documentation/image(98).png?sv=2026-02-06&spr=https&st=2026-10-14T13%3A00%3A31Z&se=2026-10-14T14%3A00%3A31Z&sr=c&sp=r&sig=D0vKGq8riXEz2GsATeTgbyugkxq54aqgfATPvD%2FnIC0%3D) To **enable** core dumps to unlimited for the current session: ```plaintext ulimit -c 102400 ``` This will set it to 100MB Limit Warning: -c unlimited can fill up the drive, be sure to disable once the dumps are created and saved off. Result: ![](https://cdn.document360.io/84c5db44-f675-4f33-a980-5d3fc63073ca/Images/Documentation/image(104).png?sv=2026-02-06&spr=https&st=2026-10-14T13%3A00%3A31Z&se=2026-10-14T14%3A00%3A31Z&sr=c&sp=r&sig=D0vKGq8riXEz2GsATeTgbyugkxq54aqgfATPvD%2FnIC0%3D) **To disable:** ```plaintext ulimit -c 0 ``` **To enable permanently** ```plaintext sudo nano /etc/security/limits.conf ``` **Add lines for non-specific user:** ```plaintext *               soft    core            fsize 51200 *               hard    core            fsize 51200 ``` The `*` applies to all users. You can also specify individual users or groups instead. **fsize** - maximum file size (KB). In place of fsize you can also set to Unlimited, but this could fill up your drive. **For specific user:** ```plaintext username        soft    core            fsize 51200 username        hard    core            fsize 51200 ``` **fsize** - maximum file size (KB). In place of fsize you can also set to Unlimited, but this could fill up your drive. To disable, remove lines. **Reboot** for it to take place. **To find a core dump:** Check the current working directory. If no specific configuration is in place, search the directory where the crashing program was executed. Check /var/spool/abrt: On RHEL systems, check this directory. Check /var/lib/apport/coredump: On Ubuntu/Debian, check this location. Examine kernel.core_pattern to see if a custom path has been set. ```plaintext cat /proc/sys/kernel/core_pattern ``` Example: ![](https://cdn.document360.io/84c5db44-f675-4f33-a980-5d3fc63073ca/Images/Documentation/image(101).png?sv=2026-02-06&spr=https&st=2026-10-14T13%3A00%3A31Z&se=2026-10-14T14%3A00%3A31Z&sr=c&sp=r&sig=D0vKGq8riXEz2GsATeTgbyugkxq54aqgfATPvD%2FnIC0%3D)