# how to open .tar.gz files in ubuntu



## choywg

How do I open the *.tar.gz *files in ubuntu 8.04? 

thanks and regards,


----------



## shuuhen

Ubuntu may be configured so that you get an option to handle those files by right clicking on them. A program that can let you explore archives graphically is *Ark*, which can be installed with the package manager (might be installed already).

From the command line you could use *tar xzvf filename.tar.gz* to expand the archive.


----------



## totschkow

Hi, There is also a windows way of doing this. If you install Crusader or gnome commander using synaptic package manager in ubuntu you will find it quite easy to unpack those files.
It is just like what you had in total commander under your windows.


----------



## lensman3

From a text screen: Enter

tar -vtzf <filename.tar.gz>

-v is verbose, -t is table, -z is zip compression, -f means the <filename.tar.gz> follows. Do this first so you can see which directory/directories the fill will be untar into. The order of the vtz can be in any order but the -f must be at the end.

Then run:
tar -vxgf <filename.tar.gz>

The -x replaces the -t which means eXtract. Generally, speaking when the tar is extracted it will place the files in and below the current working directory.

Other compression methods that tar can use are -j for the bzip2 compression method. The -b was taken years ago and means blocking-factor for input or output. Recall that tar stands for tape archive and tapes record data in blocks and for efficiency have blocking-factors. The gzip compression method uses -z. 

Also have you tried double clicking on the file in the File Browser?


----------

