Current directory
InspectPrint the directory your shell is currently using.
pwdRelative paths start here.
Server configuration
A practical command reference for developers and server administrators. Find a task, read what it does, then copy the command you need.
Free, no sign-up. Copying a command never runs it.
Nothing you enter leaves your browser.
This tool runs in your browser and needs JavaScript. Turn JavaScript on and reload the page.
Replace example paths, hostnames, users, process IDs and ports with your own checked values. Each block is a separate example, and copying does not run anything.
Changes state commands can write files or settings. May interrupt service commands need particular care on a live host. Use your normal account unless a command needs sudo, and check local help with man command or command --help.
Showing all 206 commands.
Skip to the end of the resultsTry fewer words or a different category. Every word you type has to match.
Start here: Bash navigation, help and how commands are resolved.
Print the directory your shell is currently using.
pwdRelative paths start here.
Move into an example website directory.
cd /srv/www/example.comReplace the path with an existing directory.
Return to the directory used before the last cd.
cd -Requires a previous directory in this shell.
Check how the shell resolves the PHP command.
command -v phpA missing command returns a nonzero status.
Show matching aliases, functions and executables.
type -a lsUseful when an alias changes command behavior.
Open the installed chmod documentation.
man chmodPress q to exit; manuals match installed versions.
Read Bash help for its cd built-in.
help cdBash-specific; cd is not an external executable.
Display the status of the immediately preceding command.
printf "Exit status: %s\n" "$?"Run immediately after the command you are checking.
List the last 25 Bash history entries.
history 25History may contain secrets; do not publish it.
Browse, create and copy files with explicit paths and interactive overwrite checks.
Show hidden entries, permissions, owners and sizes.
ls -lah -- /srv/www/example.comThe path must exist and be readable.
Create a project directory and missing parents.
mkdir -p -- ./project/configCreates directories in your current location.
Create a file or update an existing file timestamp.
touch -- ./notes.txtAn existing file keeps its contents.
Copy a configuration, asking before an overwrite.
cp -i -- ./config.conf ./config.conf.backupUse a private destination if the source contains secrets.
Preserve file attributes while copying a directory.
cp -a -i -- ./site ./site-backupAn existing destination changes where the copy lands; inspect it first.
Rename a file, asking before replacing a destination.
mv -i -- ./old-name.txt ./new-name.txtMoves affect the original path.
Ask before permanently removing one named file.
rm -i -- ./unneeded-file.txtDeletion has no automatic undo; verify the exact file.
Remove a directory only if it is empty.
rmdir -- ./empty-directoryFails rather than deleting directory contents.
Print an absolute resolved path.
realpath -- ./config.confSymlinks can point somewhere other than expected.
Inspect logs, configuration and differences without opening an editor.
Print the operating system release information.
cat -- /etc/os-releaseAvoid dumping huge files or secrets to shared terminals.
Browse a log without printing it all at once.
less -- /var/log/nginx/access.logRead permission required; q exits and / searches.
Print the first 30 lines of a text file.
head -n 30 -- ./config.confReplace the example filename.
Print the latest 50 log lines.
tail -n 50 -- /var/log/nginx/error.logThe path and log permissions vary by server.
Follow updates and retry if log rotation replaces the file.
tail -F -- /var/log/nginx/error.logPress Ctrl+C to stop following.
Print text with line numbers, including blank lines.
nl -ba -- ./config.confOutput is a display, not a file modification.
Count lines, words and bytes.
wc -l -w -c -- ./access.logByte count is not necessarily character count.
Show a unified text diff.
diff -u -- ./before.conf ./after.confExit status 1 means differences, not an execution failure.
Inspect file signatures and report a likely type.
file -- ./download.binA type guess does not prove a file is safe.
Use bounded paths and quoted patterns; review matches before making changes.
Find matching filenames beneath the website parent.
find /srv/www -type f -name "wp-config.php" -printTraversal requires permissions and may take time.
List directories named cache.
find ./project -type d -name "cache" -printThis only lists matches; it does not remove anything.
List files modified within roughly the last hour.
find ./project -type f -mmin -60 -printModification time is not a complete audit trail.
List files larger than 100 MiB within this filesystem.
find /var/log -xdev -type f -size +100M -printSome log directories require additional read access.
Find a literal string and show matching line numbers.
grep -nF -- "DB_HOST" ./wp-config.phpMatching lines may contain credentials.
Search text configuration files recursively.
grep -RIn --include="*.conf" -- "server_name" ./configSymlinks are followed by -R; limit the starting directory.
Match either error or warning.
grep -nE -- "error|warning" ./app.logPatterns are case-sensitive unless -i is added.
Count lines containing an example status marker.
grep -cF -- " 404 " ./access.logConfirm the actual log format before interpreting counts.
Count lines safely when filenames contain spaces.
find ./project -type f -name "*.txt" -print0 | xargs -0 -r wc -l --GNU xargs -r skips execution when no files match.
Transform output without changing source files; redirect only when you intend to write.
Print lines in sorted order.
sort -- ./names.txtLocale affects ordering; the source file is unchanged.
Count duplicates and put frequent values first.
sort -- ./names.txt | uniq -c | sort -nruniq needs equal lines grouped together.
Print fields one and three from simple delimiter-separated data.
cut -d "," -f 1,3 -- ./simple.csvNot suitable for quoted CSV containing embedded commas.
Print lines 10 through 25.
sed -n "10,25p" ./config.confNo in-place editing flag is used.
Print a replacement preview to standard output.
sed "s/old.example/new.example/g" ./config.confThis example does not modify the source.
Add values in the first whitespace-separated column.
awk '{total += $1} END {print total}' ./numbers.txtAssumes numeric input in column one.
Print a lowercase version of the input.
printf "%s\n" "Example" | tr "[:upper:]" "[:lower:]"Text is piped directly; no file is written.
Parse and pretty-print JSON.
python3 -m json.tool ./data.jsonRequires Python 3; avoid printing private JSON publicly.
Display matches and save them to a review file.
grep -nF -- "ERROR" ./app.log | tee ./errors-review.txttee overwrites its destination unless -a is used.
Apply permissions to individual known files; avoid blanket recursive changes.
Show owner, permission bits, size and timestamps.
stat -- ./config.confTimestamps do not prove who changed a file.
Show permissions and owners along a path.
namei -l /srv/www/example.com/public/index.htmlRequires namei, commonly supplied by util-linux.
Allow only the owner to read and write this file.
chmod 600 -- ./private.confVerify the service user can still access what it needs.
Add execute permission for the file owner.
chmod u+x -- ./maintenance.shReview script contents before executing it.
Change owner and group on one configuration file.
sudo chown deploy:www-data -- ./config.confReplace both accounts; do not assume these match your host.
Show the current shell file-creation mask.
umaskThis affects new files, not existing permissions.
Restrict newly created files in the current shell.
umask 077Some programs choose additional permissions explicitly.
Show extended access-control entries.
getfacl -- ./shared-directoryRequires the acl package; filesystem support varies.
Create a link to an example relative target.
ln -s -- ./releases/current ./current-releaseRelative targets are resolved from the link location.
Inspect identity and review account changes before applying them.
Print your effective username.
whoamisudo can change the effective account.
Show your user ID and group memberships.
idUseful when troubleshooting file access.
Show groups for an example account.
groups deployReplace deploy with a real account.
Read an account entry from configured identity sources.
getent passwd deployAn empty result may mean the account does not exist.
List current login sessions.
whoResults depend on session accounting.
List commands your account is permitted to run through sudo.
sudo -lMay ask for your password.
Interactively create an Ubuntu/Debian user.
sudo adduser deployReview account policy and use a unique username.
Append one group without replacing other memberships.
sudo usermod -aG www-data deployNew sessions may be needed; verify the group is appropriate.
Interactively change your account password.
passwdType passwords at the prompt, never as shell arguments.
Inspect the host, CPU, memory and time before tuning anything.
Read the distribution name and release fields.
cat /etc/os-releaseDistribution version differs from kernel version.
Show kernel and machine information.
uname -aMay expose host details in shared output.
Show hostname and system information on systemd hosts.
hostnamectlSome containers do not run systemd.
Show uptime and recent system load averages.
uptimeLoad includes runnable and certain blocked tasks.
Show memory and swap with readable units.
free -hAvailable memory is more informative than unused memory alone.
Show CPU architecture and topology.
lscpuVirtual machines may expose only virtual CPU details.
Show processing units available to the current process.
nprocContainer limits can differ from physical host capacity.
Print local time and UTC.
date --iso-8601=seconds
date -u --iso-8601=secondsBoth lines inspect time; neither changes the clock.
Inspect timezone and synchronization state.
timedatectl statusRequires a compatible systemd environment.
Observe first; terminating or reprioritizing processes can affect live requests.
Watch process CPU and memory use.
topPress q to exit; this monitor is interactive.
Show processes ranked by memory percentage.
ps aux --sort=-%mem | head -n 15A snapshot does not measure sustained pressure.
Show processes ranked by reported CPU usage.
ps aux --sort=-%cpu | head -n 15ps CPU values are not the same as an instant sampling monitor.
List process IDs and full commands matching Nginx.
pgrep -af nginxCommand lines can contain sensitive arguments.
Show parent and child processes with IDs.
pstree -pMay require the psmisc package.
Collect five samples at one-second intervals.
vmstat 1 5The first row reports averages since boot.
Show extended device statistics over three reports.
iostat -xz 1 3Requires sysstat; the initial report is since boot.
Inspect one example process before acting on it.
ps -p 12345 -o pid,ppid,user,stat,etime,argsReplace 12345 with a verified current process ID.
Ask a known process to terminate gracefully.
kill -TERM 12345Recheck PID and ownership; prefer systemctl for managed services.
Diagnose space, inode and mount problems without formatting or repartitioning.
Show mounted filesystem types and space use.
df -hTFilesystem space and directory totals measure different things.
Show inode use on mounted filesystems.
df -iA filesystem can run out of inodes before bytes.
Estimate disk use beneath one directory.
du -sh -- /srv/www/example.comTraversal may be slow and permissions may hide files.
Compare immediate subdirectories without crossing filesystems.
du -xhd1 -- /var | sort -hGNU du options; unreadable directories produce errors.
List block devices and mount locations.
lsblk -o NAME,SIZE,FSTYPE,MOUNTPOINTSRead-only inventory; it does not mount or format devices.
Show mounted filesystems as a tree.
findmntAvailable fields vary by util-linux version.
Find the filesystem covering a directory.
findmnt -T /srv/wwwUseful before assuming which device is full.
List open files whose directory links were removed.
sudo lsof +L1Requires lsof; do not restart services without assessing impact.
Inspect filesystem UUIDs and type signatures.
sudo blkidRead-only probing may require administrator access.
List archive contents before extracting, and protect backups that contain secrets.
List the archive members without extracting them.
tar -tzf ./site-backup.tar.gzInspect unexpected paths before extracting untrusted archives.
Archive an example website directory.
tar -czf ./site-backup.tar.gz -C /srv/www example.comWrites an archive; coordinate consistency for live data.
Extract into a review directory without restoring original ownership.
mkdir -p ./restore-review && tar -xzf ./site-backup.tar.gz -C ./restore-review --no-same-ownerUse only a trusted archive; extraction can overwrite files.
Inspect names and sizes in a ZIP file.
unzip -l ./plugin.zipRequires unzip; listing does not prove the archive is safe.
Extract into a review directory, preserving existing files.
unzip -n ./plugin.zip -d ./plugin-reviewReview names and trust the source before extraction.
Package a project directory as ZIP.
zip -r ./project.zip ./projectRequires zip; avoid accidentally including credentials.
Calculate the file checksum.
sha256sum -- ./download.tar.gzCompare against a trusted independent published digest.
Check files against a trusted digest list.
sha256sum -c ./SHA256SUMSThe checksum list itself must be authentic.
Check gzip stream integrity without extraction.
gzip -t ./site-backup.tar.gzThis does not validate the backup contents or application consistency.
Preview synchronization before writing; examples do not delete destination files.
Dry-run a directory-content synchronization.
rsync -avhn -- ./site/ ./backup/The trailing slash copies contents rather than the directory itself.
Copy local contents and preserve supported archive attributes.
rsync -avh -- ./site/ ./backup/Can replace destination files; review a dry run first.
Preview an upload over SSH.
rsync -avhn -e "ssh -p 22" -- ./site/ deploy@example.com:/srv/www/example.com/Replace the host, user, port and path; requires remote rsync.
Upload a site directory over SSH.
rsync -avh -e "ssh -p 22" -- ./site/ deploy@example.com:/srv/www/example.com/Can overwrite remote files; verify host identity and preview first.
Copy a local file to an example remote location.
scp -P 22 ./config.conf deploy@example.com:/srv/config-review.confMay overwrite a remote file; confirm destination and permissions.
Copy a remote report to your machine.
scp -P 22 deploy@example.com:/srv/report.txt ./report.txtMay overwrite the local destination; verify the source host.
Open an encrypted file-transfer session.
sftp -P 22 deploy@example.comCommands such as put and rm inside the session change files.
Compare contents by checksum during a dry run.
rsync -avhnc -- ./site/ ./backup/Reads file contents on both sides and can be slower.
Inspect the local network and test reachability only to systems you may contact.
Show network interfaces and IP addresses concisely.
ip -br addressRequires the iproute2 utilities.
Show IPv4 routes and the default gateway.
ip route showUse ip -6 route show for IPv6 routes.
Ask the kernel which route it would use.
ip route get 1.1.1.1A route lookup does not prove end-to-end connectivity.
Show listening sockets and available process information.
sudo ss -lntupAdministrator access exposes other users’ process details.
List established TCP sockets numerically.
ss -tn state establishedConnection lists can contain private peer addresses.
Show aggregate socket statistics.
ss -sCounts are a snapshot, not a traffic history.
Send four ICMP echo requests.
ping -c 4 example.comICMP may be filtered even when a website works.
Estimate the route and path MTU.
tracepath example.comRequires tracepath; devices may suppress replies.
Show per-interface packet and error counters.
ip -s link showCounters need interval comparisons to diagnose a trend.
Check name resolution and HTTP/TLS behavior with bounded requests.
Query IPv4 address records using the configured resolver.
dig +short example.com ARequires dnsutils on Ubuntu.
Inspect mail-exchanger answers and DNS response metadata.
dig example.com MXA DNS answer is not a mail delivery test.
Read public TXT records such as SPF and verification tokens.
dig example.com TXTLarge answers may include unrelated TXT values.
List nameserver answers.
dig +short example.com NSCached responses can differ during a DNS change.
Ask a specific resolver for IPv6 address records.
dig @1.1.1.1 example.com AAAAThis sends the queried name to that resolver.
Inspect systemd-resolved links and DNS settings.
resolvectl statusApplies only when systemd-resolved is in use.
Issue a bounded HEAD request and show headers.
curl -sS -I --connect-timeout 5 --max-time 15 https://example.com/HEAD behavior can differ from GET responses.
Follow up to five redirects while inspecting headers.
curl -sS -I -L --max-redirs 5 --connect-timeout 5 --max-time 20 https://example.com/Review redirect targets; this sends requests to them.
Inspect a TLS handshake with hostname verification.
timeout 15s openssl s_client -connect example.com:443 -servername example.com -verify_hostname example.com -verify_return_error </dev/nullRequires GNU timeout, OpenSSL and a configured trust store; not a full TLS audit.
Use verified host keys and keep private keys private.
Open a remote shell as an example account.
ssh -p 22 deploy@example.comVerify the fingerprint through a trusted channel before accepting it.
Connect using a specific existing key.
ssh -i ~/.ssh/id_ed25519 -p 22 deploy@example.comNever upload or disclose the private key.
Generate a separate SSH keypair interactively.
ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519_example -C "example-server"Choose a passphrase and do not overwrite an existing key.
Show the fingerprint of a public key.
ssh-keygen -lf ~/.ssh/id_ed25519_example.pubA public fingerprint is not the private key.
Append your public key to a remote account.
ssh-copy-id -i ~/.ssh/id_ed25519_example.pub deploy@example.comVerify the remote host first; requires an existing access method.
Connect with verbose diagnostics.
ssh -vv -o ConnectTimeout=10 deploy@example.comLogs can reveal usernames, paths and server details.
Print evaluated client configuration without connecting.
ssh -G example.comThis is client configuration, not the server sshd configuration.
Check sshd configuration syntax and key availability.
sudo sshd -tDo this before any reload; keep a working access session.
Show fingerprints available from your running SSH agent.
ssh-add -lRequires a reachable agent; it does not show private key material.
APT examples target Ubuntu/Debian; other distributions use different package managers.
Refresh repository package metadata.
sudo apt updateChanges local package indexes; does not upgrade packages.
Show installed packages with candidate upgrades.
apt list --upgradableRefresh indexes first for current repository information.
Find repository packages matching a search term.
apt search nginxSearch results depend on enabled repositories.
Read package metadata and dependencies.
apt show nginxDoes not prove which variant your host should install.
Preview package actions without installing Nginx.
apt-get -s install nginxSimulation is not an availability or deployment guarantee.
Install Nginx and required dependencies after review.
sudo apt install nginxPackage hooks may start services or alter configuration.
Preview upgrade actions.
apt-get -s upgradeActual transactions can change after metadata or package state changes.
Apply available upgrades after confirmation.
sudo apt upgradeMay restart services; review maintenance needs and backups.
List paths installed by an example package.
dpkg -L nginx-commonThe package name must be installed.
Inspect unit names and existing firewall policy before making service changes.
Show Nginx state and recent journal entries.
systemctl status nginx --no-pagerNonzero status can indicate an inactive service.
Print whether the unit is active.
systemctl is-active nginxA running process alone does not prove application health.
List failed systemd units.
systemctl --failed --no-pagerInvestigate the journal before restarting repeatedly.
Show unit files and drop-in configuration.
systemctl cat nginxCheck for secrets before sharing the output.
Apply a supported reload only after a successful syntax check.
sudo nginx -t && sudo systemctl reload nginxAffects live service configuration; confirm the correct host.
Stop and start Nginx.
sudo systemctl restart nginxCan interrupt active connections; use a maintenance window.
Reread changed systemd unit files and drop-ins.
sudo systemctl daemon-reloadDoes not restart affected services by itself.
Show UFW status and numbered rules.
sudo ufw status numberedUFW may not be the active firewall manager.
Preview allowing inbound TCP port 443.
sudo ufw --dry-run allow 443/tcpDoes not apply the rule; check provider firewalls separately.
Bound log output and avoid publishing credentials, user data or private request URLs.
Show the latest 100 accessible entries from this boot.
journalctl -b -n 100 --no-pagerSystem-wide logs may require extra permissions.
Show recent entries for a unit.
journalctl -u nginx -n 100 --no-pagerSome Nginx logs are files rather than journal entries.
Show recent entries at error priority or more severe.
journalctl -p err --since "1 hour ago" --no-pagerApplications must use journal priorities consistently.
Stream new entries for Nginx.
journalctl -fu nginxCtrl+C stops the viewer.
Read the previous boot when retained.
journalctl -b -1 -n 100 --no-pagerRequires persistent or otherwise retained previous-boot records.
Show space used by archived and active journal files.
journalctl --disk-usageThis does not remove journal data.
Show the tail of the kernel message buffer.
sudo dmesg --human | tail -n 60Access may be restricted and messages may reveal host details.
Read rotation configuration and print debug decisions.
sudo logrotate --debug /etc/logrotate.confDebug mode does not rotate logs or update its state file.
Show the recorded system boot time.
who -bDepends on system accounting records.
Schedules need a known timezone, execution account, environment and logging strategy.
List the current account cron entries.
crontab -lA missing crontab may return a nonzero status.
Open the current account crontab in an editor.
crontab -eSaving changes affects scheduled jobs; review user and timezone.
Inspect system cron locations.
ls -l /etc/cron.d /etc/cron.daily /etc/cron.weeklyFile format differs from a user crontab.
Show active and inactive timer schedules.
systemctl list-timers --all --no-pagerTimers are separate from cron jobs.
Parse a Bash script without executing it.
bash -n ./maintenance.shA syntax pass does not prove correctness or safety.
Run a script with Bash.
bash ./maintenance.shInspect the script and test on staging first.
Treat text containing spaces as one argument.
printf "%s\n" "a filename with spaces.txt"Double quotes still expand variables and command substitutions.
Print executable search directories.
printf "%s\n" "$PATH"Do not add untrusted writable directories to PATH.
Set one variable only for a reviewed child command.
APP_ENV=staging bash ./maintenance.shThis runs the script; use only non-secret values in shell history.
Paths, service names, sockets and PHP versions differ between hosting environments.
Check syntax and whether required configuration files can be opened.
sudo nginx -tNo reload is performed.
Validate and dump the loaded Nginx configuration.
sudo nginx -TOutput may contain upstream credentials or other sensitive settings.
Show build configuration and enabled compiled features.
nginx -VOutput is written to standard error.
Show the PHP binary used by your shell.
php -vCLI and PHP-FPM may use different versions or configuration.
Show loaded CLI ini files.
php --iniDoes not show the PHP-FPM request configuration.
List loaded CLI PHP modules.
php -mCheck the FPM runtime separately for web requests.
Lint one PHP file without running its application code.
php -l ./plugin.phpLint does not validate WordPress hooks or runtime dependencies.
List matching FPM units.
systemctl list-units --type=service --all "php*-fpm.service" --no-pagerUse the actual unit name rather than guessing a PHP version.
Inspect one HTTP response and timing sample.
curl -sS -o /dev/null --connect-timeout 5 --max-time 20 -w 'status=%{http_code} connect=%{time_connect}s first_byte=%{time_starttransfer}s total=%{time_total}s\n' https://example.com/One request is not a reliable performance benchmark.
Use restricted accounts, interactive passwords and private backup locations.
Show the installed MariaDB client version.
mariadb --versionClient version is not necessarily the server version.
Connect and query the server version.
mariadb -u app_user -p -e "SELECT VERSION();"Replace the user; -p prompts rather than exposing a password.
List databases visible to your account.
mariadb -u app_user -p -e "SHOW DATABASES;"Permissions limit which names are visible.
Inspect visible database sessions.
mariadb -u app_user -p -e "SHOW PROCESSLIST;"Queries and connection metadata can contain private information.
Write a private logical database backup.
umask 077; mariadb-dump -u backup_user -p --single-transaction --quick --databases wordpress > ./wordpress-backup.sqlOverwrites the destination; consistency assumes transactional tables and no conflicting DDL. The umask 077 also applies to the rest of this shell session. Backups need tested restores.
Ask a local Redis endpoint to reply.
redis-cli -h 127.0.0.1 -p 6379 PINGUnauthenticated example; use your configured socket/TLS/ACL settings.
Inspect memory statistics using an interactive password prompt.
redis-cli --user app_user --askpass -h 127.0.0.1 INFO memoryRequires compatible redis-cli and ACL permissions; no password in arguments.
Inspect a bounded set of recent slow operations.
redis-cli -h 127.0.0.1 SLOWLOG GET 10Arguments may contain private data; credentials may be required.
Request one incremental batch of matching key names.
redis-cli -h 127.0.0.1 SCAN 0 MATCH "wp:*" COUNT 100COUNT is a hint; use the returned cursor until zero for a full iteration.
Keep local work safe and review changes before updating a live checkout.
Show branch state and changed paths.
git status --short --branchUntracked files are not part of commits until added.
Show local unstaged edits in one path.
git diff -- ./config.confDoes not include staged changes.
Show changes prepared for the next commit.
git diff --cachedCheck for accidentally staged secrets.
Show a compact recent history.
git log -n 10 --oneline --decorateCommit messages are descriptions, not proof of deployment.
List configured fetch and push URLs.
git remote -vURLs may contain private repository information.
Download remote objects and update tracking references.
git fetch originDoes not update working-tree files; still changes local Git state.
List fetched commits not in the current HEAD.
git log --oneline HEAD..origin/mainReplace main if your deployment uses a different branch.
Update from main only when a fast-forward is possible.
git pull --ff-only origin mainReview local status and backups first; hooks or deployed code may affect production.
Stage one file and commit the prepared index.
git add -- ./config.conf && git commit -m "Update configuration"Any other staged files also enter this commit; review git diff --cached first.
Run as the website owner from the correct installation; avoid running WordPress as root.
Inspect the CLI binary and PHP environment.
wp --infoRequires WP-CLI installed on your command path.
Show the WordPress version in an example installation.
wp --path=/srv/www/example.com/public core versionReplace the path with your actual WordPress root.
List installed plugins and update metadata.
wp --path=/srv/www/example.com/public plugin listWordPress bootstrap can load application code and contact services.
List installed themes.
wp --path=/srv/www/example.com/public theme listRequires access to the installation and its database.
Compare core files against official published checksums.
wp --path=/srv/www/example.com/public core verify-checksumsContacts WordPress.org; not a complete malware or custom-code audit.
Read the stored WordPress site URL.
wp --path=/srv/www/example.com/public option get siteurlMultisite context may require an explicit --url value.
List WordPress cron events.
wp --path=/srv/www/example.com/public cron event listWP-Cron is distinct from the host cron scheduler.
Preview a WordPress-aware database replacement.
wp --path=/srv/www/example.com/public search-replace "https://old.example" "https://new.example" --skip-columns=guid --dry-runRequires a current backup; dry run can still bootstrap plugins and read many tables.
List database tables for this WordPress configuration.
wp --path=/srv/www/example.com/public db tablesDatabase access and the correct site context are required.
End of the commands.
Search by task or command name and narrow the list with the category and effect filters.
Read what the command does and what it needs. Replace the example values with paths, hosts and accounts you have checked.
Copy one block, review it in your terminal and run it only when it suits your own system.
Use this Linux command cheat sheet as a reference by task. The examples cover the shell, files, system checks, networking, deployment and a WordPress server stack. They are separate examples, not one installation script.
General examples assume Bash and the GNU tools. Package commands are for Ubuntu and Debian, and systemd, service names and installed programs vary. The page does not run commands or contact your server. An "Inspect" label describes the intended effect, not a promise of no side effects. Review the change and your backups before you change a live system.
These are practical examples rather than every command or option on Linux. The manuals installed on your server are the best reference for your exact versions. Some programs need a package installed first, and service names and hosting paths vary.
No. Copy buttons put only the command text on your clipboard. Nothing connects to your server or runs a command; you choose whether to run it in your own terminal.
No. General examples assume Bash and the common GNU tools. APT examples are for Ubuntu and Debian, and systemctl and journalctl need systemd. Check your installed manual pages, package names and service names before you use them.
"Inspect" means the example mainly reads information, although it may use the network, create temporary files or load application code. "Changes state" means it can write files, change accounts or settings, or open a session that can. "May interrupt service" marks actions such as a restart or stopping a process.
No. Use your normal account by default, and use sudo only for a task that needs it, after checking the command and its target. Run WP-CLI as the website owner, not as root.
Replace example.com, example file names, accounts, ports, service names and process IDs with values you have checked. Put quotes around paths that contain spaces. Each example stands alone, so do not paste the whole page as a script.
Some commands use a non-zero status for normal results: diff returns 1 when files differ, grep returns 1 when nothing matches, and service checks return non-zero for a stopped service. Read the manual and the output before you treat a status as a failure.
The page selects the command text so you can use your device's normal Copy action, and you can always select a code block by hand. All the command text stays readable with JavaScript turned off.
No. Commands need checking for your own machine and permissions. Keep backups you can restore, test restores and review changes on staging. A passing syntax check, checksum or single timing does not prove security or production speed.
Build installation and maintenance commands.
Prepare routing, HTTPS and cache configuration.
Build schedules and preview upcoming runs.
Choose PHP extensions and runtime settings.