Linux Disable Core Dumps

https‮w//:‬ww.lautturi.com
Linux Disable Core Dumps

Core dumps are a feature of the Linux operating system that allow the system to create a snapshot of the current state of the operating system and its processes when certain conditions occur, such as a program crashing or an abnormal system event. Core dumps can be useful for debugging and troubleshooting issues on the system, but they can also consume a large amount of disk space if they are not managed properly.

To disable core dumps on a Linux system, you can use the ulimit command to set the maximum size of core dumps to zero. To disable core dumps using the ulimit command, you can run the following command:

$ ulimit -c 0

This command will set the maximum size of core dumps to zero, which will prevent the system from creating core dumps when an abnormal event occurs.

Alternatively, you can edit the /etc/security/limits.conf file to disable core dumps for specific users or groups. To disable core dumps for a specific user, you can add the following line to the limits.conf file:

<user> hard core 0

To disable core dumps for a specific group, you can add the following line to the limits.conf file:

@<group> hard core 0

These are just a few examples of how to disable core dumps on a Linux system. The specific steps may vary depending on the distribution and version of Linux that you are using. You can refer to the documentation for your Linux distribution and the ulimit and limits.conf files for more information on how to disable core dumps on your system.

Created Time:2017-10-29 22:08:53  Author:lautturi