How do I unzip a .tar.gz file in the terminal? I'm not able to do so in GUI, because I want to extract it to a /usr directory, and will need the sudo command.
Asked
Active
Viewed 9,802 times
1 Answers
3
gzip -d this_is_the_file.tar.gz
tar -xvf this_is_the_file.tar
These can be combined, but it's probably better to start out with the two commands independently.
gzip -d
⇢ Decompresstar -xvf
⇢ Extract, Verbose, File
This should do what you need.

andrew.46
- 38,003
- 27
- 156
- 232