How to Uncompress Files in Linux

Linux users frequently have to uncompress .tar, .gzip, or .zip files. There are GUI utilities that can do this, but there may be instances where you have to do this from a Linux command shell. The following commands covers the most used compression formats for Linux.

Uncompressing a .tar File

tar -xvf file.tar

Uncompressing a .gz File

gunzip file.gz

Uncompressing a .zip File


Uncompressing a .tar.gz File

gunzip file.tar.gz
tar -xvf file.tar

Or you can uncompress both formats in one command:

tar -zxvf file.tar.gz

2 Responses to How to Uncompress Files in Linux

  1. Actually, these days we really don’t have to use the command line. Mostly you just right click the file and select unzip.

    Ubuntu Linux is amazing when you look at just how much it has improved over the few years.

  2. Johan says:

    You don’t need to use the command line when your on a Linux machine, but many times I’m logged in to web host through an SSH command line client so I need to type these commands to get things done. 🙂

    It would be nice to have a desktop interface when logged in to web servers.

Leave a Reply

Your email address will not be published. Required fields are marked *