Skip to content

Commit

Permalink
TIL: journalctl
Browse files Browse the repository at this point in the history
  • Loading branch information
pew committed Dec 28, 2024
1 parent 476efc7 commit ce6098e
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 22 deletions.
40 changes: 40 additions & 0 deletions man/journalctl.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
date created: Saturday, December 28th 2024, 11:25:08 am
date modified: Saturday, December 28th 2024, 11:28:03 am
tags:
- systemd
---

# journalctl

the new `/var/log/syslog`

- see also [systemd](systemd.md)

## read journalctl logs

the following flags can usually be combined, so `-f -u <service>` works as well.

**follow all new logs (tail -f):**

```shell
journalctl -f
```

**display last 100 lines and follow new logs:**

```shell
journalctl -n 100 -f
```

**read logs from a specific service/unit:**

```shell
journalctl -u your-name.service
```

**read logs since last boot:**

```shell
journalctl -b
```
24 changes: 2 additions & 22 deletions man/systemd.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
date created: Monday, April 22nd 2019, 6:51:17 pm
date modified: Thursday, December 26th 2024, 11:48:10 am
date modified: Saturday, December 28th 2024, 11:28:13 am
tags:
- systemd
- systemctl
Expand Down Expand Up @@ -85,27 +85,7 @@ resolvectl statistics

## logs: journalctl / systemd journals

### read journalctl logs / syslog

the following flags can usually be combined, so `-f -u <service>` works as well.

**follow all new logs (tail -f):**

```shell
journalctl -f
```

**display last 100 lines and follow new logs:**

```shell
journalctl -n 100 -f
```

**read logs from a specific service/unit:**

```shell
journalctl -u your-name.service
```
- see also: [journalctl](journalctl.md)

### configure journal / log usage

Expand Down

0 comments on commit ce6098e

Please sign in to comment.