Sign up ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

What is the difference between gunzip and unzip? Tried to search but couldn't find anything relevant with this.

share|improve this question
There was no need to search something. All you had to do just to open man unzip and then open man gunzip. All differences are there. ;) –  rush Sep 20 '12 at 12:42
Hmmm. Thanks for the advise :) –  mtk Sep 20 '12 at 13:14
Or for a concise one-line description, whatis gunzip unzip. –  jw013 Sep 20 '12 at 17:20

2 Answers 2

up vote 5 down vote accepted

unzip decompress zip algorithm same *.zip files and gunzip decompress gz algorithm that same *.gz files. If you migrated from windows, You have many compression algorithm in UNIX world such as *.7z , *.gz , *.bz2 and so on. Also you can compress file which already archived with tar command: such as :

tar -zcvf mydir.tar.gz mydir #gz and tar
tar -jcvf mydir.tar.bz2 mydir #bz2 and tar 
share|improve this answer
tar -Jcvf mydir.tar.xz mydir #xz and tar –  vonbrand Jan 16 '13 at 10:56
tar --use-compress-program=funky-compress cvf mydir.tar.fc mydir #Some other compression –  vonbrand Jan 16 '13 at 10:57
Why do you say that 7z is "a compression algorithm in UNIX world"? –  Pacerier Jul 14 at 9:26

They are two different programs to unzip two different types of compressed files:

  • unzip: "list, test and extract compressed files in a ZIP archive" (from the man page). The Zip file format is the most commonly used compression format on Windows machines, the file ending is typically .zip. See the Wikipedia article for more information.
  • gunzip: For a similar file format for single compressed files, much more common in Unix/Linux systems. The file ending is typically .gz. gzip files contain only one compressed file, if compression of a folder-like structure is required, additional tools like tar are used, typically resulting in compressed folders with a line ending .tar.gz or .tgz. This is what Wikipedia has to say about the gzip format and program.
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.