curl -o /dev/null -s -w '%{http_code} %{time_total}s\n' https://example.com

Category: Web Servers & Proxies

curl -o /dev/null -s -w '%{http_code} %{time_total}s\n' https://example.com

Check HTTP status code and total response time

-w prints the status code and the total seconds the request took, with the body discarded to /dev/null. A fast 200 means the site is healthy, while a 5xx with a long time points at backend trouble. Wrap this in a loop or cron job for simple uptime monitoring.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.