How to Create Zip File in Ubuntu using Command

Websolutionstuff | Jan-24-2024 | Categories : Other

Hey folks! If you're anything like me, sometimes you just want a quick and straightforward way to bundle up a bunch of files or folders into a neat little package. Well, good news – creating a zip file in Ubuntu using the command line is easier than you might think!

In this guide, I'll walk you through the steps, and trust me, it's as simple as typing a few commands into your terminal.

So, let's see how to create a zip file in Ubuntu using a command line, how to make a zip file in Ubuntu command line, ubuntu unzip command, zip command in Linux, and Linux zip command.

Create a step-by-step guide on creating a zip file in Ubuntu using the command line.

Method 1: Zip Folder Ubuntu Linux

Create a file using the following command.

zip -r folder


zip -r Laravel


Method 2: Create Zip Multiple Folders at Once Linux Ubuntu

Create multiple zip files using a single Ubuntu command.

zip -r folder1 folder2 folder3


zip -r testFolder1 testFolder2 testFolder3


Method 3: Password Protected Folder Linux Ubuntu

Create password protected zip file using command line.

zip -e folder

The command will be prompted to enter and verify the archive password:

Enter password:
Verify password:


zip -r -e TestFolder


Method 4: Create a zip all files and folders

if you want to zip all files and folders in the current directory, you can use.

zip -r *


Verify the Zip File

To verify that the zip file was created successfully, you can use the unzip command to extract its contents:


That's it! You've successfully created a zip file in Ubuntu using the command line. You can now share or move your zip file as needed.



Creating a zip file via the terminal is a quick and efficient way to compress your files and folders.


You might also like:

Recommended Post
Featured Post
How To Install TinyMCE Editor In Laravel
How To Install TinyMCE Editor...

In this article, I will give you an example of the TinyMCE editor, Tinymce editor is a rich-text open-source editor,&nbs...

Read More


How To Validate URL In PHP With Regex
How To Validate URL In PHP Wit...

Hello Guys, In this tutorial we will see how to validate URL in PHP with regex. also you can implement in larave...

Read More


How To Backup Database In Laravel 9 Using Spatie
How To Backup Database In Lara...

In this article, we will see how to back up the database in laravel 9 using spatie. Here, we will learn automatic&n...

Read More


Laravel whereBetween Query Example
Laravel whereBetween Query Exa...

In this article, we will see laravel whereBetween query example. SQL provides many different types of methods or qu...

Read More