Merge branch 'systemd'
All checks were successful
ci/woodpecker/push/validate_schema Pipeline was successful

This commit is contained in:
JMARyA 2025-06-26 08:17:56 +02:00
commit 2653ea79c9
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263
22 changed files with 714 additions and 15 deletions

View file

@ -1,5 +1,7 @@
--- ---
obj: application obj: application
website: https://networkmanager.dev
repo: https://gitlab.freedesktop.org/NetworkManager/NetworkManager
--- ---
# NetworkManager # NetworkManager
@ -8,7 +10,7 @@ obj: application
After installation, you should start/enable `NetworkManager.service`. Once the NetworkManager daemon is started, it will automatically connect to any available "system connections" that have already been configured. Any "user connections" or unconfigured connections will need _nmcli_ or an applet to configure and connect. After installation, you should start/enable `NetworkManager.service`. Once the NetworkManager daemon is started, it will automatically connect to any available "system connections" that have already been configured. Any "user connections" or unconfigured connections will need _nmcli_ or an applet to configure and connect.
## Usage ## Usage
NetworkManager comes with nmcli and nmtui. NetworkManager comes with `nmcli` and `nmtui`.
### nmcli examples ### nmcli examples
List nearby Wi-Fi networks: List nearby Wi-Fi networks:

41
technology/linux/fwupd.md Normal file
View file

@ -0,0 +1,41 @@
---
obj: application
arch-wiki: https://wiki.archlinux.org/title/Fwupd
website: https://fwupd.org
repo: https://github.com/fwupd/fwupd
---
# fwupd
fwupd is a simple daemon to allow session software to update device firmware on your local machine. It's designed for desktops, but also usable on phones and headless servers.
## Usage
To display all devices detected by fwupd:
```
$ fwupdmgr get-devices
```
> *Note*: Listed devices may not be updatable through fwupd (e.g. Intel integrated graphics). Alternative vendor solutions may be provided instead.
To download the latest metadata from the Linux Vendor firmware Service (LVFS):
```
$ fwupdmgr refresh
```
> *Note*: This can be done automatically by enabling `fwupd-refresh.timer`.
To list updates available for any devices on the system:
```
$ fwupdmgr get-updates
```
To install updates:
```
$ fwupdmgr update
```
> *Note*:
> - Updates that can be applied live will be done immediately.
> - Updates that run at bootup will be staged for the next reboot.
> - The root user may be required to perform certain device updates.

View file

@ -0,0 +1,13 @@
---
obj: application
arch-wiki: https://wiki.archlinux.org/title/S.M.A.R.T.
website: https://www.smartmontools.org
---
# smartctl
S.M.A.R.T. (Self-Monitoring, Analysis, and Reporting Technology) is a supplementary component built into many modern storage devices through which devices monitor, store, and analyze the health of their operation. Statistics are collected (temperature, number of reallocated sectors, seek errors...) which software can use to measure the health of a device, predict possible device failure, and provide notifications on unsafe values.
## Usage
Show all smart information: `smartctl -a /device`

View file

@ -14,7 +14,7 @@ Fields inside the mount section:
- `Options` : Mount options to use when mounting. This takes a comma-separated list of options. This setting is optional. - `Options` : Mount options to use when mounting. This takes a comma-separated list of options. This setting is optional.
## Example ## Example
``` ```ini
[Unit] [Unit]
Documentation=man:fstab(5) man:systemd-fstab-generator(8) Documentation=man:fstab(5) man:systemd-fstab-generator(8)
SourcePath=/etc/fstab SourcePath=/etc/fstab

View file

@ -18,11 +18,11 @@ systemctl list-timers
## Examples ## Examples
### Monotonic timer ### Monotonic timer
A timer which will start 15 minutes after boot and again every week while the system is running. A timer which will start 15 minutes after boot and again every week while the system is running.
`/etc/systemd/system/foo.timer` ```ini
``` # /etc/systemd/system/foo.timer
[Unit] [Unit]
Description=Run foo weekly and on boot Description=Run foo weekly and on boot
@ -35,11 +35,11 @@ WantedBy=timers.target
``` ```
### Realtime timer ### Realtime timer
A timer which starts once a week (at 12:00am on Monday). When activated, it triggers the service immediately if it missed the last start time (option `Persistent=true`), for example due to the system being powered off: A timer which starts once a week (at 12:00am on Monday). When activated, it triggers the service immediately if it missed the last start time (option `Persistent=true`), for example due to the system being powered off:
`/etc/systemd/system/foo.timer` ```ini
``` # /etc/systemd/system/foo.timer
[Unit] [Unit]
Description=Run foo weekly Description=Run foo weekly

View file

@ -65,6 +65,11 @@ systemctl mask unit
systemctl unmask unit systemctl unmask unit
``` ```
Get a list of overridden unit files:
```shell
systemd-delta
```
## Power Management ## Power Management
Shut down and reboot the system Shut down and reboot the system
`systemctl reboot` `systemctl reboot`
@ -87,6 +92,11 @@ Stored in:
- `/etc/systemd/system/`: units installed by the system administrator - `/etc/systemd/system/`: units installed by the system administrator
- `~/.config/systemd/user/`: units used by local users - `~/.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 ### 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: 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:
@ -98,7 +108,7 @@ There are several different start-up types to consider when writing a custom ser
- `Type=idle`: _systemd_ will delay execution of the service binary until all jobs are dispatched. Other than that behavior is very similar to `Type=simple`. - `Type=idle`: _systemd_ will delay execution of the service binary until all jobs are dispatched. Other than that behavior is very similar to `Type=simple`.
#### Example #### Example
``` ```ini
[Unit] [Unit]
Description=Description Description=Description
After=network.target After=network.target

View file

@ -0,0 +1,18 @@
---
obj: application
---
# hostnamectl
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
```

View file

@ -0,0 +1,78 @@
---
obj: application
arch-wiki: https://wiki.archlinux.org/title/Systemd/Journal
---
# journalctl
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).

View file

@ -0,0 +1,24 @@
---
obj: application
---
# localectl
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
```

View file

@ -0,0 +1,40 @@
---
obj: application
---
# loginctl
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
```

View file

@ -0,0 +1,30 @@
---
obj: application
---
# networkctl
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
```

View file

@ -0,0 +1,64 @@
---
obj: application
---
# systemd-analyze
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)
```

View 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`

View file

@ -10,16 +10,29 @@ systemd-boot is a simple UEFI boot manager which executes configured EFI images.
It is simple to configure but can only start EFI executables such as the [Linux](../Linux.md) kernel EFISTUB, UEFI shell, GRUB, or the [Windows](../../windows/Windows.md) Boot Manager. It is simple to configure but can only start EFI executables such as the [Linux](../Linux.md) kernel EFISTUB, UEFI shell, GRUB, or the [Windows](../../windows/Windows.md) Boot Manager.
## Install ## Install
Install: **Install**:
```shell ```shell
bootctl install bootctl install [--esp-path=PATH]
``` ```
Update: **Update**:
```shell ```shell
bootctl update bootctl update
``` ```
**Update seed file:**
```shell
bootctl random-seed
```
**See status:**
```shell
bootctl status
# List entries
bootctl list
```
## Configuration ## Configuration
The loader configuration is stored in the file `_esp_/loader/loader.conf`. The loader configuration is stored in the file `_esp_/loader/loader.conf`.

View file

@ -0,0 +1,52 @@
---
obj: application
rev: 2024-12-23
---
# systemd-detect-virt
systemd-detect-virt detects execution in a virtualized environment. It identifies the virtualization technology and can distinguish full machine virtualization from container virtualization. systemd-detect-virt exits with a return value of 0 (success) if a virtualization technology is detected, and non-zero (error) otherwise. By default, any type of virtualization is detected, and the options `--container` and `--vm` can be used to limit what types of virtualization are detected.
When executed without `--quiet` will print a short identifier for the detected virtualization technology. The following technologies are currently identified:
| **Type** | **ID** | **Product** |
| --------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| vm | `qemu` | QEMU software virtualization, without KVM |
| vm | `kvm` | Linux KVM kernel virtual machine, in combination with QEMU. Not used for other virtualizers using the KVM interfaces, such as Oracle VirtualBox or Amazon EC2 Nitro, see below. |
| vm | `amazon` | Amazon EC2 Nitro using Linux KVM |
| vm | `zvm` | s390 z/VM |
| vm | `vmware` | VMware Workstation or Server, and related products |
| vm | `microsoft` | Hyper-V, also known as Viridian or Windows Server Virtualization |
| vm | `oracle` | Oracle VM VirtualBox (historically marketed by innotek and Sun Microsystems), for legacy and KVM hypervisor |
| vm | `powervm` | IBM PowerVM hypervisor — comes as firmware with some IBM POWER servers |
| vm | `xen` | Xen hypervisor (only domU, not dom0) |
| vm | `bochs` | Bochs Emulator |
| vm | `uml` | User-mode Linux |
| vm | `parallels` | Parallels Desktop, Parallels Server |
| vm | `bhyve` | bhyve, FreeBSD hypervisor |
| vm | `qnx` | QNX hypervisor |
| vm | `acrn` | ACRN hypervisor |
| vm | `apple` | Apple virtualization framework |
| vm | `sre` | LMHS SRE hypervisor |
| vm | `google` | Google Compute Engine |
| container | `openvz` | OpenVZ/Virtuozzo |
| container | `lxc` | Linux container implementation by LXC |
| container | `lxc-libvirt` | Linux container implementation by libvirt |
| container | `systemd-nspawn` | systemd's minimal container implementation, see systemd-nspawn(1) manual page |
| container | `docker` | Docker container manager |
| container | `podman` | Podman container manager |
| container | `rkt` | rkt app container runtime |
| container | `wsl` | Windows Subsystem for Linux |
| container | `proot` | proot userspace chroot/bind mount emulation |
| container | `pouch` | Pouch Container Engine |
If multiple virtualization solutions are used, only the "innermost" is detected and identified. That means if both machine and container virtualization are used in conjunction, only the latter will be identified (unless `--vm` is passed).
## Options
| Option | Description |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `-c, --container` | Only detects container virtualization (i.e. shared kernel virtualization). |
| `-v, --vm` | Only detects hardware virtualization. |
| `-r, --chroot` | Detect whether invoked in a chroot environment. In this mode, no output is written, but the return value indicates whether the process was invoked in a chroot() environment or not. |
| `-q, --quiet` | Suppress output of the virtualization technology identifier. |
| `--list` | Output all currently known and detectable container and VM environments. |

View file

@ -0,0 +1,45 @@
---
obj: application
---
# systemd-firstboot
systemd-firstboot allows for setting of basic system settings before or during the first boot of a newly created system. The tool is able of initialize the following system settings: timezone, locale, hostname, the root password, as well as automated generation of a machine ID.
As systemd-firstboot interacts with the filesystem directly and does not make use of the related systemd services (such as timedatectl, hostnamectl or localectl), it should not be executed on an already running system.
Settings can be specified non-interactively when externally used on filesystem images, or interactively if executed during the early boot process.
Usage: `systemd-firstboot [OPTIONS...]`
## Options
| Option | Description |
| ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--root=root` | Takes a directory path as an argument. All paths will be prefixed with the given alternate root path, including config search paths. This is useful to operate on a system image mounted to the specified directory instead of the host system itself. |
| `--image=path` | Takes a path to a disk image file or block device node. If specified all operations are applied to file system in the indicated disk image. This is similar to `--root=` but operates on file systems stored in disk images or block devices. The disk image should either contain just a file system or a set of file systems within a GPT partition table. |
| `--locale=LOCALE`, `--locale-messages=LOCALE` | Sets the system locale, more specifically the `LANG=` and `LC_MESSAGES` settings. The argument should be a valid locale identifier, such as `de_DE.UTF-8`. This controls the `locale.conf` configuration file. |
| `--keymap=KEYMAP` | Sets the system keyboard layout. The argument should be a valid keyboard map, such as `de-latin1`. This controls the `KEYMAP` entry in the `vconsole.conf` configuration file. |
| `--timezone=TIMEZONE` | Sets the system time zone. The argument should be a valid time zone identifier, such as `Europe/Berlin`. This controls the `localtime` symlink. |
| `--hostname=HOSTNAME` | Sets the system hostname. The argument should be a hostname, compatible with DNS. This controls the `hostname` configuration file. |
| `--setup-machine-id` | Initialize the system's machine ID to a random ID. This controls the `machine-id` file. This option only works in combination with `--root=` or `--image=`. On a running system, machine-id is written by the manager with help from `systemd-machine-id-commit.service`. |
| `--machine-id=ID` | Set the system's machine ID to the specified value. The same restrictions apply as to `--setup-machine-id`. |
| `--root-password=PASSWORD`, `--root-password-file=PATH`, `--root-password-hashed=HASHED_PASSWORD` | Sets the password of the system's root user. This creates/modifies the `passwd` and `shadow` files. This setting exists in three forms: `--root-password=` accepts the password to set directly on the command line, `--root-password-file=` reads it from a file and `--root-password-hashed=` accepts an already hashed password on the command line. |
| `--root-shell=SHELL` | Sets the shell of the system's root user. This creates/modifies the `passwd` file. |
| `--kernel-command-line=CMDLINE` | Sets the system's kernel command line. This controls the `/etc/kernel/cmdline` file which is used by kernel-install. |
| `--prompt-locale`, `--prompt-keymap`, `--prompt-timezone`, `--prompt-hostname`, `--prompt-root-password`, `--prompt-root-shell` | Prompt the user interactively for a specific basic setting. Note that any explicit configuration settings specified on the command line take precedence, and the user is not prompted for it. |
| `--prompt` | Query the user for locale, keymap, timezone, hostname, root's password, and root's shell. |
| `--copy-locale`, `--copy-keymap`, `--copy-timezone`, `--copy-root-password`, `--copy-root-shell` | Copy a specific basic setting from the host. This only works in combination with `--root=` or `--image=`. |
| `--copy` | Copy locale, keymap, time zone, root password and shell from the host. |
| `--force` | Write configuration even if the relevant files already exist. Without this option, systemd-firstboot doesn't modify or replace existing files. Note that when configuring the root account, even with this option, systemd-firstboot only modifies the entry of the "root" user, leaving other entries in `/etc/passwd` and `/etc/shadow` intact. |
| `--reset` | If specified, all existing files that are configured by systemd-firstboot are removed. Note that the files are removed regardless of whether they'll be configured with a new value or not. This operation ensures that the next boot of the image will be considered a first boot, and systemd-firstboot will prompt again to configure each of the removed files. |
| `--delete-root-password` | Removes the password of the system's root user, enabling login as root without a password unless the root account is locked. Note that this is extremely insecure and hence this option should not be used lightly. |
| `--welcome=` | Takes a boolean argument. By default when prompting the user for configuration options a brief welcome text is shown before the first question is asked. Pass false to this option to turn off the welcome text. |
## Delete existing settings
If the following files are present, systemd-firstboot will not prompt for the setting they relate to.
```sh
rm /etc/{machine-id,localtime,hostname,shadow,locale.conf}
```
Edit `/etc/passwd` and remove the root account from it, otherwise the root will be treating as configured and systemd-firstboot will not prompt for the root password.

View file

@ -0,0 +1,8 @@
---
obj: application
---
# systemd-inhibit
Execute a process while inhibiting shutdown/sleep/idle.
Usage: `systemd-inhibit [OPTIONS...] COMMAND ...`

View 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
```

View file

@ -0,0 +1,30 @@
---
obj: application
arch-wiki: https://wiki.archlinux.org/title/Systemd-timesyncd
---
# systemd-timesyncd
systemd-timesyncd is a daemon that has been added for synchronizing the system clock across the network.
## 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
```

View file

@ -0,0 +1,19 @@
---
obj: application
---
# userdbctl
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
```

27
technology/linux/udev.md Normal file
View file

@ -0,0 +1,27 @@
---
obj: application
arch-wiki: https://wiki.archlinux.org/title/Udev
---
# udev
udev is a userspace system that enables the operating system administrator to register userspace handlers for events. The events received by udev's daemon are mainly generated by the (Linux) kernel in response to physical events relating to peripheral devices. As such, udev's main purpose is to act upon peripheral detection and hot-plugging, including actions that return control to the kernel, e.g., loading kernel modules or device firmware. Another component of this detection is adjusting the permissions of the device to be accessible to non-root users and groups.
## Usage
Send control commands or test the device manager.
Usage: `udevadm [--help] [--version] [--debug] COMMAND [COMMAND OPTIONS]`
Commands:
```
info Query sysfs or the udev database
trigger Request events from the kernel
settle Wait for pending udev events
control Control the udev daemon
monitor Listen to kernel and udev events
test Test an event run
test-builtin Test a built-in command
verify Verify udev rules files
wait Wait for device or device symlink
lock Lock a block device
```

134
technology/linux/udisks.md Normal file
View file

@ -0,0 +1,134 @@
---
obj: application
arch-wiki: https://wiki.archlinux.org/title/Udisks
website: https://www.freedesktop.org/wiki/Software/udisks
repo: https://github.com/storaged-project/udisks
---
# udisks
udisks provides a daemon `udisksd`, that implements D-Bus interfaces used to query and manipulate storage devices, and a command-line tool `udisksctl`, used to query and use the daemon.
## Configuration
### Permissions
Actions a user can perform using udisks are restricted with `polkit`. If the user session is not activated or present (for example, when controlling udisks from a systemd/User service), adjust `polkit` rules accordingly.
See https://github.com/coldfix/udiskie/wiki/Permissions for common udisks permissions for the `storage` group.
### Default mount options
It is possible to define default mount options in `/etc/udisks2/mount_options.conf`. Create the file if it does not already exist. The built-in defaults and some examples can be seen in `/etc/udisks2/mount_options.conf.example`.
The options can target specific filesystem types. For example, mount btrfs filesystems with zstd compression enabled:
```
# /etc/udisks2/mount_options.conf
[defaults]
btrfs_defaults=compress=zstd
```
> *Note*: Lines override the corresponding built-in defaults. Make sure not to accidentally remove mount options this way.
## Usage
### Information
Show information about an object.
Usage: `udisksctl info [OPTION …]`
| Option | Description |
| -------------------- | ------------------------------------- |
| `-p, --object-path` | Object to get information about |
| `-b, --block-device` | Block device to get information about |
| `-d, --drive` | Drive to get information about |
To show info on all elements: `udisksctl dump`
For a high-level status: `udisksctl status`
To monitor for changes: `udisksctl monitor`
### Mounting
Mount a filesystem.
Usage: `udisksctl mount [OPTION …]`
| Option | Description |
| ----------------------- | -------------------------------------- |
| `-p, --object-path` | Object to get information about |
| `-b, --block-device` | Block device to get information about |
| `-t, --filesystem-type` | Filesystem type to use |
| `-o, --options` | Mount options |
| `--no-user-interaction` | Do not authenticate the user if needed |
Unmount a filesystem.
Usage: `udisksctl unmount [OPTION …]`
| Option | Description |
| ----------------------- | -------------------------------------- |
| `-p, --object-path` | Object to get information about |
| `-b, --block-device` | Block device to get information about |
| `-f, --force` | Force/lazy unmount |
| `--no-user-interaction` | Do not authenticate the user if needed |
### Encryption
Unlock an encrypted device.
Usage: `udisksctl unlock [OPTION …]`
| Option | Description |
| ----------------------- | -------------------------------------- |
| `-p, --object-path` | Object to get information about |
| `-b, --block-device` | Block device to get information about |
| `--no-user-interaction` | Do not authenticate the user if needed |
| `--key-file` | Keyfile for unlocking |
| `--read-only` | Unlock the device as read-only |
Lock an encrypted device.
Usage: `udisksctl lock [OPTION …]`
| Option | Description |
| ----------------------- | -------------------------------------- |
| `-p, --object-path` | Object to get information about |
| `-b, --block-device` | Block device to get information about |
| `--no-user-interaction` | Do not authenticate the user if needed |
### Loop Devices
Set up a loop device.
Usage: `udisksctl loop-setup [OPTION …]`
| Option | Description |
| ----------------------- | ------------------------------------------ |
| `-f, --file` | File to set-up a loop device for |
| `-r, --read-only` | Setup read-only device |
| `-o, --offset` | Start at `<num>` bytes into file |
| `-s, --size` | Limit size to `<num>` bytes |
| `--no-partition-scan` | Do not scan the loop device for partitions |
| `--no-user-interaction` | Do not authenticate the user if needed |
Delete a loop device.
Usage: `udisksctl loop-delete [OPTION …]`
| Option | Description |
| ----------------------- | -------------------------------------- |
| `-p, --object-path` | Object to get information about |
| `-b, --block-device` | Block device to get information about |
| `--no-user-interaction` | Do not authenticate the user if needed |
### Power Off
Safely power off a drive.
Usage: `udisksctl power-off [OPTION …]`
| Option | Description |
| ----------------------- | -------------------------------------- |
| `-p, --object-path` | Object to get information about |
| `-b, --block-device` | Block device to get information about |
| `--no-user-interaction` | Do not authenticate the user if needed |