Zip and Unzip Command In Ubuntu Terminal
In this article, you learn to zip and unzip command in Ubuntu Terminal. How to zip and unzip files and folders in Ubuntu terminal is very frequently searched question. Both zip and unzip package contains programs to create a compressed file in Linux. However, these packages not installed by default in Ubuntu. However, you can install both of these package using the Ubuntu terminal. So let’s start, zip and unzip command in ubuntu terminal.
In Ubuntu, several utilities are available for compress files and folders and extracting compressed files. However, we recommended to use “zip” and “unzip” utility.
Why we need zip and unzip utilities in Ubuntu terminal?
It can take a lot of time to upload and download files and folders from the server to a local and a local to the server. However, we can do this process bit faster to transfer compressed files instead of transferring multiple files. Moreover, FTP clients do not support to allow compression and decompression of files.
How to zip via Ubuntu command line terminal
First you have to install
zip in Ubuntu using the following command,
$ sudo apt-get install zip
After installing the zip utility, you can create zip file using the following command,
$ zip -r compressed_filename.zip folder_name
How to unzip via Ubuntu command line terminal
You have to install
unzip in Ubuntu using the following command,
$ sudo apt-get install unzip
After installing the unzip utility, you can extract to a particular destination folder using the following command,
$ unzip compressed_filename.zip -d destination_folder
If you like our article, please consider buying a coffee for us.
Thanks for your support!
Buy me a coffee!