update systemd
This commit is contained in:
parent
927a163c7f
commit
38e61193f5
19 changed files with 511 additions and 32 deletions
|
@ -92,6 +92,11 @@ Stored in:
|
|||
- `/etc/systemd/system/`: units installed by the system administrator
|
||||
- `~/.config/systemd/user/`: units used by local users
|
||||
|
||||
### User Units
|
||||
Units can run under a user context. These are under the users home directory like `~/.config/systemd/user/` and can be used with `systemctl --user`.
|
||||
|
||||
To run user units even the user is not logged in, enable: `loginctl enable-linger <user>`.
|
||||
|
||||
### Service types
|
||||
There are several different start-up types to consider when writing a custom service file. This is set with the `Type=` parameter in the `[Service]` section:
|
||||
|
||||
|
|
|
@ -3,4 +3,16 @@ obj: application
|
|||
---
|
||||
|
||||
# hostnamectl
|
||||
#wip
|
||||
Query or change system hostname.
|
||||
|
||||
Usage: `hostnamectl [OPTIONS...] COMMAND ...`
|
||||
|
||||
Commands:
|
||||
```
|
||||
status Show current hostname settings
|
||||
hostname [NAME] Get/set system hostname
|
||||
icon-name [NAME] Get/set icon name for host
|
||||
chassis [NAME] Get/set chassis type for host
|
||||
deployment [NAME] Get/set deployment environment for host
|
||||
location [NAME] Get/set location for host
|
||||
```
|
||||
|
|
|
@ -1,6 +1,78 @@
|
|||
---
|
||||
obj: application
|
||||
arch-wiki: https://wiki.archlinux.org/title/Systemd/Journal
|
||||
---
|
||||
|
||||
# journalctl
|
||||
#wip
|
||||
|
||||
systemd has its own logging system called the journal; running a separate logging daemon is not required. To read the log, use `journalctl`.
|
||||
|
||||
## Usage
|
||||
Show all messages matching `PATTERN`:
|
||||
```
|
||||
# journalctl --grep=PATTERN
|
||||
```
|
||||
|
||||
Show all messages from this boot:
|
||||
```
|
||||
# journalctl -b
|
||||
```
|
||||
|
||||
However, often one is interested in messages not from the current, but from the previous boot (e.g. if an unrecoverable system crash happened). This is possible through optional offset parameter of the `-b` flag: `journalctl -b -0` shows messages from the current boot, `journalctl -b -1` from the previous boot, `journalctl -b -2` from the second previous and so on – you can see the list of boots with their numbers by using `journalctl --list-boots`.
|
||||
|
||||
Include explanations of log messages from the message catalog where available:
|
||||
```
|
||||
# journalctl -x
|
||||
```
|
||||
|
||||
Show all messages from date (and optional time):
|
||||
```
|
||||
# journalctl --since="2012-10-30 18:17:16"
|
||||
```
|
||||
|
||||
Show all messages since 20 minutes ago:
|
||||
```
|
||||
# journalctl --since "20 min ago"
|
||||
```
|
||||
|
||||
Follow new messages:
|
||||
```
|
||||
# journalctl -f
|
||||
```
|
||||
|
||||
Show all messages by a specific executable:
|
||||
```
|
||||
# journalctl /usr/lib/systemd/systemd
|
||||
```
|
||||
|
||||
Show all messages by a specific identifier:
|
||||
```
|
||||
# journalctl -t sudo
|
||||
```
|
||||
|
||||
Show all messages by a specific process:
|
||||
```
|
||||
# journalctl _PID=1
|
||||
```
|
||||
|
||||
Show all messages by a specific unit:
|
||||
```
|
||||
# journalctl -u man-db.service
|
||||
```
|
||||
|
||||
Show all messages from user services by a specific unit:
|
||||
```
|
||||
$ journalctl --user -u dbus
|
||||
```
|
||||
|
||||
Show kernel ring buffer:
|
||||
```
|
||||
# journalctl -k
|
||||
```
|
||||
|
||||
Show only error, critical and alert priority messages:
|
||||
```
|
||||
# journalctl -p err..alert
|
||||
```
|
||||
|
||||
You can use numeric log level too, like `journalctl -p 3..1`. If single number/log level is used, `journalctl -p 3`, then all higher priority log levels are also included (i.e. 0 to 3 in this case).
|
||||
|
|
|
@ -3,5 +3,22 @@ obj: application
|
|||
---
|
||||
|
||||
# localectl
|
||||
#wip
|
||||
https://man.archlinux.org/man/localectl.1
|
||||
Query or change system locale and keyboard settings.
|
||||
|
||||
Usage: `localectl [OPTIONS...] COMMAND ...`
|
||||
|
||||
Commands:
|
||||
```
|
||||
status Show current locale settings
|
||||
set-locale LOCALE... Set system locale
|
||||
list-locales Show known locales
|
||||
set-keymap MAP [MAP] Set console and X11 keyboard mappings
|
||||
list-keymaps Show known virtual console keyboard mappings
|
||||
set-x11-keymap LAYOUT [MODEL [VARIANT [OPTIONS]]]
|
||||
Set X11 and console keyboard mappings
|
||||
list-x11-keymap-models Show known X11 keyboard mapping models
|
||||
list-x11-keymap-layouts Show known X11 keyboard mapping layouts
|
||||
list-x11-keymap-variants [LAYOUT]
|
||||
Show known X11 keyboard mapping variants
|
||||
list-x11-keymap-options Show known X11 keyboard mapping options
|
||||
```
|
||||
|
|
|
@ -3,4 +3,38 @@ obj: application
|
|||
---
|
||||
|
||||
# loginctl
|
||||
#wip
|
||||
Send control commands to or query the login manager.
|
||||
|
||||
Usage: `loginctl [OPTIONS...] COMMAND ...`
|
||||
|
||||
|
||||
```
|
||||
Session Commands:
|
||||
list-sessions List sessions
|
||||
session-status [ID...] Show session status
|
||||
show-session [ID...] Show properties of sessions or the manager
|
||||
activate [ID] Activate a session
|
||||
lock-session [ID...] Screen lock one or more sessions
|
||||
unlock-session [ID...] Screen unlock one or more sessions
|
||||
lock-sessions Screen lock all current sessions
|
||||
unlock-sessions Screen unlock all current sessions
|
||||
terminate-session ID... Terminate one or more sessions
|
||||
kill-session ID... Send signal to processes of a session
|
||||
|
||||
User Commands:
|
||||
list-users List users
|
||||
user-status [USER...] Show user status
|
||||
show-user [USER...] Show properties of users or the manager
|
||||
enable-linger [USER...] Enable linger state of one or more users
|
||||
disable-linger [USER...] Disable linger state of one or more users
|
||||
terminate-user USER... Terminate all sessions of one or more users
|
||||
kill-user USER... Send signal to processes of a user
|
||||
|
||||
Seat Commands:
|
||||
list-seats List seats
|
||||
seat-status [NAME...] Show seat status
|
||||
show-seat [NAME...] Show properties of seats or the manager
|
||||
attach NAME DEVICE... Attach one or more devices to a seat
|
||||
flush-devices Flush all device associations
|
||||
terminate-seat NAME... Terminate all sessions on one or more seats
|
||||
```
|
||||
|
|
|
@ -3,4 +3,28 @@ obj: application
|
|||
---
|
||||
|
||||
# networkctl
|
||||
#wip
|
||||
Query and control the networking subsystem.
|
||||
This controls the networking via `systemd-networkd`.
|
||||
|
||||
Usage: `networkctl [OPTIONS...] COMMAND`
|
||||
|
||||
Commands:
|
||||
```
|
||||
list [PATTERN...] List links
|
||||
status [PATTERN...] Show link status
|
||||
lldp [PATTERN...] Show LLDP neighbors
|
||||
label Show current address label entries in the kernel
|
||||
delete DEVICES... Delete virtual netdevs
|
||||
up DEVICES... Bring devices up
|
||||
down DEVICES... Bring devices down
|
||||
renew DEVICES... Renew dynamic configurations
|
||||
forcerenew DEVICES... Trigger DHCP reconfiguration of all connected clients
|
||||
reconfigure DEVICES... Reconfigure interfaces
|
||||
reload Reload .network and .netdev files
|
||||
edit FILES|DEVICES... Edit network configuration files
|
||||
cat [FILES|DEVICES...] Show network configuration files
|
||||
mask FILES... Mask network configuration files
|
||||
unmask FILES... Unmask network configuration files
|
||||
persistent-storage BOOL
|
||||
Notify systemd-networkd if persistent storage is ready
|
||||
```
|
||||
|
|
|
@ -3,4 +3,62 @@ obj: application
|
|||
---
|
||||
|
||||
# systemd-analyze
|
||||
#wip
|
||||
|
||||
Profile systemd, show unit dependencies, check unit files.
|
||||
|
||||
Usage: `systemd-analyze [OPTIONS...] COMMAND ...`
|
||||
|
||||
```
|
||||
Boot Analysis:
|
||||
[time] Print time required to boot the machine
|
||||
blame Print list of running units ordered by
|
||||
time to init
|
||||
critical-chain [UNIT...] Print a tree of the time critical chain
|
||||
of units
|
||||
|
||||
Dependency Analysis:
|
||||
plot Output SVG graphic showing service
|
||||
initialization
|
||||
dot [UNIT...] Output dependency graph in dot(1) format
|
||||
dump [PATTERN...] Output state serialization of service
|
||||
manager
|
||||
|
||||
Configuration Files and Search Paths:
|
||||
cat-config NAME|PATH... Show configuration file and drop-ins
|
||||
unit-files List files and symlinks for units
|
||||
unit-paths List load directories for units
|
||||
|
||||
Enumerate OS Concepts:
|
||||
exit-status [STATUS...] List exit status definitions
|
||||
capability [CAP...] List capability definitions
|
||||
syscall-filter [NAME...] List syscalls in seccomp filters
|
||||
filesystems [NAME...] List known filesystems
|
||||
architectures [NAME...] List known architectures
|
||||
smbios11 List strings passed via SMBIOS Type #11
|
||||
|
||||
Expression Evaluation:
|
||||
condition CONDITION... Evaluate conditions and asserts
|
||||
compare-versions VERSION1 [OP] VERSION2
|
||||
Compare two version strings
|
||||
image-policy POLICY... Analyze image policy string
|
||||
|
||||
Clock & Time:
|
||||
calendar SPEC... Validate repetitive calendar time
|
||||
events
|
||||
timestamp TIMESTAMP... Validate a timestamp
|
||||
timespan SPAN... Validate a time span
|
||||
|
||||
Unit & Service Analysis:
|
||||
verify FILE... Check unit files for correctness
|
||||
security [UNIT...] Analyze security of unit
|
||||
fdstore SERVICE... Show file descriptor store contents of service
|
||||
malloc [D-BUS SERVICE...] Dump malloc stats of a D-Bus service
|
||||
|
||||
Executable Analysis:
|
||||
inspect-elf FILE... Parse and print ELF package metadata
|
||||
|
||||
TPM Operations:
|
||||
has-tpm2 Report whether TPM2 support is available
|
||||
pcrs [PCR...] Show TPM2 PCRs and their names
|
||||
srk [>FILE] Write TPM2 SRK (to FILE)
|
||||
```
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
---
|
||||
obj: application
|
||||
---
|
||||
|
||||
# systemd-ask-pass
|
||||
#wip
|
10
technology/linux/systemd/systemd-ask-password.md
Normal file
10
technology/linux/systemd/systemd-ask-password.md
Normal file
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
obj: application
|
||||
---
|
||||
|
||||
# systemd-ask-password
|
||||
|
||||
Query the user for a passphrase, via the TTY or a UI agent.
|
||||
|
||||
Usage: `systemd-ask-password [OPTIONS...] MESSAGE`
|
||||
|
|
@ -3,4 +3,6 @@ obj: application
|
|||
---
|
||||
|
||||
# systemd-inhibit
|
||||
#wip
|
||||
Execute a process while inhibiting shutdown/sleep/idle.
|
||||
|
||||
Usage: `systemd-inhibit [OPTIONS...] COMMAND ...`
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
---
|
||||
obj: application
|
||||
---
|
||||
|
||||
# systemd-resolve
|
||||
#wip
|
41
technology/linux/systemd/systemd-resolved.md
Normal file
41
technology/linux/systemd/systemd-resolved.md
Normal file
|
@ -0,0 +1,41 @@
|
|||
---
|
||||
obj: application
|
||||
arch-wiki: https://wiki.archlinux.org/title/Systemd-resolved
|
||||
---
|
||||
|
||||
# systemd-resolved
|
||||
|
||||
systemd-resolved is a systemd service that provides network name resolution to local applications via a D-Bus interface, the `resolve` NSS service, and a local DNS stub listener on `127.0.0.53`.
|
||||
|
||||
## resolvectl
|
||||
|
||||
Send control commands to the network name resolution manager, or
|
||||
resolve domain names, IPv4 and IPv6 addresses, DNS records, and services.
|
||||
|
||||
Usage: `resolvectl [OPTIONS...] COMMAND ...`
|
||||
|
||||
Commands:
|
||||
```
|
||||
query HOSTNAME|ADDRESS... Resolve domain names, IPv4 and IPv6 addresses
|
||||
service [[NAME] TYPE] DOMAIN Resolve service (SRV)
|
||||
openpgp EMAIL@DOMAIN... Query OpenPGP public key
|
||||
tlsa DOMAIN[:PORT]... Query TLS public key
|
||||
status [LINK...] Show link and server status
|
||||
statistics Show resolver statistics
|
||||
reset-statistics Reset resolver statistics
|
||||
flush-caches Flush all local DNS caches
|
||||
reset-server-features Forget learnt DNS server feature levels
|
||||
monitor Monitor DNS queries
|
||||
show-cache Show cache contents
|
||||
show-server-state Show servers state
|
||||
dns [LINK [SERVER...]] Get/set per-interface DNS server address
|
||||
domain [LINK [DOMAIN...]] Get/set per-interface search domain
|
||||
default-route [LINK [BOOL]] Get/set per-interface default route flag
|
||||
llmnr [LINK [MODE]] Get/set per-interface LLMNR mode
|
||||
mdns [LINK [MODE]] Get/set per-interface MulticastDNS mode
|
||||
dnsovertls [LINK [MODE]] Get/set per-interface DNS-over-TLS mode
|
||||
dnssec [LINK [MODE]] Get/set per-interface DNSSEC mode
|
||||
nta [LINK [DOMAIN...]] Get/set per-interface DNSSEC NTA
|
||||
revert LINK Revert per-interface configuration
|
||||
log-level [LEVEL] Get/set logging threshold for systemd-resolved
|
||||
```
|
|
@ -4,6 +4,27 @@ arch-wiki: https://wiki.archlinux.org/title/Systemd-timesyncd
|
|||
---
|
||||
|
||||
# systemd-timesyncd
|
||||
#wip
|
||||
systemd-timesyncd is a daemon that has been added for synchronizing the system clock across the network.
|
||||
|
||||
timedatectl
|
||||
## Usage
|
||||
Query or change system time and date settings.
|
||||
|
||||
Usage: `timedatectl [OPTIONS...] COMMAND ...`
|
||||
|
||||
Commands:
|
||||
```
|
||||
status Show current time settings
|
||||
show Show properties of systemd-timedated
|
||||
set-time TIME Set system time
|
||||
set-timezone ZONE Set system time zone
|
||||
list-timezones Show known time zones
|
||||
set-local-rtc BOOL Control whether RTC is in local time
|
||||
set-ntp BOOL Enable or disable network time synchronization
|
||||
|
||||
systemd-timesyncd Commands:
|
||||
timesync-status Show status of systemd-timesyncd
|
||||
show-timesync Show properties of systemd-timesyncd
|
||||
ntp-servers INTERFACE SERVER…
|
||||
Set the interface specific NTP servers
|
||||
revert INTERFACE Revert the interface specific NTP servers
|
||||
```
|
||||
|
|
|
@ -3,4 +3,17 @@ obj: application
|
|||
---
|
||||
|
||||
# userdbctl
|
||||
#wip
|
||||
|
||||
Show user and group information.
|
||||
|
||||
Usage: `userdbctl [OPTIONS...] COMMAND ...`
|
||||
|
||||
Commands:
|
||||
```
|
||||
user [USER…] Inspect user
|
||||
group [GROUP…] Inspect group
|
||||
users-in-group [GROUP…] Show users that are members of specified groups
|
||||
groups-of-user [USER…] Show groups the specified users are members of
|
||||
services Show enabled database services
|
||||
ssh-authorized-keys USER Show SSH authorized keys for user
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue