Differences between Kurly and curl in Linux


As Linux users, we often work on servers, remote machines, or headless systems where the graphical interface is not available. In these situations, the command line interface becomes the primary method of interacting with the system. Text editors and web browsers can also be used from the command line, but we need tools to download files from the internet. That's where Kurly and Curl come in.

Are you tired of using the same old Curl command to download files from the internet in your Linux system? Then you may want to check out Kurly, a newer and faster alternative that is gaining popularity among Linux users. In this article, I'm going to show you how to install Kurly on your Linux system, as well as the differences and advantages it has over Curl. You'll also learn how to use Kurly in various ways, such as downloading files from HTTP and HTTPS protocols, showing download progress, and setting timeouts. So, let's get started and explore this new tool that can simplify your workflow and save you time.

How to Install Kurly in Linux

1. Installing Kurly on Ubuntu and Debian

Kurly is available in the official Ubuntu and Debian repositories, so installing it is straightforward. Open your terminal and enter the following command to install Kurly −

sudo apt-get install kurly

Once installed, you can start using Kurly by typing kurly followed by the URL of the file you want to download.

2. Installing Kurly on CentOS

Kurly is also available in the EPEL (Extra Packages for Enterprise Linux) repository, which is not enabled by default on CentOS. To install Kurly, first, enable the EPEL repository by running the following command 

sudo yum install epel-release

Then, install Kurly by running −

sudo yum install kurly

You can now use Kurly by typing kurly followed by the URL of the file you want to download.

3. Installing Kurly on Fedora

Similar to CentOS, Kurly is available in the EPEL repository for Fedora. To install Kurly, first, enable the EPEL repository by running −

sudo dnf install epel-release

Then, install Kurly by running −

sudo dnf install kurly

Now that Kurly is installed on your Linux system, you can start using it to download files from the internet. Kurly offers additional features over Curl, such as displaying download progress and setting timeouts, which can make it a useful tool for your command line workflow.

How to Use Kurly in Linux

1. Basic usage

To start using Kurly for downloading files, you'll need to open up a terminal and type in the kurly command, followed by the URL of the file you want to download. For instance, if you're looking to download a file from GitHub, you would simply type in the following command 

kurly https://github.com/username/repo/raw/branch/file

By default, Kurly will download the file to your current working directory. You can also specify a different directory by adding the -o option followed by the path to the directory.

Here you can see an example for the same −

kurly -o /home/user/downloads https://github.com/username/repo/raw/branch/file

2. Showing download progress

Kurly will allow you to see the download progress, which can be helpful when downloading bigger files. To display the download progress, add the -v option to your Kurly command.

Here is an example of explaining the same −

kurly -v https://github.com/username/repo/raw/branch/file

By executing the following command the output will look like this −

*   Trying 140.82.121.4:443...
* TCP_NODELAY set
* Connected to github.com (140.82.121.4) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*   CAfile: /etc/ssl/certs/ca-certificates.crt
  CApath: /etc/ssl/certs
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256
* ALPN, server did not agree to a protocol
* Server certificate:
*  subject: C=US; ST=California; L=San Francisco; O=GitHub, Inc.; CN=github.com
*  start date: Aug  5 00:00:00 2021 GMT
*  expire date: Aug 10 23:59:59 2022 GMT
*  subjectAltName: host "github.com" matched cert's "github.com"
*  issuer: C=US; O=DigiCert Inc; CN=DigiCert TLS RSA SHA256 2020 CA1
*  SSL certificate verify ok.
> GET /username/repo/raw/branch/file HTTP/1.1
> Host: github.com
> User-Agent: kurly/1.3.1
> Accept: */*
>
* TLSv1.2 (IN), TLS handshake, Newsession Ticket (4):
* TLSv1.2 (IN), TLS handshake, Newsession Ticket (4):
* TLSv1.2 (IN), TLS handshake, Newsession Ticket (4):
< HTTP/1.1 200 OK
< Server: GitHub.com
< Content-Type: application/octet-stream
< Last-Modified: Wed, 16 Feb 2022 15:13:56 GMT
< Access-Control-Allow-Origin: *
< ETag: "d1a53c91d31089e36e0d58f100000000"
< Expires: Fri, 19 Feb 2021 16:10:57 GMT
< Cache-Control: max-age=31536000
< X-Proxy-Cache: MISS
< X-GitHub-Request-Id: ABCD:1234:5678:90AB:0123
< Content-Length: 456789
< Accept-Ranges: bytes
< Date: Fri, 19 Feb 2021 16:10:57 GMT
< Via: 1.1 varnish
< Connection: keep-alive
< X-Served-By: cache-lga21949-LGA
< X-Cache: HIT
< X-Cache-Hits: 1
< X

3. Setting timeouts

Kurly allows you to set timeouts for downloads, which can be useful when downloading from slow or unreliable servers. You can set a timeout for connecting to the server using the -t option followed by the timeout value in seconds.

Here is an example of setting the timeouts −

kurly -t 30 https://github.com/username/repo/raw/branch/file

By executing the following command, the output will look like this 

Downloading https://github.com/username/repo/raw/branch/file...
Downloaded 1024 bytes in 0.039s (26.0 kB/s)

This command sets the connection timeout to 30 seconds.

4. Using HTTP and HTTPS

Kurly supports both HTTP and HTTPS protocols, which are the most commonly used protocols for downloading files from the internet. To download a file using HTTP, simply type the URL without the https:// prefix.

Here's an example of how to use Kurly using HTTP and HTTPS −

kurly http://example.com/file

To download a file using HTTPS, type the URL with the https:// prefix, you can refer following example −

kurly https://example.com/file

By executing the following commands, the output will look like this −

Downloading http://example.com/file...
Downloaded 1024 bytes in 0.031s (32.6 kB/s)

Kurly also supports downloading files from FTP and SFTP servers. Simply replace http or https with ftp or sftp in your Kurly command.

Conclusion

In summary, Kurly and Curl are both tools for downloading files in Linux. Kurly is a lightweight and easy-to-use alternative to Curl, while Curl offers a wider range of features for more complex use cases. The tool you choose will depend on your specific needs and preferences. If you want a simple and quick way to download files, Kurly is a good choice. But if you need more advanced features or want to integrate with other software, Curl may be the better option. Understanding the differences between these two tools can help you choose the one that best suits your needs and improve your workflow in Linux.

Updated on: 26-Jul-2023

42 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements