The most frequently used archive file format that allows compression of data without any loss is Zip. It is a data container that comprises one or multiple files or directories that are compressed. Compressed files consume less storage space and can be transferred easily and quickly than uncompressed files from one computer to another. Using the tools available for all operating systems, Zip files can be extracted on macOS, Windows, and Linux.
Installing Zip Utilities on Ubuntu
Step 1: Open the terminal by pressing ‘CTRL+ALT+T’ or search it manually in the activities and update the packages list.
$ sudo apt update
Step 2: Write-out the following command to install zip utility on your Linux system.
$ sudo apt-get install zip unzip -y
Using GUI to Zip a Folder/Directory
You can also use your installed GUI of Linux distribution for Zipping any folder of your choice and this can be done in a few mini seconds. For this, you need to open the file manager you prefer the most, then move to the location where the folder is present that you want to be zipped. In my case, I’m using the file manager of Ubuntu 20.04. After that, select the particular folder and Right click it to view the menu.
From the Drop down menu, select ‘compress’.
Add the archive file name, select its type and click the create button.
Using CLI to Zip a Folder/Directory
You can also utilize the Command-line interface of your Linux distribution instead of graphical desktop environment. The following command will Zip your desired folder into an archived one.
$ zip -r zipdownloads.zip Download
Using GUI to Extract the Zip Archive
Extracting an archived folder on Linux distribution is as simple as the blink of an eye. In this particular matter, the graphical desktop environment plays a significant role. Right-click on the zipped folder, select ‘extract to’ if you want the extracted version in the current directory, and then unzip it.
Right-click on the zipped folder, select the destination for its unzipped version if you want to extract it to some other directory rather than the present one, and unzip it.
The output shows you an unzipped version of the folder in its assigned destination.
In this article, we have seen different methods for zipping files and folders from using CLI to the graphical user environment. It is as easy as pie. We have also shown you the process of extracting the folder back from its zipped version.
Tag us @itslinuxfoss