Linux

Kitty

SSH

Remote command

ssh user@server 'command arguments'

Interactive remote command

ssh -t user@server 'command arguments'

Last image

ls -l | head -n 1 | xargs gwenview

Fonts

Copy to /usr/share/fonts/ or ~/.local/share/fonts/ and then run:

fc-cache -fv #for ~/.local/share/fonts
sudo fc-cache -fv  #for /usr/share/fonts/

chmod 755 /usr/share/fonts/dir
chmod 644 /usr/share/fonts/dir/*.ttf

Arch iso install

Umax boot: Esc

GPG Signatures

pacman-key --populate archlinux

gpg --edit-key 3E80... trust 5 y save

gpg --verify archlinux-2025.11.01-x86_64.iso.sig archlinux-2025.11.01-x86_64.iso

usb

dd bs=4M if=path/to/archlinux-version-x86_64.iso of=/dev/disk/by-id/usb-My_flash_drive conv=fsync oflag=direct status=progress

RAM memory

free -h

Internet

https://www.joindns4.eu/for-public#resolver-options DNS4EU:

86.54.11.11
86.54.11.211
2a13:1001::86:54:11:11
2a13:1001::86:54:11:211
ss -tulpn | grep 53
nslookup www.example.com

Fish

for file in *.pdf
    magick $file $(basename $file .pdf).png
end

find -exec alternative

fd pattern
fd pattern -t d #directories
fd pattern -t f #files
fd pattern -x command {} # execute command for each file
fd pattern -X command # execute command for all files

fd . /srv/filmy -t d
fd . /srv/filmy -t d -x chmod 755 {}
fd . /srv/filmy/ -t f -x chmod 644 {}

CLI

Bluetooth

bluetoothctl

if bluetooth headphones disconnect, run pavucontrol

USB port privilages

ls -l /dev/ttyUSB0 sudo usermod -aG uucp $USER reboot groups

Terminal

Gnome

gsettings set org.gnome.desktop.wm.keybindings switch-input-source "['<Alt>Shift_L', '<Super>space', 'XF86Keyboard']" gsettings set org.gnome.desktop.wm.keybindings close "['<Super><Shift>Q', '<Alt>F4']" gsettings set org.gnome.desktop.wm.keybindings toggle-maximized "['<Super>F', '<Alt>F10']"

Seq with padding leading zeroes

seq -w

Hardening

Access

cat /etc/passwd | grep "/\*/\*sh" awk -F: '($3 == 0) {print}' /etc/passwd sudo cat /root/.bash_history

Cron

for user in \((cut -f1 -d: /etc/passwd); do crontab -u \)user -l 2>/dev/null; done sudo cat /etc/crontab sudo ls -al /etc/cron.\/\

Processes

systemctl list-units --type=service --state=running ps aux --sort=-%mem | head -n 10 grep -r LD_PRELOAD /etc/profile /etc/bash* ~/.bashrc ~/.profile

Ports

sudo ss -tuln sudo netstat -tulnp

List of ports: Wikipedia

ssh

ls -la /home/*/.ssh/authorized_keys grep -r "" /root/.ssh/authorized_keys /home/*/.ssh/authorized_keys 2>/dev/null cat /etc/ssh/sshd_config | grep -E 'PermitRootLogin|PasswordAuthentication'

umask

vim /etc/login.defs UMASK 027

Kernel modules

lsmod

Commands

rsync -avzh /source/path/ /destination/path/

rsync -avzh --exclude 'temp/' /source/ /destination/

Identifying which process is using a specific port 8080 lsof -i :8080

lsof | grep deleted

Difference

git-delta package delta file1 file2

Find

find /var/www -type f -name "*.log" -mtime +30 -delete find /etc -type f -exec chmod 644 {} \;

Xargs

Disk Usage

dust ncdu

Shell

Add the shell to /etc/shells with: echo /usr/local/bin/fish | sudo tee -a /etc/shells Change your default shell with: chsh -s /usr/local/bin/fish Again, substitute the path to fish for /usr/local/bin/fish - see command -s fish inside fish. To change it back to another shell, just substitute /usr/local/bin/fish with /bin/bash, /bin/tcsh or /bin/zsh as appropriate in the steps above.

Timers

DVD, media

libdvdread libdvdcss libdvdnav sudo pacman -S libdvdread libdvdnav libdvdcss

Network

sudo systemctl enable iwd sudo systemctl start iwd sudo systemctl enable systemd-resolved sudo systemctl start systemd-resolved

ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf

enable network configuration

vim /etc/iwd/main.conf EnableNetworkConfiguration=true

resolvectl status

Arch install

pacstrap -K /mnt base linux linux-firmware arch-chroot /mnt pacman -S grub efibootmgr intel-ucode iwd vim man-db man-pages texinfo

PDF images

pdfimages -all input.pdf output