tar -czvf name-of-archive.tar.gz name-of-the-file-to-be-compressed
-c: Create an archive.
-z: Compress the archive with gzip.
-v: Display progress in the terminal while creating the archive(verbose mode).
-f: Allowsto specify the filename of the archive.