Install Curl
Install Curl
It is always better to first update your installed packages with the latest
stable version available from the Debian repo using apt update or apt-get
update command. This will prevent any unforeseen issues which might come
up due to older version of dependent packages installed in the System.
In the next step, you can install curl from Debian repo by using apt install
curl -y or apt-get install curl -y command as shown below. This will
download and install curl package with all its dependencies.
Advertisements
curl
If you want to check the current installed version of curl command then you
need to use curl --version command as shown below. As you can see
current version is 7.74.0.
Protocols: dict file ftp ftps gopher http https imap imaps ldap
ldaps mqtt pop3 pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet
tftp
It is now time to test the usage of curl utility. You can run a simple curl
command to get the http header of URL google.com using curl -I
https://www.google.com command as shown below. This gives a status code
of 200 which means google.com supports HTTP/2 protocol.
HTTP/2 200
p3p: CP="This is not a P3P policy! See g.co/p3phelp for more info."
server: gws
x-xss-protection: 0
x-frame-options: SAMEORIGIN
cache-control: private
set-cookie:
NID=511=NtIbXJN2eg7QOjzwESGjYM0JxhjNzFiNEmK1vzTDnt61JBGeUspsnUnwPbQ
wzhSMeJR17wTznkPabxQtzai7fDhXRZuVy_JK9ZIUX-40b-
iz7rLrENm3ul64oitXzlAAX5kz0kuZ_x_Il_ZAGQVOj3odf_2TCift-dg94wAluSI;
expires=Fri, 15-Apr-2022 21:02:34 GMT; path=/; domain=.google.com;
HttpOnly