What does the Linux command gunzip

Linux Linux: unzip zip - that's how it works


Archives are very useful for bundling many files into a single file. For example, an entire folder can be downloaded with the browser. In addition, archives often use compression algorithms in order to keep the data size as small as possible, which also favors the transmission. Now, however, the question arises of how to get the original files back. We are going to show you here how it works on your Linux operating system.

Extract via the desktop environment

Most Linux distributions already have Standard tools installed, which relieve you of the unpacking of an archive. So you can easily unpack your packed directories. Often times, you can just do one Right click on the archive file and select the unzip option. The name of this option naturally depends on the operating system in question. Often an archive manager is also like Engrampa or File Roller pre-installed. The operation is analogous to what you may be used to from Windows. Choose the option that's right for you. The unzipped files can then be easily moved to a folder of your choice and used.

Unzip via the console

When unpacking via the console you have to pay attention to which one Archive types (zip, tar, ...) it is. If your archive file has multiple extensions, such as .tar.gz, then you need to use the combined archive format method. Here we show you the commands for the most common formats using a sample file that we "test"have called.

First, use the console to navigate to the directory, yours Archive file contains.

  • For .zip Files use the following command:
  • At .tar Files you can use this command:
  • .gz Extract files with
  • .bz2 Files can be extracted with this command:

Unpack combined archive formats

Sometimes the different formats also combinedso that endings like .tar.gz or .tar.bz2 surrender. You then simply have to unzip these files several times. For example, with .tar.bz2 you have to unzip the bz2 first and then the tar:

is extracted like this:

Test.tar.bz2 you unpack like this:
The commands are simply combined with one another.