Various tricks, snippets, commands for doing things.
pacman -Qo
:show -A <option name>
More info
Find it's .desktop
file (pacman -Fl caffeine-ng | grep .desktop
) and copy it ~/.config/autostart
.
setup LUKS1-type partition sudo cryptsetup luksFormat --type luks1 /dev/drive
backup LUKS headers sudo cryptsetup luksHeaderBackup --header-backup-file backup-location /dev/nvme0n1p5
closing LVM and LUKS container sudo vgchange -a n vg0 && sudo cryptsetup close cryptdisk
LVM: resize a filesystem
sudo lvm lvscan
to get the volumes, let's say it's /dev/data/root- sudo e2fsck -f /dev/data/root
sudo resize2fs -P /dev/data/root 75G
(last bit is the size)
Shrink LVM container inside a LUKS container https://wiki.archlinux.org/title/Resizing_LVM-on-LUKS#Resize_LVM_physical_Volume
- [find $LV and $VG]
- sudo lvs
- sudo lvresize -L 68G --resizefs $VG/$LV
-
[optionally] defragment the PV: https://unix.stackexchange.com/a/193971
- sudo pvdisplay <opened luks partition, e.g. "/dev/mapper/crypt_pop_os">
- NEW_VOLUME_BYTES = 4* PE_SIZE * TOTAL_PE + UNUSABLE_SIZE
- sudo pvresize --setphysicalvolumesize 69619M
- sudo cryptsetup status crypt_pop_os
- sudo pvdisplay /dev/mapper/crypt_pop_os
- NEW_LUKS_SECTOR_COUNT = TOTAL PE * PE Size [BYTES] / LUKS_SECTOR_SIZE [BYTES]
- sudo vgchange -a n data
- sudo cryptsetup -b $NEW_LUKS_SECTOR_COUNT resize crypt_pop_os
- sudo cryptsetup close crypt_pop_os
- sudo parted /dev/nvme0n1
unit s p[rint]
resizepart 3 NEW_PARTITION_SECTOR_END
Move a partition (100 MiB backwards) echo '+100M,' | sudo sfdisk --move-data /dev/nvme0n1 -N 3
Grow partition to take up the unallocated space after it echo ", +" | ./sfdisk -N 1 /dev/sdc
convert <image paths> output.pdf
convert
is part of imagemagick
ss
nftables
iw
sudo smartctl -a <drive device>
Has to be done for every synced Brave instance, it seems. Toggl extension installed in the browser as an extension. Open extension settings for Toggl, enable Trello, Gitlab, Github.
efibootmgr -v
- show boot options
sudo efibootmgr --delete-bootnum --bootnum 0000
- removing a boot option