How to Create ZIP Files in Linux Easily

x32x01
  • by x32x01 ||
Creating a ZIP archive is one of the easiest ways to organize and transfer multiple files. Whether you’re sharing documents, uploading to the cloud, or just saving space - ZIP compression makes it happen!
It reduces file size 🔽 without losing any data or quality after extraction.

However, Linux doesn’t come with ZIP support by default 😅 - but don’t worry! You can easily enable it in a few steps.

⚙️ How to Create a ZIP File in Linux​

The tar command is Linux’s built-in tool for archiving, but using the zip utility is simpler and more universal. Let’s install it first 👇
  1. Open your Terminal using Ctrl + Alt + T
  2. Run the following command:
    Code:
    sudo apt install zip unzip
Once the installation is done, you’re ready to create ZIP archives either using GUI or Terminal.



🖱️ Method 1: Create ZIP Files Using the GUI (File Manager)​

If you prefer using the graphical interface instead of commands, follow these easy steps:
  1. Open File Manager.
  2. Right-click on the file or folder you want to compress.
  3. Select Compress.
  4. Choose the Name and Location of your archive.
  5. Confirm your options and click OK ✅.
That’s it! Your ZIP file is ready.



💻 Method 2: Create ZIP Files Using the Terminal​

For command-line lovers or when working on remote servers 🧠, here’s how to do it:
  1. Open Terminal (Ctrl + Alt + T).
  2. Use the following command:
    zip -r filename.zip filenamehere.extension
Replace .extension with the actual file type, like .txt, .docx, or .jpg.
  • The -r flag means “recursive,” allowing you to ZIP entire folders and subfolders.
Example:
Code:
zip -r project.zip myproject/



🔐 How to Create a Password-Protected ZIP File in Linux​

Need to keep your files private? You can create encrypted ZIP files easily using the -e option:
Code:
zip -e secure.zip secretfile.txt

You’ll be asked to enter and confirm your password.
👉 Don’t worry if nothing appears on the screen - Linux hides password input for security reasons.

After confirmation, your ZIP file will be protected with a password 🔒.



🧩 Conclusion​

And that’s it! 🎉
You now know how to:
  • Install ZIP utilities on Linux
  • Compress files using GUI or Terminal
  • Protect archives with a password
Whether you’re a beginner or a pro, mastering ZIP files keeps your data organized, compact, and secure.
 
Last edited: