My Assorted Linux Notes

I put my quick notes on this page. Later, some of these notes may be put their own separate page.


How to Power Off a Hard Drive

udisksctl power-off -b /dev/sdb
gvfs-mount DEPRECATED -> gio mount
hdparm -y

Note 2

rhash -v --speed --percents --md5 --sha256 -r . > mydata.rhashsums

rhash -v --speed --percents --md5 --sha256 mydata.rhashsums

Verify Integrity of System Files

Windows and Fedora/Red Hat Linux.

sfc /scannow
rpm -Va


Enable Trim on external SSD

QEMU user session - automatically run arm binaries

$ sudo dnf install qemu-user-binfmt

Podman Gaming

adduser david
chmod -R david:david /home/david
sudo -i -u david

sudo cp -a /etc/skel/. /root

podman run --name steam -it -v /run/user/1000/:/run/user/1000 -e XDG_RUNTIME_DIR -e WAYLAND_DISPLAY -e DISPLAY -v /dev/dri:/dev/dri -v /tmp/.X11-unix/:/tmp/.X11-unix/ --privileged -v /home/david/Apps/games:/home/david/:Z --userns=keep-id -w=/home/david localhost/winewmsteam2


cat /proc/self/uid_map

(map 1000 in container to 0 on host - will map 1000 to 1000)
+ map other uids for this to work

user david must be created, with password and wheel group

podman run --name steam -it -v /run/user/1000/:/run/user/1000 -e XDG_RUNTIME_DIR -e WAYLAND_DISPLAY -e DISPLAY -v /dev/dri:/dev/dri -v /tmp/.X11-unix/:/tmp/.X11-unix/ --privileged -v /home/david/Apps/games:/home/david/:Z --userns=keep-id --entrypoint='["sudo", "-i", "-u", "david"]' localhost/winewmsteam3

Podman GUI Acceleration fix

from website, modify:

  1. remove --ipc=host
  2. add --privileged
  3. replace --device=/dev/dri with -v /dev/dri:/dev/dri

Intel HD Broadcast RGB Full

proptest (drm-utils)

$ proptest
(find Broadcast RGB)
proptest -M i915 -D /dev/dri/card0 68 connector 70 1

Run before wayland starts (the sevice below does not work on fedora because it starts gui since the grub and proptest returns 243 if gui is running)

Connector 68 (HDMI-A-1)
        70 Broadcast RGB:
                flags: enum
                enums: Automatic=0 Full=1 Limited 16:235=2
                value: 0

Description=Sets BroadcastRGB property to Full on HDMI interface

ExecStart=/usr/bin/proptest -M i915 -D /dev/dri/card0 68 connector 70 1


systemctl enable broadcastrgb-full.service

MacOS ZSH completion

autoload -Uz compinit && compinit

(chmod g-w on the files it complains about)

autoload -Uz compinstall && compinstall
autoload -Uz zsh-newuser-install && zsh-newuser-install -f

run zsh-newuser-install and add some of its output to .zshrc.

Fedora vs Ubuntu

Erase Files

shred -v -n 1 /dev/overwritethis

File Recovery

  1. testdisk, photorec are the best
  2. DMDE
  3. Scalpel
  4. Foremost