How to Compress and Extract Files in Linux Using tar (Complete Guide) The tar command is one of the most commonly used tools in Linux for compressing and extracting files and folders . Whether you're creating backups, transferring data, or packaging applications, mastering tar is essential. In this guide, you'll learn how to compress folders into .tar.gz archives , extract them, and understand what each option does — with practical examples. What Is tar? tar stands for Tape Archive . It was originally designed for backups, but today it's widely used to bundle files and optionally compress them using tools like gzip . A common format you’ll see is: .tar → archive only (no compression) .tar.gz → archive + gzip compression .tar.bz2 → archive + bzip2 compression Compress a Folder Using tar To compress a file or directory into a .tar.gz archive, use: tar -czvf archive-name.tar.gz path/to/folder Example tar -czvf backup.tar.gz /...