1
0
Fork 0
knowledge-base/KB/Linux/Desktop/systemd.md

36 lines
765 B
Markdown
Raw Normal View History

2022-09-04 12:54:22 +00:00
---
creation date: 2022-01-08
tags: [note,systemd,linux,archlinux]
---
# systemd
Arch Wiki reference: https://wiki.archlinux.org/index.php/Systemd/
## Taming the journal's size
Systemd's system journal's size can go out of control. There are some things you can do to keep it in control:
```shell
journalctl --vacuum-size=512M
journalctl --vacuum-time=4weeks
```
## Forwarding the journal to /dev/tty12
**You really want this? It's basically a leak available with a shortcut.**
This is very simple. Just create the file `/etc/systemd/journald.conf.d/fw-tty12.conf` and fill it like this:
```shell
[Journal]
ForwardToConsole=yes
TTYPath=/dev/tty12
MaxLevelConsole=info
```
Then, restart the service:
```shell
systemctl restart systemd-journald.service
```