change ``bash headers to
``sh
This commit is contained in:
@@ -6,38 +6,38 @@ tags: [ "systemd" ]
|
||||
See a running log of all system messages:
|
||||
|
||||
|
||||
```bash
|
||||
```sh
|
||||
journalctl -f
|
||||
```
|
||||
|
||||
Or just one user:
|
||||
|
||||
```bash
|
||||
```sh
|
||||
journalctl --user -f
|
||||
```
|
||||
|
||||
Or just one unit (`sshd`):
|
||||
|
||||
```bash
|
||||
```sh
|
||||
journalctl -f -u sshd
|
||||
```
|
||||
|
||||
Find errors since November
|
||||
|
||||
```bash
|
||||
```sh
|
||||
journalctl --since=2018-11-01 --grep="EXT4-fs error"
|
||||
```
|
||||
|
||||
Limit size to 2G.
|
||||
|
||||
```bash
|
||||
```sh
|
||||
journalctl --vacuum-size=2G
|
||||
```
|
||||
|
||||
Log the fact that you've installed your own `dnsmasq` on your system to `journalctl`, so that you can notice why your system's broken:
|
||||
|
||||
|
||||
```bash
|
||||
```sh
|
||||
logger "Installed new dnsmasq"
|
||||
sudo journalctl -f
|
||||
```
|
||||
|
@@ -26,7 +26,7 @@ WantedBy=multi-user.target
|
||||
|
||||
After making the new service, systemd requires reloading:
|
||||
|
||||
```bash
|
||||
```sh
|
||||
sudo systemctl daemon-reload
|
||||
```
|
||||
|
||||
|
@@ -2,33 +2,33 @@
|
||||
title: "systemd"
|
||||
tags: [ "systemd" ]
|
||||
---
|
||||
```bash
|
||||
```sh
|
||||
systemctl list-units
|
||||
```
|
||||
|
||||
```bash
|
||||
```sh
|
||||
sudo systemctl status mpd
|
||||
```
|
||||
|
||||
```bash
|
||||
```sh
|
||||
sudo systemctl daemon-reload
|
||||
```
|
||||
|
||||
```bash
|
||||
```sh
|
||||
sudo systemctl taskd.service start
|
||||
```
|
||||
|
||||
```bash
|
||||
```sh
|
||||
sudo systemctl status taskd.service
|
||||
```
|
||||
|
||||
# Startup
|
||||
|
||||
```bash
|
||||
```sh
|
||||
sudo systemd-analyze
|
||||
```
|
||||
|
||||
```bash
|
||||
```sh
|
||||
sudo systemd-analyze blame
|
||||
```
|
||||
|
||||
|
Reference in New Issue
Block a user