The Silent Disk Fillers
In Ubuntu (and Linux systems in general), when an application crashes due to a severe error (like a segmentation fault), the operating system can generate a “core dump.” A core dump is a massive file containing the exact state of the program’s working memory at the exact moment it crashed. Developers use these files for deep debugging. However, for everyday users, these automatic core dumps are entirely useless. Worse, because they mirror RAM usage, a single core dump from a heavy application like a web browser or a game can consume several gigabytes of storage space. If a background process is crashing repeatedly, Ubuntu can automatically generate dozens of these files, silently filling up your root partition until the system grinds to a halt.
Setting Core Dump Limits to Zero
To stop Ubuntu from automatically creating these massive core dump files when applications crash, you need to configure the system limits (`ulimit`) to restrict the maximum allowable size of a core file to zero bytes.
Open your terminal app (`Ctrl + Alt + T`). You need to edit the system-wide security limits configuration file. Run the following command with root privileges: sudo nano /etc/security/limits.conf. Scroll to the very bottom of this text file, past all the commented lines (lines starting with `#`). You need to add a new rule that applies to all users. Type the following line exactly as shown: * hard core 0. (The asterisk means all users, ‘hard’ means the strict limit, ‘core’ refers to the core dump file, and ‘0’ sets the maximum size to zero kilobytes). Press Ctrl + O (the letter O, not zero) then Enter to save the file, and Ctrl + X to exit the nano editor. For this change to take effect globally, you must completely restart your Ubuntu machine. After the reboot, if an app crashes, the system will be physically blocked from writing a core dump to your disk.