![cli](https://skayal.com/wp-content/uploads/2020/05/kisspng-computer-icons-command-line-interface-linux-system-command-line-icon-vector-5ab10e74cf4276.197344361521553012849.png)
14
Jul
How to zip a folder in Ubuntu Linux / Debian Linux
Comments
First, install the zip command using apt command or apt-get command.
Open the terminal and type the following command:
$ sudo apt install zip unzip
![apt install](data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==)
How do I use zip command to compress a folder?
zip -r filename.zip folder
zip -r filename.zip folder1 folder2
zip -r filename.zip /path/to/folder1 /path/to/file2
![compress zip result](data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==)