@santosh21
Linux Oct 06, 2026

Command to extract a tar.gz file?

Downloaded a program as a tar.gz on Linux Mint. Double-clicking does nothing useful. What's the terminal command, and where do the files end up?
2

Leave A Reply

Log in to post an answer.

2 Answers

hirdesh Oct 30, 2026
santosh21
same command works on windows 10 and 11, tar is built into cmd now. and on most linux boxes plain tar -xf works for .gz, .bz2 and .xz, it figures out the compression itself.
naman87 Oct 09, 2026
santosh21
tar -xzf file.tar.gz add -C /some/folder to extract it somewhere else (the folder has to exist already). tar -tzf file.tar.gz lists what's inside without extracting, handy if you're not sure it'll dump everything loose into your current directory.