In this article, you’ll learn How to Extract a tar.gz File in Linux using Terminal. Here you’ll get all the commands you need to unzip/extract a .tar.gz file.
The ta.gz file contains several compressed files, we use this to save the storage & bandwidth at the time of downloading. The .tar file acts as a portable container for other files and is sometimes called a tarball.
Now to use that tar.gz file, first, we need to extract it. As it got extracted then you’ll be able to use it for something. To unzip a tar gz file in Linux you just need terminal & gzip utility (included by default). so without further ado let’s see how to extract tar.gz file in Linux.
Steps to Extract a tar.gz File in Linux using Terminal in 2022
1) In the first step, open the terminal by directly pressing
ctrl+alt+T in your Linux system. Now find the exact location of your file, for example, our file is located on the Desktop.
2) Now as our .tag.gz is located on the desktop so change your directory to the desktop, for that type
3) Now to list the contents of the directory, simply type
4) As you type ls, you’ll see your tar.gz file. In our case, the file name is “pycharm-community-2021.3.1.tar.gz”. so type the following command & change our file name with your file name.
tar -zxvf pycharm-community-2021.3.1.tar.gz
5) Here you go, as you hit the Enter your file will get extracted in the same directory.
Also Read:- Virtualbox UEFI Shell startup.nsh Error Fixed
Wrap Up: Extract / Unzip a tar.gz File in Linux
This is all on the topic of How to Extract a tar.gz File in Linux using Terminal in 2022. I hope it helps you.
If you got any issues then feel free to ask in the comment section or our Twitter page.