Linux

xclip wayland

wl-copy Hello world!
echo "Hello world" | wl-copy
wl-copy < ~/Pictures/photo.png


wl-paste > /some/file

Display Manager (Login Manager)

Greetd

KDE wallet

SSH

sudo systemctl status sshd

sudo pacman -S ssh-audit

Kitty

Hyprland logs

cd $XDG_RUNTIME_DIR

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

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

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

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

# Syncing files between one server to another server
rsync -avzh /source/path/ /destination/path/

# excludes specific directories (like temp/) from being synchronized
rsync -avzh --exclude 'temp/' /source/ /destination/

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

# find files that are still held by a process after being deleted
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

find /path/to/directory -name '*.txt' | xargs rm

Disk Usage

dust
ncdu

Shell

Timers

DVD, media

libdvdread libdvdcss libdvdnav

sudo pacman -S libdvdread libdvdnav libdvdcss

Network

enable network configuration

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

resolvectl status

PDF images

pdfimages -all input.pdf output