I am trying to find out the reason of crash for one of my Linux application. But I don't know where core is going.

cat /proc/sys/kernel/core_pattern

Any Idea?


2 Answers 2


Systems using systemd are usually configured to dump cores to


You may use the coredumpctl command to list core dumps. See also no-more-coredumps-after-migrating-to-systemd

  • 7
    /var/lib/systemd/coredump/ will not contain any core files unless you have installed systemd-coredump and then re run the program that crashes. Jun 13, 2022 at 13:18

The core dump is written in the current directory of the process at the time of the crash.

Of course core dumps need to be enabled, by default those are usually disabled. Check the output of ulimit -c, if that's 0 then no core file will be written. Run ulimit -c unlimited to enable core dumps; this is a per-process setting which is inherited by processes started by that process.

If a core dump should have been generated but you don't know where, then you could start the process again (if it will without crashing immediately), then check its working directory by doing ls -l /proc/$pid/cwd where $pid is the process ID of the process. That link will point to the current working directory of that process. Chances are the core dump will be there. Otherwise you need to run find on the entire system...

  • 6
    I have checked ulimit -c its unlimited, but still there is nothing in current directory of process.
    – dcds
    Jan 20, 2015 at 8:31
  • 1
    It's possible that the application detected a fatal error itself and aborted, i.e. it's not a "real" crash such as a segmentation violation or similar, which would generate a core dump. As you give no information about the application it's not possible to know.
    – wurtel
    Jan 20, 2015 at 8:35
  • 1
    Its definitely a crash coz I knowingly doing a null pointer.
    – dcds
    Jan 20, 2015 at 9:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .