curl
Transfer data from or to a server using URLs with support for many protocols.
Synopsis
curl [OPTION]... URL...
Examples
curl https://api.example.com/data
curl -o file.zip https://example.com/file.zip
curl -X POST -H 'Content-Type: application/json' -d '{"key":"val"}' https://api.example.comcurl -sL https://example.com | head
curl -I https://example.com
Common options
| Flag | Description |
|---|---|
| -o | Write output to file |
| -O | Save with remote filename |
| -L | Follow redirects |
| -s | Silent mode |
| -v | Verbose output |
| -H | Add custom header |
| -X | HTTP method |
| -d | POST data |
About curl
The `curl` command transfer data from or to a server using URLs with support for many protocols. Networking commands handle connectivity testing, DNS resolution, data transfer, remote access, firewall rules, and traffic analysis.
Linux is the dominant server operating system, and strong networking skills are essential for web hosting, container orchestration, security auditing, and infrastructure management. The command accepts 8 commonly used flags shown above, though the full set of options is available in the man page (`man curl`).
The 5 examples on this page cover typical real-world usage patterns that you can copy and adapt for your own workflows.
Related commands
More Network Commands
Other commands in the Network category