# Curl by Seth Kenlon Curl is commonly considered a non-interactive web browser. That is, it's able to pull information from the Internet and display it in your terminal, or save it to a file. This is literally what web browsers do, such as Firefox or Chromium, except they *render* the information by default, while curl downloads and displays raw information. In fact, ``curl`` does much more, and has the ability to transfer data to or from a server, using one of many supported protocols, including HTTP, FTP and SFTP, IMAP, POP3, LDAP, SMB, SMTP, and many more. It's a useful tool to the average terminal user, a vital convenience for the sys admin, and a QA tool for the microservices and cloud developer. Curl is designed to work without user interaction, so unlike Firefox you must think think about your interaction with online data from start to finish. For instance, if you want to view a web page in Firefox, you first launch a Firefox window. After Firefox is open, you type the website you want to visit into the URL field or into a search engine. Then you navigate to the site and click on the page you want to see. The same concepts apply to curl, except you do it all at once: you launch curl, feeding it the exact location on the Internet you want to see, and you tell it whether you want to the data to be saved in your terminal or to save it to a file. The complexity increases when you have to interact with a site requiring authentication, or with an API, but once you learn the ``curl`` command syntax, it becomes second nature. ## Download a file with curl You can download a file with curl by providing a link to a specific URL. If you provide an URL that defaults to ``index.html``, then the index page gets downloaded. The file downloaded is displayed in your terminal screen. You can pipe the output to ``less`` or ``tail`` or any other command. ``` $ curl "http://example.com" | tail -n 4
This domain is for use in illustrative examples in documents. You may use this domain in literature without prior coordination or asking for permission.