Diventa Rivenditore


Costruisci e Vendi App

Con Il Tuo Logo

Before install Siberian you must Install Zip and Unzip on CentOS

Before you Install Siberian on your server, you must install Zip and Unzip .

A Zip archive is a compressed file format that supports lossless data compression. A zip archive might contain multiple files and directories inside it. Zip is a very popular archive file format.

Every operating system supports zip including all the operating systems by Microsoft as well as all the Linux operating systems.

So now I will show you how to install zip and unzip on Linux operating systems. We will also learn how to zip and unzip files in Linux.

Before we have  install  Zip and Unzip utilities on our Linux operating system.

Before we move on to the installation part, make sure you have sudo privilege on your Linux server. We need sudo privilege to install new software packages on our server.

So There we go!


Install Zip and Unzip on CentOS

This method will also work for Fedora operating system as both of them use yum to manage software on the machine. Execute the following commands on your server to install Zip and Unzip on CentOS server.

$ sudo yum update
$ sudo yum install zip unzip

Once the process is complete, execute the zip command to verify the installation. Once the installation is done, we can move on to learn how to zip and unzip in Linux operating systems.

How to Zip in Linux

Zip is a very simple utility. So Let’s see:


Options in zip command allows us to control the execution of the command. Then comes the ZIP_FILE_NAME, we have to replace this with the name of the zip file we want to create, for example, example.zip. Then, you can list all the files that you want to include in this zip archive.


We have file1.txt and file2.csv that we want to zip. To compress these files inside a zip archive, we have to run the following command.

$ zip files.zip file1.txt file2.csv

This command will create a zip archive called files.zip in the current directory.


Now, Let’s say we have a directory called Siberian that we want to compress in a zip archive. To create a zip archive of a directory, we will use the -r option in zip command. The -r option will make the process recursive, it means that the zip archive will contain every file and subdirectories contained inside the directory we want to compress.

Here is how we can compress our siberian directory including all the files and directories inside it.

$ zip -r siberian_backup.zip siberian

This command will create a siberian_backup.zip archive in current directory containing all the files and directories and sub-directories of siberian  directory.


If you want to compress everything in the current directory, navigate to the directory and execute the following command.

$ zip -r backup.zip *

The * stands for wildcard character. It means that it will match all the directories and files inside the current directory. Now, Let us see how to password protect our zip archive.


It’s possible also creating password 

To create a zip archive of our example siberian directory with password protection, execute the following command.

$ zip -r --password=PASSWORD siberian

This command will create a password protected zip archive containing our example wordpress directory with all the files inside it. It will ask for a password while using the unzip utility.

How to unzip in Linux

Unzip is an utility in linux like zip. Unzip utility allows us to extract files from a zip archive. The simple syntax of unzip command is as follows.


The options allow us to control the execution of the command. After options, we have to specify the name of the zip archive that we want to extract. Then comes the two optional sections in which you can specify the files that you want to process and the files that you want to exclude.


We have a zip archive called siberian.zip that we want to extract. But first, we want to test the zip archive validity. To test the validity of our siberian.zip archive, execute the following command.

$ unzip -tq siberian.zip

The output of the command should look like the following if the zip archive is valid.

No errors detected in compressed data of siberian.zip.


If we want to che check all the files in the zip archive  we can use the -l option. So, to get list of all the files and directories inside our zip archive without extracting it, we have to execute the following command.

$ unzip -l siberian.zip

This command will give you the list of every file and directory compressed in the archive. It will also list files inside directories and sub-directories as the function is recursive.


Now, Let’s extract our example siberian.zip archive. To extract the full archive, execute the following command.

$ unzip siberian.zip



If we want to extract all the files, but we do not want our wp-config.php file from our siberian backup because we want to create a new file. In that case, we can use -x option to specify the list of files we want to ignore. To do this, we have to execute the following command.

$ unzip siberian.zip -x wp-config.php

This command will extract all the files from our example wordpress zip archive, except wp-config.php file. So, this is how we can use the unzip utility to extract zip archives in linux based operating systems. Just like zip and unzip, you can use tar command in linux to extract and compress files in linux.

Zip and Unzip has many more functions that you can use to manage your zip archives.

You can use the -d option in unzip command to specify the directory you want to extract from a zip archive. It will only extract the specific directory. Execute man zip or man unzip to learn more options provided by zip and unzip respectively

Lascia un commento

Il tuo indirizzo email non sarà pubblicato. I campi obbligatori sono contrassegnati *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Appteam to offer you a better experience on this site uses its own and third-party technical, analytical and profiling cookies. The site also uses third-party tracking cookies to adapt advertising to your preferences.

If you want to know more or refuse consent to the use of cookies click here. By continuing to browse, you consent to the use of cookies.

Impostazioni sulla privacy salvate!
GDPR Center

When you visit a website, it can store or retrieve information on your browser, mainly in the form of cookies. Check your personal cookie services here.

These cookies are necessary for the website to function and cannot be disabled in our systems.

In order to use this website we use the following technically required cookies
  • wordpress_logged_in_
  • wordpress_sec
  • wordpress_test_cookie

We use WooCommerce as a purchasing system. 2 cookies will be stored for the shopping cart and order processing. These cookies are strictly necessary and cannot be disabled.
  • woocommerce_cart_hash
  • woocommerce_items_in_cart

  • wordpress_test_cookie
  • wordpress_logged_in_
  • wordpress_sec

Rifiuta tutti i servizi
Accetta tutti i servizi

Menu principale