Do you know how to unzip a file in Ubuntu Linux?
There are many archive types most commonly used of them are .zip, .rar. .7z, .tar.gz. Today we are going to speak about .zip archives.
--
On Windows, there exist GUI archivers like WinZip, 7zip, or WinRAR, which are able to deal with most of the common archive types. Ubuntu Linux has a built-in Archive Manager that can be invoked by double-clicking on the .zip file in a GUI.
But what can you do when you downloaded a zip file on Ubuntu Linux and have just a bare console? This can happen when you have installed Ubuntu Server or working from a Terminal program.
So, first of all, we need to install the unzip package. To do so, type in a terminal:
sudo apt-get install unzip
After all the packets have been installed, type in a terminal:
unzip archive.zip
If you want to extract the zip file to another folder, you will need to use the -d key followed by the directory path. Type:
unzip file.zip -d destination_folder
for example:
unzip mysite.zip -d /var/www
will extract the contents of the archive mysite.zip to the folder /var/www. The directory path can be full or relative.
If you enjoyed to read more articles please subscribe my channel. ^^