Create tar.gz on Linux

The straight forward answer:

tar -czf destination.tar.gz directory

Explanation of the used options:

  • c: Create a new archive.
  • z: Filter the archive through gzip.
  • f: Defines the output to file (as opposed to terminal)
Note that the order of the parameters is important. "f" needs to be the last in the row to define the file name.
 
For completeness, you can also use
man tar
which gives you the full tar manual.