How to unzip a tar.gz file from the linux command line:
So you’ve downloaded a tar.gz file from some place or the other on the web, but you have an issue. You do not know how to uzip this file. Here is the procedure you need to follow to unzip it:
Unzipping the file:
To unzip a tar.gz file from the command line in linux, complete the following steps in the order presented:
1. Open a “Terminal Window” or “Command Console” or the command line. (in CentOS 4.5 click on “Applications” in the menu bar, point to “System Tools” and click on “Terminal”).
2. Login as the root user (type su press enter and type in your password)
3. Go to the directory that the tar.gz file is located in. Use the command “cd” (the letter “c” followed by the letter “d” without quotation marks) followed by the directory you wish to go to. For instance if you are in the “home” directory and you wish to go to a directory/folder that is in the home directory called “testdirectory”, you would type the command “cd testdirectory” (without quotes) that will put you in the “testdirectory” directory. The point being that whatever commands you execute at the command line at this point will affect the files in that (”testdirectory” in this case) directory specifically unless you specify otherwise.
4. Type the command “tar -zxvf [filename]” (that is tar -zxvf followed by the name of the file you want to unzip). This will unzip the file and put it in a new directory (within the same directory) in the unzipped format.
Your TrueStar Technology Expert



























