2

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.

1 Answers1

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 ⇢ Decompress
  • tar -xvf ⇢ Extract, Verbose, File

This should do what you need.

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