{"id":13494,"date":"2024-08-30T05:16:17","date_gmt":"2024-08-30T05:16:17","guid":{"rendered":"https:\/\/www.bodhost.com\/kb\/?p=13494"},"modified":"2026-02-26T14:02:10","modified_gmt":"2026-02-26T14:02:10","slug":"how-to-extract-or-unzip-tar-gz-files-in-linux","status":"publish","type":"post","link":"https:\/\/www.bodhost.com\/kb\/how-to-extract-or-unzip-tar-gz-files-in-linux\/","title":{"rendered":"How to Extract or Unzip .tar.gz Files in Linux"},"content":{"rendered":"<p>This guide explains how to extract or unzip \u2018.tar.gz\u2019 files using Linux command-line tools.<br \/>\nA \u2018.tar.gz\u2019 file is a mixture of two formats: .tar (Tape Archive) and .gz (Gzip compression). These files are common in Linux environments for compressing and archiving multiple files and directories.<\/p>\n<h5><strong>Follow the steps:<\/strong><\/h5>\n<p><strong>1. Open Terminal:<\/strong><\/p>\n<p>To extract a \u2018.tar.gz\u2019 file, first, open the Terminal on your Linux system. You can usually do this by searching for \u201cTerminal\u201d in your applications menu or using a keyboard shortcut (Ctrl + Alt + T).<\/p>\n<p><strong>2. Navigate to the directory:<\/strong><\/p>\n<p>Use the cd command to navigate to the directory where the \u2018.tar.gz\u2019 file is located. For example:<\/p>\n<blockquote><p><strong>cd \/path\/to\/your\/file<\/strong><\/p><\/blockquote>\n<p><strong>3. Extract the \u2018.tar.gz\u2019 file:<\/strong><\/p>\n<p>To extract the contents of a \u2018.tar.gz\u2019 file, use the subsequent command:<\/p>\n<blockquote><p><strong>tar -xvzf filename.tar.gz<\/strong><\/p><\/blockquote>\n<p>\u2018-x\u2019: Extract the files.<br \/>\n\u2018-v\u2019: Verbose mode (shows the extraction process).<br \/>\n\u2018-z\u2019: Use gzip to decompress.<br \/>\n\u2018-f\u2019: Specifies the file name.<\/p>\n<p>For example:<\/p>\n<blockquote><p><strong>tar -xvzf archive.tar.gz<\/strong><\/p><\/blockquote>\n<p><strong>4. Verify Extraction:<\/strong><\/p>\n<p>Once the extraction is complete, you can list the files using the ls command to verify the contents:<\/p>\n<blockquote><p><strong>ls<\/strong><\/p><\/blockquote>\n<p><strong>5. Optional: Extract to a Specific Directory<\/strong><\/p>\n<p>If you want to extract the contents to a specific directory, use the -C option with the tar command:<\/p>\n<blockquote><p><strong>tar -xvzf filename.tar.gz -C \/path\/to\/directory<\/strong><\/p><\/blockquote>\n<p>This way, you can easily extract or unzip .tar.gz files in Linux. If you run into any issues during the process, do not hesitate to reach out to our support team for assistance.<\/p>\n<p>Learn more about <a href=\"https:\/\/www.bodhost.com\/kb\/how-to-unzip-files-via-command-prompt\/\" target=\"_blank\" rel=\"noopener\">How to Unzip Files via Command Prompt<\/a>: Master the steps to quickly extract compressed files using simple commands.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This guide explains how to extract or unzip \u2018.tar.gz\u2019 files using Linux command-line tools. A \u2018.tar.gz\u2019 file is a mixture of two formats: .tar (Tape Archive) and .gz (Gzip compression).&hellip;<\/p>\n<p><a href=\"https:\/\/www.bodhost.com\/kb\/how-to-extract-or-unzip-tar-gz-files-in-linux\/\" class=\"more-link\">Read More<\/a><\/p>\n","protected":false},"author":21,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[666],"tags":[1564],"class_list":["post-13494","post","type-post","status-publish","format-standard","hentry","category-general","tag-unzip-tar-gz-files-in-linux"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Extract or Unzip .tar.gz Files in Linux | bodHOST<\/title>\n<meta name=\"description\" content=\"This article explains how to extract or unzip \u2018.tar.gz\u2019 files using Linux command-line tools. Follow the steps.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.bodhost.com\/kb\/how-to-extract-or-unzip-tar-gz-files-in-linux\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Extract or Unzip .tar.gz Files in Linux | bodHOST\" \/>\n<meta property=\"og:description\" content=\"This article explains how to extract or unzip \u2018.tar.gz\u2019 files using Linux command-line tools. Follow the steps.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.bodhost.com\/kb\/how-to-extract-or-unzip-tar-gz-files-in-linux\/\" \/>\n<meta property=\"og:site_name\" content=\"Knowledge Base - bodHOST\" \/>\n<meta property=\"article:published_time\" content=\"2024-08-30T05:16:17+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-02-26T14:02:10+00:00\" \/>\n<meta name=\"author\" content=\"Serena\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Serena\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-extract-or-unzip-tar-gz-files-in-linux\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-extract-or-unzip-tar-gz-files-in-linux\\\/\"},\"author\":{\"name\":\"Serena\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#\\\/schema\\\/person\\\/ffd3f118493c99471ae5bd4790a55830\"},\"headline\":\"How to Extract or Unzip .tar.gz Files in Linux\",\"datePublished\":\"2024-08-30T05:16:17+00:00\",\"dateModified\":\"2026-02-26T14:02:10+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-extract-or-unzip-tar-gz-files-in-linux\\\/\"},\"wordCount\":285,\"publisher\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#organization\"},\"keywords\":[\"Unzip .tar.gz Files in Linux\"],\"articleSection\":[\"General Discussion\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-extract-or-unzip-tar-gz-files-in-linux\\\/\",\"url\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-extract-or-unzip-tar-gz-files-in-linux\\\/\",\"name\":\"How to Extract or Unzip .tar.gz Files in Linux | bodHOST\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#website\"},\"datePublished\":\"2024-08-30T05:16:17+00:00\",\"dateModified\":\"2026-02-26T14:02:10+00:00\",\"description\":\"This article explains how to extract or unzip \u2018.tar.gz\u2019 files using Linux command-line tools. Follow the steps.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-extract-or-unzip-tar-gz-files-in-linux\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-extract-or-unzip-tar-gz-files-in-linux\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-extract-or-unzip-tar-gz-files-in-linux\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"General Discussion\",\"item\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/category\\\/general\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Extract or Unzip .tar.gz Files in Linux\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#website\",\"url\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/\",\"name\":\"Web Hosting Knowledge Base | bodHOST Hosting FAQ\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#organization\"},\"alternateName\":\"Web Hosting Knowledge Base | bodHOST Hosting FAQ\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#organization\",\"name\":\"Web Hosting Knowledge Base | bodHOST Hosting FAQ\",\"url\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/wp-content\\\/uploads\\\/2025\\\/10\\\/Profile-Pic.png\",\"contentUrl\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/wp-content\\\/uploads\\\/2025\\\/10\\\/Profile-Pic.png\",\"width\":240,\"height\":240,\"caption\":\"Web Hosting Knowledge Base | bodHOST Hosting FAQ\"},\"image\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#\\\/schema\\\/person\\\/ffd3f118493c99471ae5bd4790a55830\",\"name\":\"Serena\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/8bf3c9f6220a13a4d46295ad7c38a0c9e351ca3a57d0e417580c8e8b83a12a50?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/8bf3c9f6220a13a4d46295ad7c38a0c9e351ca3a57d0e417580c8e8b83a12a50?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/8bf3c9f6220a13a4d46295ad7c38a0c9e351ca3a57d0e417580c8e8b83a12a50?s=96&d=mm&r=g\",\"caption\":\"Serena\"},\"url\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/author\\\/seema\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Extract or Unzip .tar.gz Files in Linux | bodHOST","description":"This article explains how to extract or unzip \u2018.tar.gz\u2019 files using Linux command-line tools. Follow the steps.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.bodhost.com\/kb\/how-to-extract-or-unzip-tar-gz-files-in-linux\/","og_locale":"en_US","og_type":"article","og_title":"How to Extract or Unzip .tar.gz Files in Linux | bodHOST","og_description":"This article explains how to extract or unzip \u2018.tar.gz\u2019 files using Linux command-line tools. Follow the steps.","og_url":"https:\/\/www.bodhost.com\/kb\/how-to-extract-or-unzip-tar-gz-files-in-linux\/","og_site_name":"Knowledge Base - bodHOST","article_published_time":"2024-08-30T05:16:17+00:00","article_modified_time":"2026-02-26T14:02:10+00:00","author":"Serena","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Serena","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.bodhost.com\/kb\/how-to-extract-or-unzip-tar-gz-files-in-linux\/#article","isPartOf":{"@id":"https:\/\/www.bodhost.com\/kb\/how-to-extract-or-unzip-tar-gz-files-in-linux\/"},"author":{"name":"Serena","@id":"https:\/\/www.bodhost.com\/kb\/#\/schema\/person\/ffd3f118493c99471ae5bd4790a55830"},"headline":"How to Extract or Unzip .tar.gz Files in Linux","datePublished":"2024-08-30T05:16:17+00:00","dateModified":"2026-02-26T14:02:10+00:00","mainEntityOfPage":{"@id":"https:\/\/www.bodhost.com\/kb\/how-to-extract-or-unzip-tar-gz-files-in-linux\/"},"wordCount":285,"publisher":{"@id":"https:\/\/www.bodhost.com\/kb\/#organization"},"keywords":["Unzip .tar.gz Files in Linux"],"articleSection":["General Discussion"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.bodhost.com\/kb\/how-to-extract-or-unzip-tar-gz-files-in-linux\/","url":"https:\/\/www.bodhost.com\/kb\/how-to-extract-or-unzip-tar-gz-files-in-linux\/","name":"How to Extract or Unzip .tar.gz Files in Linux | bodHOST","isPartOf":{"@id":"https:\/\/www.bodhost.com\/kb\/#website"},"datePublished":"2024-08-30T05:16:17+00:00","dateModified":"2026-02-26T14:02:10+00:00","description":"This article explains how to extract or unzip \u2018.tar.gz\u2019 files using Linux command-line tools. Follow the steps.","breadcrumb":{"@id":"https:\/\/www.bodhost.com\/kb\/how-to-extract-or-unzip-tar-gz-files-in-linux\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.bodhost.com\/kb\/how-to-extract-or-unzip-tar-gz-files-in-linux\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.bodhost.com\/kb\/how-to-extract-or-unzip-tar-gz-files-in-linux\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"General Discussion","item":"https:\/\/www.bodhost.com\/kb\/category\/general\/"},{"@type":"ListItem","position":2,"name":"How to Extract or Unzip .tar.gz Files in Linux"}]},{"@type":"WebSite","@id":"https:\/\/www.bodhost.com\/kb\/#website","url":"https:\/\/www.bodhost.com\/kb\/","name":"Web Hosting Knowledge Base | bodHOST Hosting FAQ","description":"","publisher":{"@id":"https:\/\/www.bodhost.com\/kb\/#organization"},"alternateName":"Web Hosting Knowledge Base | bodHOST Hosting FAQ","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.bodhost.com\/kb\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.bodhost.com\/kb\/#organization","name":"Web Hosting Knowledge Base | bodHOST Hosting FAQ","url":"https:\/\/www.bodhost.com\/kb\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.bodhost.com\/kb\/#\/schema\/logo\/image\/","url":"https:\/\/www.bodhost.com\/kb\/wp-content\/uploads\/2025\/10\/Profile-Pic.png","contentUrl":"https:\/\/www.bodhost.com\/kb\/wp-content\/uploads\/2025\/10\/Profile-Pic.png","width":240,"height":240,"caption":"Web Hosting Knowledge Base | bodHOST Hosting FAQ"},"image":{"@id":"https:\/\/www.bodhost.com\/kb\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.bodhost.com\/kb\/#\/schema\/person\/ffd3f118493c99471ae5bd4790a55830","name":"Serena","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/8bf3c9f6220a13a4d46295ad7c38a0c9e351ca3a57d0e417580c8e8b83a12a50?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/8bf3c9f6220a13a4d46295ad7c38a0c9e351ca3a57d0e417580c8e8b83a12a50?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/8bf3c9f6220a13a4d46295ad7c38a0c9e351ca3a57d0e417580c8e8b83a12a50?s=96&d=mm&r=g","caption":"Serena"},"url":"https:\/\/www.bodhost.com\/kb\/author\/seema\/"}]}},"_links":{"self":[{"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/posts\/13494","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/users\/21"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/comments?post=13494"}],"version-history":[{"count":3,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/posts\/13494\/revisions"}],"predecessor-version":[{"id":13522,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/posts\/13494\/revisions\/13522"}],"wp:attachment":[{"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/media?parent=13494"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/categories?post=13494"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/tags?post=13494"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}