My Assorted Linux Notes
I put my quick notes on this page. Later, some of these notes may be put their own separate page.
- Created
- 9/17/2019
- Updated
- 12/25/2020
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
TODO
- Website add various tips (udisksctl, TRIM, ...)
- Add how to download and backup emails
- Scripts
- Add Scripts from Fedora, MacOS
Enable Trim on external SSD
https://wiki.archlinux.org/index.php/Solid_state_drive#External_SSD_with_TRIM_support
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 (BETTER TO USE ROOT INSTEAD) 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 winecfg cat /proc/self/uid_map --userns=keep-id OR --uidmap=1000:0:1 (map 1000 in container to 0 on host - will map 1000 to 1000) + map other uids for this to work FINAL: 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:
- remove --ipc=host
- add --privileged
- replace --device=/dev/dri with -v /dev/dri:/dev/dri
Intel HD Broadcast RGB Full
https://forum.kodi.tv/showthread.php?tid=301776 https://www.brad-x.com/2017/08/07/quick-tip-setting-the-color-space-value-in-wayland/
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 /etc/systemd/system/broadcastrgb-full.service [Unit] Description=Sets BroadcastRGB property to Full on HDMI interface Before=basic.target [Service] Type=oneshot ExecStart=/usr/bin/proptest -M i915 -D /dev/dri/card0 68 connector 70 1 [Install] WantedBy=basic.target 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
- Fedora, ... use latest kernel - may cause problems with proprietary drivers, Virtualbox, VMware, ...
- Fedora open-source,
- Ubuntu can use closed-source drivers if preinstalled (problem later)
Erase Files
shred -v -n 1 /dev/overwritethis
File Recovery
- testdisk, photorec are the best
- DMDE
- Scalpel
- Foremost