tips
40 tips More tips
One command, setting or habit at a time about More tips: what it does, the line to copy and a caveat or two.
Linux and shell 8
-
Use fzf's Alt-C binding to change directory with fuzzy search.
eval "$(fzf --bash)" -
Turns on line numbers permanently in nano, so you don't need the -l flag each time.
nano -l file.txt -
Runs Neovim's self-checks and reports missing tools, broken plugins and provider problems.
:checkhealth -
Saves a file that vim opened without permission, using sudo from inside the editor.
:w !sudo tee % > /dev/null -
Stops a command after a set time, and force-kills it if it will not quit.
timeout -k 5 30 ./backup.sh -
Shows each network interface with its state and addresses on a single line.
ip -br a -
Sets sensible permissions in one pass: execute only on directories and already-executable files.
chmod -R u=rwX,go=rX /srv/site -
Prints which mounted filesystem a given path lives on.
findmnt -T /var/lib/docker
Apps and containers 4
-
Deletes the stored file versions of a user, limited to one folder with --path.
sudo -E -u www-data php occ versions:cleanup \ -
Summarizes a long Claude Code conversation while keeping the parts you name.
/compact keep the failing test names and the decision to use SQLite -
Explains how the Series Type changes the way Sonarr searches and why a wrong type finds nothing.
Series > Edit > Series Type: Standard | Daily | Anime -
Keeps downloaded packages between builds so a changed dependency list does not redownload everything.
RUN --mount=type=cache,target=/root/.cache/pip \
Git settings and fixes 3
-
Removes stale remote-tracking branches every time you fetch.
git fetch --prune -
Lists your branches with the most recently committed one at the top.
git branch --sort=-committerdate -
Makes the first push of a new branch set up tracking automatically.
git config --global push.autoSetupRemote true
Mac terminal 2
-
Prints a macOS preferences file as readable text.
plutil -p ~/Library/Preferences/com.apple.finder.plist -
Lists which programs are stopping your Mac from going to sleep.
pmset -g assertions
Nginx Proxy Manager 2
-
Gets one wildcard certificate for all your subdomains in Nginx Proxy Manager without opening port 80.
dns_cloudflare_api_token=0123456789abcdef0123456789abcdef01234567 -
Raises the upload size limit on all Nginx Proxy Manager proxy hosts, so big uploads stop failing with 413.
client_max_body_size 10g;
Tailscale 2
-
Keeps local network devices like printers reachable while the rest of your traffic uses an exit node.
sudo tailscale set --exit-node=100.101.102.103 --exit-node-allow-lan-access=true -
Explains which three ports a public Tailscale Funnel can use and what you need to enable it.
tailscale funnel --bg 3000
Access and security 1
-
Turns off Portainer's plain HTTP port so the web UI is only served over HTTPS.
docker run -d ... portainer/portainer-ce:lts --http-disabled
Backup repositories 1
-
Reads, verifies and decrypts an archive as if restoring it, but writes no files to disk.
borg extract --dry-run /path/to/repo::my-files
Boots and kernel 1
-
Sets which GRUB menu entry boots once, and the normal default returns after that.
sudo grub-reboot MENU_ENTRY
Cache and Mover 1
-
Unraid 7.4 can show Mover progress, a setting that is off until you turn it on.
Disk usage 1
-
Shows the size a file claims to be next to the space it really uses on disk.
truncate -s 10G test.img
Files and media 1
-
Shows which NFO file names Jellyfin reads and why they override online providers.
/movies/Movie (2021)/Movie (2021).mkv
Globbing 1
-
Switches off filename expansion in the current shell, so a * is passed on as a plain character.
set -f
Images and volumes 1
-
Prints the sha256 digest of an image as the registry has it, so you can pin it.
crane digest nginx:latest
Network and DNS 1
-
List every process that is listening on a TCP port.
sudo lsof -nP -iTCP -sTCP:LISTEN
Privacy 1
-
Share chosen Health topics, such as heart rate or sleep, with a contact and stop whenever you like.
SQL shells 1
-
Writes a query result to a CSV file on your own computer, without server file permissions.
\copy (SELECT id, email FROM users WHERE active) TO 'users.csv' WITH (FORMAT csv, HEADER)
Search syntax 1
-
Generates a UUID, averages numbers or hashes text straight from the search box.
random uuid
Setup and devices 1
-
Turns on the serial console on the GPIO pins, so you can see boot messages without a monitor or network.
enable_uart=1
System 1
-
Unraid's Power Mode and the Tips and Tweaks plugin can both set the CPU governor.
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
Text processing 1
-
Aligns the output of any command, or a CSV file, into readable columns.
mount | column -t
WP-CLI 1
-
Lets WP-CLI run on a crashing WordPress site by not loading plugins or themes, so you can fix it.
wp plugin list --skip-plugins --skip-themes
Web development 1
-
See your design the way someone with colour vision deficiency might.
Accessibility tab > Simulate
Windows 1
-
Looks up DNS records from PowerShell, with the record type and DNS server you choose.
Resolve-DnsName example.com -Type MX -Server 1.1.1.1
More tips 1
-
Lists the processes using the most memory first, so you can see what is filling your RAM.
ps aux --sort=-%mem | head -n 6
Nothing in this filter yet.