{"id":5702,"date":"2023-06-10T07:03:33","date_gmt":"2023-06-10T07:03:33","guid":{"rendered":"https:\/\/www.iseepassword.com\/blog\/?p=5702"},"modified":"2023-10-16T07:30:13","modified_gmt":"2023-10-16T07:30:13","slug":"how-to-extract-tar-gz-file-on-ubuntu","status":"publish","type":"post","link":"https:\/\/www.iseepassword.com\/blog\/how-to-extract-tar-gz-file-on-ubuntu\/","title":{"rendered":"How to Extract Tar Gz File on Ubuntu"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_69_1 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.iseepassword.com\/blog\/how-to-extract-tar-gz-file-on-ubuntu\/#Video_Tutorial\" title=\"Video Tutorial:\">Video Tutorial:<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.iseepassword.com\/blog\/how-to-extract-tar-gz-file-on-ubuntu\/#The_Challenge_of_Extracting_Tar_Gz_File_on_Ubuntu\" title=\"The Challenge of Extracting Tar Gz File on Ubuntu\">The Challenge of Extracting Tar Gz File on Ubuntu<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.iseepassword.com\/blog\/how-to-extract-tar-gz-file-on-ubuntu\/#Things_You_Should_Prepare_for\" title=\"Things You Should Prepare for\">Things You Should Prepare for<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.iseepassword.com\/blog\/how-to-extract-tar-gz-file-on-ubuntu\/#Method_1_Via_Command_Line\" title=\"Method 1: Via Command Line\">Method 1: Via Command Line<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.iseepassword.com\/blog\/how-to-extract-tar-gz-file-on-ubuntu\/#Method_2_Via_Archive_Manager\" title=\"Method 2: Via Archive Manager\">Method 2: Via Archive Manager<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.iseepassword.com\/blog\/how-to-extract-tar-gz-file-on-ubuntu\/#Method_3_Via_Right-clicking\" title=\"Method 3: Via Right-clicking\">Method 3: Via Right-clicking<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.iseepassword.com\/blog\/how-to-extract-tar-gz-file-on-ubuntu\/#Why_Cant_I_Extract_My_Tar_Gz_File\" title=\"Why Can&#039;t I Extract My Tar Gz File?\">Why Can't I Extract My Tar Gz File?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.iseepassword.com\/blog\/how-to-extract-tar-gz-file-on-ubuntu\/#Additional_Tips\" title=\"Additional Tips\">Additional Tips<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/www.iseepassword.com\/blog\/how-to-extract-tar-gz-file-on-ubuntu\/#5_FAQs_about_Extracting_Tar_Gz_File_on_Ubuntu\" title=\"5 FAQs about Extracting Tar Gz File on Ubuntu\">5 FAQs about Extracting Tar Gz File on Ubuntu<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/www.iseepassword.com\/blog\/how-to-extract-tar-gz-file-on-ubuntu\/#In_Conclusion\" title=\"In Conclusion\">In Conclusion<\/a><\/li><\/ul><\/nav><\/div>\n<p>If you are a Linux user, day by day you will interact more and more with shell commands. They are much faster and more efficient than graphic applications that have GUIs. Therefore, you will want to learn more and more commands to know how to perform various actions in Linux distributions. One of these actions is the extraction of compressed files, and the tar.gz file is a common type of compressed file. In this tutorial, I will show you how to extract tar gz file in Ubuntu.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Video_Tutorial\"><\/span>Video Tutorial:<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p> <\/p>\n<h2><span class=\"ez-toc-section\" id=\"The_Challenge_of_Extracting_Tar_Gz_File_on_Ubuntu\"><\/span>The Challenge of Extracting Tar Gz File on Ubuntu<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>When you download software or documents or any other items from the internet, they are often packaged into a single file. Tar Gz files are one of the most common types of files that contain multiple files and directories. Some of the challenges you might experience during this process include:<\/p>\n<ul>\n<li>Not knowing how to extract these files, especially if you are new to Ubuntu.<\/li>\n<li>Extracting files in the wrong directory<\/li>\n<li>Struggles with syntaxes and proper use of commands<\/li>\n<\/ul>\n<p>This tutorial aims to teach you how to extract tar.gz files and avoid scenarios such as files being extracted to the wrong directory.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Things_You_Should_Prepare_for\"><\/span>Things You Should Prepare for<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Before extracting any files, there are things that you should prepare. These will ensure that the process goes seamlessly, and that you can avoid any possible errors. These include:<\/p>\n<p>1. Having a stable internet connection. Since you are most likely downloading the tar gz file from the internet, a stable internet will ensure that there are no errors in the download process<\/p>\n<p>2. Ensuring that you have enough disk space. Before you start extracting files, it is essential to ensure that you have enough space to avoid errors.<\/p>\n<p>3. Familiarizing yourself with the terminal if you are new to Ubuntu or Linux, this will give you a smooth time when executing commands.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Method_1_Via_Command_Line\"><\/span>Method 1: Via Command Line<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>To open the command line interface on your Ubuntu version, press CTRL + ALT + T keys simultaneously. Alternatively, go to the Applications menu, select Accessories, and then Terminal. <\/p>\n<p><b>Step 1:<\/b> Navigate to the folder where the tar gz file is located. (Note: Navigate to the folder where the file is and do not include the file name when typing in the path.)<br \/>\ne.g.<\/p>\n<pre><code>$ cd ~\/documents<\/pre>\n<p><\/code><br \/>\n<b>Pros:<\/b><\/p>\n<ul>\n<li>Fast and efficient way to extract files<\/li>\n<li>You have more control over the actions you perform<\/li>\n<li>You can execute more tasks at the same command prompt<\/li>\n<\/ul>\n<p><b>Cons:<\/b><\/p>\n<ul>\n<li>It may be challenging for new users to remember commands<\/li>\n<li>If you are not sure about a command, you may end up causing unintended consequences<\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"Method_2_Via_Archive_Manager\"><\/span>Method 2: Via Archive Manager<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>The Archive Manager offers an easy way to extract files. It is a graphical user interface tool, so the process is more straightforward than using the command line. <\/p>\n<p><b>Step 1:<\/b> Browse to the file and double-click on the tar gz file<br \/>\n<b>Step 2:<\/b> The Archive Manager window pops up, select the Extract button on the top menu bar<br \/>\n<b>Step 3:<\/b> Select the destination folder where you want the files to be extracted and Click on the Select button.<br \/>\n<b>Step 4:<\/b> A pop-up notification informs you that the files have been successfully extracted.<\/p>\n<p><b>Pros:<\/b><\/p>\n<ul>\n<li>Easy to use, even for new Ubuntu users<\/li>\n<li>There are fewer possible mistakes when using the graphical interface<\/li>\n<li>You can modify settings in the process of extraction<\/li>\n<\/ul>\n<p><b>Cons:<\/b><\/p>\n<ul>\n<li>The Archive Manager may not be available to some Ubuntu versions by default<\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"Method_3_Via_Right-clicking\"><\/span>Method 3: Via Right-clicking<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>This method is the fastest of the three, and it is convenient if you need to extract a few files. <\/p>\n<p><b>Step 1:<\/b> Locate and right-click on the tar.gz file<br \/>\n<b>Step 2:<\/b> A dropdown menu appears. Select \u201cExtract here\u201d or \u201cExtract to\u201d for a destination folder<br \/>\n<b>Step 3:<\/b> Wait for the file to be extracted<\/p>\n<p><b>Pros:<\/b><\/p>\n<ul>\n<li>The easiest and quickest method of the three<\/li>\n<li>It only needs Ubuntu default settings<\/li>\n<\/ul>\n<p><b>Cons:<\/b><\/p>\n<ul>\n<li>Can only work with Ubuntu's built-in support for archive formats<\/li>\n<li> May not be applicable to advanced file extraction situations<\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"Why_Cant_I_Extract_My_Tar_Gz_File\"><\/span>Why Can't I Extract My Tar Gz File?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Below are some reasons why you may not be able to extract your tar.gz file and how to fix it.<\/p>\n<p><b>1. The filename may have an error:<\/b> Ensure that you have typed the file name correctly, including its extension. This error typically occurs when you rename a file.<\/p>\n<p><b>2. The file location has an error:<\/b> Ensure that you are located in the right path of the file location.<\/p>\n<p><b>3. Permission issues:<\/b> Tar gz files may have different permissions; hence, ensure that you have the right user permissions to access the file. Use the chmod command to change the file permissions.<\/p>\n<p><b>Fixes:<\/b><\/p>\n<ul>\n<li>Double-check the file name and its extension<\/li>\n<li>Navigate to the document where the file is located to ensure and correct any errors with the path<\/li>\n<li>Use chmod commands to amend the permission issue<\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"Additional_Tips\"><\/span>Additional Tips<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<ul>\n<li>Be careful with spaces and special characters when naming files or creating folders<\/li>\n<li>Archive files should be kept at a separate location rather than mixed with other files<\/li>\n<li>Use tar then gzip rather than vice versa to save time and avoid errors<\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"5_FAQs_about_Extracting_Tar_Gz_File_on_Ubuntu\"><\/span>5 FAQs about Extracting Tar Gz File on Ubuntu<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h4>Q1: Do I need to install any software to extract tar.gz files?<\/h4>\n<p>A: No, Ubuntu comes with built-in support for extracting tar gz files.<\/p>\n<h4>Q2: Do I need to extract all files from the tar.gz file?<\/h4>\n<p>A: No, you can extract selected files by specifying the file name or location.<\/p>\n<h4>Q3: How can I view the contents of a tar gz file?<\/h4>\n<p>A: You can view the contents of tar.gz file by using the \" tar  -tf filename.tar.gz\" command.<\/p>\n<h4>Q4: What if I forget the command to extract files?<\/h4>\n<p>A: Type \"man tar\" or \"tar --help\" to show manual pages or help pages.<\/p>\n<h4>Q5: Can I extract tar.bz2 files with these methods?<\/h4>\n<p>A: No, you need to use the bzip2 utility to extract tar.bz2 files.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"In_Conclusion\"><\/span>In Conclusion<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Extracting tar gz files is a routine task that Ubuntu users regularly perform. The methods outlined above offer easy and efficient ways to extract files. It is essential to prepare beforehand, familiarize yourself with the Ubuntu terminal, and be cautious with naming files. Follow the methods and tips provided above, and you will have a seamless experience extracting tar gz files on Ubuntu.{\"@context\":\"https:\/\/schema.org\",\"@type\":\"FAQPage\",\"mainEntity\":[{\"@type\":\"Question\",\"name\":\" Do I need to install any software to extract tar.gz files?\",\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\" No, Ubuntu comes with built-in support for extracting tar gz files.\"}},{\"@type\":\"Question\",\"name\":\" Do I need to extract all files from the tar.gz file?\",\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\" No, you can extract selected files by specifying the file name or location.\"}},{\"@type\":\"Question\",\"name\":\" How can I view the contents of a tar gz file?\",\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\" You can view the contents of tar.gz file by using the \" tar  -tf filename.tar.gz\" command.\"}},{\"@type\":\"Question\",\"name\":\" What if I forget the command to extract files?\",\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\" Type \"man tar\" or \"tar --help\" to show manual pages or help pages.\"}},{\"@type\":\"Question\",\"name\":\" Can I extract tar.bz2 files with these methods?\",\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\" No, you need to use the bzip2 utility to extract tar.bz2 files.\"}}]}<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you are a Linux user, day by day you will interact more and more with shell commands. They are much faster and more efficient than graphic applications that have GUIs. Therefore, you will want to learn more and more commands to know how to perform various actions in Linux distributions. One of these actions [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[1],"tags":[],"class_list":["post-5702","post","type-post","status-publish","format-standard","hentry","category-resources"],"_links":{"self":[{"href":"https:\/\/www.iseepassword.com\/blog\/wp-json\/wp\/v2\/posts\/5702","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.iseepassword.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.iseepassword.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.iseepassword.com\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.iseepassword.com\/blog\/wp-json\/wp\/v2\/comments?post=5702"}],"version-history":[{"count":2,"href":"https:\/\/www.iseepassword.com\/blog\/wp-json\/wp\/v2\/posts\/5702\/revisions"}],"predecessor-version":[{"id":10209,"href":"https:\/\/www.iseepassword.com\/blog\/wp-json\/wp\/v2\/posts\/5702\/revisions\/10209"}],"wp:attachment":[{"href":"https:\/\/www.iseepassword.com\/blog\/wp-json\/wp\/v2\/media?parent=5702"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.iseepassword.com\/blog\/wp-json\/wp\/v2\/categories?post=5702"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.iseepassword.com\/blog\/wp-json\/wp\/v2\/tags?post=5702"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}