extract .gz file cli code example Example 1: how to decompress gzip file in linux gunzip -k file.gz Example 2: extract gz file ubuntu gzip -d file.gz