Commonly used · Troubleshooting the network
curl: Request URL or download content
Syntax
curl [-IsSfL] [-o file] URLOptions
-I- Only look at response headers
-o- save to file
-s / -S / -f / -L- Teaching Compatible Switch
Examples
curl -o config.json https://example.com/config.jsonUsage and sandbox support
Only https://example.com/health and /config.json are simulated; no real requests are made.
Hands-on exercises
- Check the HTTP health interfaceEveryday
- Download remote configuration to localEveryday
- Query health interface response headerAdvanced
- Delivery Challenge ① Download ConfigurationAdvanced
- Download the configuration and explicitly select request optionsMaster
Related commands
ipQuery address and routingssView sockets and listening portspingCheck host connectivitydigQuery DNS recordsnslookupQuery host addresswgetDownload filesshLog in to the remote machinescpCopy files via SSHhostQuery DNStracerouteProbing network routestracepathDetection path and MTUmtrContinuously observe routing and packet lossncTest connection or listening portsocatConnect data streams to socketstcpdumpCapture network packetsnmapDetect authorized host portethtoolQuery network interface informationnmcliManage NetworkManager connectionssftpTransfer files interactively through SSHssh-keygenGenerate SSH keyssh-copy-idInstall the SSH public keyopensslCheck TLS with certificate