how to tar linux

Shell
tar -zcvf file.tar.gz /path/to/dir/
Source

Also in Shell: