571 one-liners, 29 categories
The one line
you need right now.
Shell commands for Debian, Plesk and WordPress. Explained, with a risk rating and fields for your own values. Search, fill in, copy.
/
Fill in placeholdersEnter path, domain or user, and copy the finished command.
Risk at a glanceharmless, caution or destructive. Dangerous commands only after confirmation.
Straight from practiceFor Plesk Obsidian, Debian and WordPress hosting, not for textbooks.
Categories
View allSSHKeys, tunnels, connections
20PleskPlesk Obsidian on the CLI
48Debian and APTPackages, updates, sources
17FilesystemFind, disk space, cleanup
23Permissions and ownershipchmod, chown, ACL
15LogsAnalyze, filter, rotate
21WP-CLIWordPress on the command line
50MySQL and MariaDBDumps, users, tables
19ApacheConfiguration, modules, tests
14nginxConfiguration, proxy, tests
12LiteSpeedOpenLiteSpeed and LSWS
9PHPVersions, FPM, modules
14SSL and certificatesOpenSSL, Let's Encrypt
17DNSdig, records, propagation
16MailPostfix, queue, delivery
15GitHistory, branches, rescue
16rsync and backupSync, back up
16ProcessesLoad, memory, ports
16systemdServices, timers, journal
16CronScheduled tasks
11NetworkConnections, HTTP, ports
18SecurityFail2ban, firewall, malware
18SEO checksRedirects, canonical, robots.txt
24Images and performanceWebP, compression, caching
21Firewallufw, nftables, CrowdSec
21DockerContainers, images, volumes
25Redis and MemcachedObject cache for WordPress
15Text processingawk, sed, jq, sort
24System and hardwareKernel, CPU, RAM, disks
20Tools
All toolsCron GeneratorBuild a schedule, explain it in plain English, see the next runs.chmod CalculatorWhat does 777 mean? Click permissions, get the octal value and command.Redirect GeneratorHTTPS and www redirects for .htaccess and nginx.Subnet CalculatorTurn CIDR into network, broadcast, netmask and host range.
New and updated
Random one-linerAdd a cron job that logs its output
$(crontab -l 2>/dev/null; echo "*/15 * * * * /usr/bin/php /var/www/vhosts/example.com/httpdocs/wp-cron.php >> /var/www/vhosts/example.com/logs/wp-cron.log 2>&1") | crontab -
Add an IP address to an nftables blocklist
#nft add element inet filter blocklist '{ 203.0.113.25 }'
Align output as a table with column
$column -t -s ':' /etc/passwd
Allow a port only from a specific IP with ufw
#ufw allow from 198.51.100.0/24 to any port 22 proto tcp
Analyze boot time and find slow services
$systemd-analyze && systemd-analyze blame --no-pager | head -20
Analyze disk usage interactively with ncdu
$ncdu -x /var
Analyze Googlebot requests in the access log
#grep -i "googlebot" /var/www/vhosts/system/example.com/logs/access_ssl_log | awk '{print $7}' | sort | uniq -c | sort -rn | head -20
Analyze server errors (5xx) in the access log
#awk '$9 ~ /^5[0-9][0-9]$/ {print $9, $7}' /var/www/vhosts/system/example.com/logs/access_ssl_log | sort | uniq -c | sort -rn | head -20
Analyze the network path with mtr
$mtr -rwc 50 example.com
Do not search again at 3 a.m. during the next outage
Press Ctrl + D (Mac: ⌘ + D) to bookmark this site. New one-liners are added regularly, follow the RSS feed to stay up to date.