1、sudo su
2、vim /etc/profile
添加 ulimit -c unlimited
3、在你的主目录下创建core文件夹,比如我在/home/ji下创建core文件夹
4、vim /etc/sysctl.conf
添加
kernel.core_pattern=/home/houdar/core/core_%e_%p_%t
kernel.core_uses_pid=0
说明:
%e 文件名
%p 进程pid
%t 时间
5、reboot 重启电脑