# 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 troubleshooting 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: ![Terminal output of ulimit -c showing 0 (core dumps disabled)](../../assets/document360/7c962a1634-image-98.png) 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: ![Terminal output of ulimit -c showing 102400 (core dumps enabled)](../../assets/document360/bac5856e45-image-104.png) ### 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 effect. ### 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: ![Terminal output of cat /proc/sys/kernel/core_pattern showing that core dumps are piped to apport](../../assets/document360/82ba51b70d-image-101.png)