拼接版
参考以下做一些补充:
ubuntu20.04 如何生成core文件
vim /etc/profile
# 然后添加命令至profile文件,并保存退出vim:
# ulimit -c unlimited.
# 然后执行以下命令更新配置
source /etc/profile
并在 /lib/systemd/system/systemd-sysctl.service 中将启动用户指定为root
[Service]
User=root
Type=oneshot
RemainAfterExit=yes
ExecStart=/lib/systemd/systemd-sysctl