2023-04-06 18:15:13 +02:00
|
|
|
---
|
2024-06-01 12:07:34 +02:00
|
|
|
title: Essential software on my systems
|
2024-06-14 05:51:26 +02:00
|
|
|
excerpt: This is just a quick personal reference so I don't have to guess.
|
2024-05-18 18:58:57 +02:00
|
|
|
layout: mini
|
2023-04-06 18:15:13 +02:00
|
|
|
permalink: /n/essentialsoftware.html
|
2024-05-31 05:29:21 +02:00
|
|
|
sitemap: true
|
2024-05-30 08:05:52 +02:00
|
|
|
lang: en
|
2024-05-31 05:29:21 +02:00
|
|
|
robots: noai
|
2023-04-06 18:15:13 +02:00
|
|
|
---
|
|
|
|
|
|
|
|
# Essential software for new systems
|
|
|
|
|
2024-06-14 05:51:26 +02:00
|
|
|
_{{ page.excerpt }}_
|
2023-04-06 18:15:13 +02:00
|
|
|
|
2024-05-29 10:18:10 +02:00
|
|
|
<!-- editorconfig-checker-disable -->
|
|
|
|
<!-- prettier-ignore-start -->
|
|
|
|
|
2023-04-06 18:15:13 +02:00
|
|
|
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
|
|
|
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
2024-05-30 08:05:52 +02:00
|
|
|
<em lang="fi">Automaattinen sisällysluettelo</em> / <em lang="en">Automatically generated Table of Contents</em>
|
2023-04-06 18:15:13 +02:00
|
|
|
|
|
|
|
- [Security](#security)
|
|
|
|
- [Usability](#usability)
|
|
|
|
- [Offtopic system configuration](#offtopic-system-configuration)
|
|
|
|
- [Debian-based](#debian-based)
|
2024-08-10 08:17:52 +02:00
|
|
|
- [Terminus on Fedora](#terminus-on-fedora)
|
|
|
|
- [Terminus on Arch Linux](#terminus-on-arch-linux)
|
2023-04-06 18:15:13 +02:00
|
|
|
- [SSD](#ssd)
|
2024-07-21 06:06:26 +02:00
|
|
|
- [BTRFS](#btrfs)
|
2023-04-06 18:15:13 +02:00
|
|
|
|
|
|
|
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
|
|
|
|
2024-05-29 10:18:10 +02:00
|
|
|
<!-- prettier-ignore-end -->
|
|
|
|
<!-- editorconfig-checker-enable -->
|
|
|
|
|
2023-04-06 18:15:13 +02:00
|
|
|
## Security
|
|
|
|
|
2024-06-19 07:19:44 +02:00
|
|
|
- `microcode` - propietary, but otherwise CPU holes are going to be gaping open.
|
|
|
|
Refer to `tail -n +1 /sys/devices/system/cpu/vulnerabilities/*`
|
2023-04-06 18:15:13 +02:00
|
|
|
- Debian calls this as `amd64-microcode` or `intel-microcode`
|
2024-08-10 08:45:39 +02:00
|
|
|
- Arch knows them as `amd-ucode` or `intel-ucode` and won't load it for you,
|
|
|
|
you will have to `initrd /intel-ucode.img` yourself instantly after `linux`
|
|
|
|
and before `initrd /initramfs-linux-lts.img`...
|
2024-08-10 08:17:52 +02:00
|
|
|
- `ufw` for Deb-based or `firewalld` on Fedora (and Kali and Arch Linux, if you
|
|
|
|
so choose in the last)
|
2023-04-06 18:15:13 +02:00
|
|
|
- `sshguard` for mitigating shared systems where others refuse to use keys
|
2024-06-19 07:19:44 +02:00
|
|
|
- `needrestart` for knowing when updates actually require services to be
|
|
|
|
restarted or a kernel upgrade happens and requires reboot
|
2024-08-10 08:17:52 +02:00
|
|
|
- Arch users may prefer `checkservices` from `archlinux-contrib`
|
2024-06-19 07:19:44 +02:00
|
|
|
- `molly-guard` so you won't accidentally `reboot` or `poweroff` production
|
|
|
|
rather than local machine.
|
2023-04-06 18:15:13 +02:00
|
|
|
- `apt-listchanges` changelogs are worth knowing when updating.
|
|
|
|
- `apt-listbugs` known bugs are especially nice when performing bigger updates.
|
2024-06-19 07:19:44 +02:00
|
|
|
- `chrony` - security demands the time to be correct, Chrony supports NTS and is
|
|
|
|
proper NTP server instead of just SNTP like systemd-timesyncd.
|
2023-09-30 09:43:17 +02:00
|
|
|
- alternatively configure `systemd-timesyncd`
|
2024-06-19 07:19:44 +02:00
|
|
|
- `unbound` - my choice for both DNSSEC validating and DNS-over-TLS, even if I
|
|
|
|
had it connect to upstream dns\[crypt\]proxy
|
|
|
|
- alternatively configure `systemd-resolved`. Simultaneously
|
|
|
|
`systemd-networkd` may be a good idea.
|
|
|
|
- `unattended-upgrades` or `dnf-automatic` so security updates are at least
|
|
|
|
downloaded if not even directly installed (see configuration and systemd
|
|
|
|
units!)
|
|
|
|
- if `dnf-automatic`, consider
|
|
|
|
`sudo systemctl enable dnf-automatic-install.{timer,service}` or at least
|
|
|
|
`sudo systemctl enable dnf-automatic-download.{timer,service}`
|
2023-04-06 18:15:13 +02:00
|
|
|
|
|
|
|
## Usability
|
|
|
|
|
|
|
|
- `nvim git tmux zsh` - good luck without these
|
2024-08-10 08:17:52 +02:00
|
|
|
- <del>if cryptographic operations are taking ages, consider something like
|
2024-06-19 07:19:44 +02:00
|
|
|
`haveged`. It's controversial, so if there are no issues, don't install a
|
2024-08-10 08:17:52 +02:00
|
|
|
random number generator.</del>
|
2024-06-19 07:19:44 +02:00
|
|
|
- userspace oom killer, may avoid frozen systems, much more pleasant than
|
|
|
|
actually having to deal with a frozen system.
|
2023-09-30 09:43:17 +02:00
|
|
|
- `earlyoom`
|
|
|
|
- remember to `sudo systemctl enable --now earlyoom`
|
|
|
|
- `systemd-oomd`
|
|
|
|
- remember to `sudo systemctl enable --now systemd-oomd`
|
2023-04-06 18:15:13 +02:00
|
|
|
- `zram-tools` - small compressed swap in RAM
|
|
|
|
- Remember to check configs! Fedora: `/etc/zram.conf`
|
|
|
|
- `sudo systemctl enable --now zramswap.service zram-swap.service`
|
|
|
|
- `thermald` for additional help keeping system cool, especially intel
|
|
|
|
- `sudo systemctl enable --now thermald`
|
|
|
|
- `vnstat` - help for observing bandwidth usage
|
2024-06-19 07:19:44 +02:00
|
|
|
- `yggdrasil` - essential for getting through Carrier Grade NAT whether there is
|
|
|
|
IPv6 or not. Also gives static internal IPv6 reducing need for dynamic DNS.
|
2023-04-06 18:15:13 +02:00
|
|
|
- `tlp` - for laptop power management, especially ThinkPad.
|
|
|
|
- `sudo tlp-stat | less`
|
|
|
|
- `sudo systemctl enable --now tlp`
|
|
|
|
|
|
|
|
## Offtopic system configuration
|
|
|
|
|
2024-06-19 07:19:44 +02:00
|
|
|
This is just too close to not mention here (and was besides in my planning
|
|
|
|
issue):
|
2023-04-06 18:15:13 +02:00
|
|
|
|
|
|
|
### Debian-based
|
|
|
|
|
|
|
|
- `sudo dpkg-reconfigure console-setup`
|
|
|
|
- ensure UTF-8 and select Terminus
|
|
|
|
- `sudo dpkg-reconfigure keyboard-configuration`
|
|
|
|
- compose key
|
|
|
|
|
2024-08-10 08:17:52 +02:00
|
|
|
#### Terminus on Fedora
|
2024-07-21 06:08:56 +02:00
|
|
|
|
|
|
|
After installing the package, adjust `/etc/vconsole.conf` e.g.:
|
|
|
|
|
|
|
|
```conf
|
|
|
|
KEYMAP="fi"
|
|
|
|
FONT="ter-v16v"
|
|
|
|
```
|
|
|
|
|
|
|
|
Maybe `sudo updatedb` and `locate ter-v16v` at first though?
|
|
|
|
|
2024-08-10 08:17:52 +02:00
|
|
|
#### Terminus on Arch Linux
|
|
|
|
|
|
|
|
See Fedora, but change the `FONT` to `"ter-132b"` instead.
|
|
|
|
|
2023-04-06 18:15:13 +02:00
|
|
|
### SSD
|
|
|
|
|
|
|
|
- `sudo systemctl enable --now fstrim.timer`
|
2024-06-19 07:19:44 +02:00
|
|
|
- check that `/etc/fstab` has `noatime` so every file access isn't written to
|
|
|
|
the disk. BTRFS filesystems should also have `ssd` flag.
|
2024-07-21 06:01:10 +02:00
|
|
|
- NEVER ENABLE `atime`, `relatime` or `norelatime` under the threat of
|
|
|
|
suffering especially on BTRFS. I have been doing fine without it for years,
|
|
|
|
it will not help any issue, unless you want read operations to cause writes
|
|
|
|
and eat space...
|
2024-07-21 06:06:26 +02:00
|
|
|
|
|
|
|
### BTRFS
|
|
|
|
|
2024-08-10 08:17:52 +02:00
|
|
|
- The above applies, `/etc/fstab` **_must have_** `noatime`.
|
2024-07-21 06:06:26 +02:00
|
|
|
- `compress=zstd:0` may be helpful. It enables zstd compression, which is an
|
|
|
|
integrated feature of BTRFS, with the default compression level (3 at the time
|
|
|
|
of writing). The BTRFS devs are most likely wiser than me and can provide a
|
|
|
|
reasonable balance between efficiency and CPU use.
|
2024-08-21 11:56:02 +02:00
|
|
|
- Alternatively `compress-force=zstd:0` may be used, but that might bring
|
|
|
|
extra CPU usage in compressing what cannot be compressed.
|
|
|
|
- Test on Lumina: 20G free -> 24G free.
|
2024-07-21 06:06:26 +02:00
|
|
|
- The compression will happen either the next time the file is written or can
|
|
|
|
be manually triggered through `sudo btrfs filesystem defragment -r "$PWD"`
|