e Learning

How to Unzip zip files in CentOS using unzip Command

In this tutorial we are going to learn how to unzip zip files in CentOS 7 using the unzip command.

To unzip a zip file in CentOS 7, First we need to install the unzip command. After installing the unzip command we can unzip zip folders using either the command line or from the GUI if you use CentOS Desktop version.

Install unzip command on CentOS 7

First install the unzip command on CentOS 7 using the yum install command.

yum install unzip

Unzip zip files in command line in CentOS

To unzip a zip folder, use the unzip command followed by the name of the zip file.

unzip file.zip

The unzip command in CentOS will unzip the zip file to the current working directory.

Unzip zip file to specific directory

With -d option we can specify the directory, which we want to extract files.

unzip -d /home/user/Documents file.zip

This time CentOS unzip command will extract the zip file to the /home/user/Documents directory.

Extract zip files in CentOS Desktop

If you use CentOS Desktop, you can extract zip folders from the GUI. But first you need to make sure that the unzip command has been installed on your CentOS Desktop.

To extract a zip file, Right click on the zip file and select “Extract Here”.

How to Unzip zip files in CentOS using unzip Command

The file will extract to the current folder.

So, that is how we can easily unzip zip files in CentOS 7 using the unzip command.