Enable the kernel and your shell to produce usable core files so you can reproduce crashes with a debugger. 23.01.2026 | reading time: 3 min A core dump is a snapshot of a process memory image at the moment it crashed; having one can turn an intermittent, mysterious failure into a reproducible debugging session using gdb. Verify current state and prepare the system First check what the kernel will do by default and allow the shell to create unlimited core files: run `cat /proc/sys/kernel/core_pattern` to see if cores are piped to systemd, then run `ulimit -c unlimited` to enable core file creation for the current shell; if systemd intercepts cores you can inspect stored dumps with `coredumpctl` or change `kernel.core_pattern` to a simple filename for writable cores. Hands-on: create and analyze a crash ```bash cat > crash.c <<'EOF' #include <stdio.h> int main() { int *p = 0; *p = 42; return 0; } EOF gcc -g -o crash crash.c ulimit -c unlimited sudo sysctl -w kernel.core_pattern=core ./crash ls -lh core || echo "no core file created" file core || true gdb ./crash core -ex "bt" -ex "quit" ``` Important knobs and pitfalls Persist `ulimit` via `/etc/security/limits.conf` for interactive logins or set `LimitCORE=infinity` inside a systemd service file for daemons; remember `kernel.core_pattern` controls file name and location and may pipe to `systemd-coredump`, and watch disk usage since cores can be large; for setuid programs also check `/proc/sys/fs/suid_dumpable` and security policies before enabling dumps. Complementary tools to consider Use `gdb` to inspect executable and core, `coredumpctl` to list systemd-captured dumps, and `valgrind` to detect memory errors that can lead to crashes; each tool fills a different gap in the debugging workflow. Final step and next moves Once you can reliably produce and load core files you can script reproducible analyses, add automated collection on crash, and reduce time-to-fix; keep exploring kernel parameters and systemd integration to adapt behavior for servers or developer machines and consider formal study like CompTIA Linux+ or LPIC-1 with intensive exam preparation at bitsandbytes.academy to deepen your skills. Join Bits & Bytes Academy First class LINUX exam preparation. troubleshooting processes infrastructure