compress folder ubuntu

Shell
tar -czvf name-of-archive.tar.gz /path/to/directory-or-file
Source

Also in Shell: