william

Keep Calm and Markdown.

Linux coredump 设置

注意:需要有普通用户写入权限的路径。

1
2
3
4
5
6
7
8
## 查看当前配置
cat /proc/sys/kernel/core_pattern

## 临时
echo "/tmp/core-%e-%p-%t" > /proc/sys/kernel/core_pattern

## 使用 sysctl 设置
sysctl -w kernel.core_pattern=/tmp/core-%e-%p-%t
  • %% 单个%字符
  • %p 所dump进程的进程ID
  • %u 所dump进程的实际用户ID
  • %g 所dump进程的实际组ID
  • %s 导致本次core dump的信号
  • %t core dump的时间 (由1970年1月1日计起的秒数)
  • %h 主机名
  • %e 程序文件名

systemd 学习

Linux systemd 学习总结

simple vs oneshot:

When you are deciding which service type to choose between simple and oneshot, here is some guidance:

  • Does your service need to complete before any follow-up services run? Use oneshot.
  • Do your follow-up services need to be running while this service does? Use simple.
  • Is this a long-running service? Probably use simple.
  • Do you need to run this service only at shutdown? Use oneshot.
  • Do you need to have multiple separate commands to run? Use oneshot.

Ubuntu 设置 flameshot 快捷键

  1. 使用 Win 键调出 keyboard 设置界面
  2. Custom Shortcuts 点击添加 flameshot,其中 Name 可以自己写,然后在 Command 填写: /usr/bin/flameshot gui update: /usr/bin/flatpak run –branch=stable –arch=x86_64 –command=flameshot org.flameshot.Flameshot launcher
  3. 添加快捷键为 PrtScr
  4. 这样,就可以用键盘上面的截屏工具进行截图了

参考:How to change screenshot application to Flameshot on Ubuntu 18.04?

0%