Create zip file in Ubuntu from command line

Posted on 2009-04-15
Last Modified: 2013-12-06
How can I create a Zip file in Ubuntu from the command line? I can already create tarballs but can't seem to create zips.
Question by:TotallyMe
    LVL 35

    Accepted Solution

    You'll have to install the zip/unzip commands first:

    sudo apt-get install zip && sudo apt-get install unzip

    Then you can compress a file with this command:
    zip file1 file2 .... fileX
    LVL 1

    Expert Comment

    If you want to work with zip files in Ubuntu command line interface, you will need these commands: zip and unzip.

    To install zip if you dont already have it, do this

    sudo apt-get install zip

    The simplest way to create a zip file (archive) is

    zip file1 file2 file3 ...

    Where is the file (zip archive) you are creating and file1, file2, file3, and so on, are the files you are including in that archive. So lets say you need to create a zip file of your resumé which is in different file formats, you would something like

    zip resume.odt resume.pdf resume.doc resume.txt

    To unzip files, you need to have a command called unzip. To install unzip if you dont already have it, do this

    sudo apt-get install unzip

    The simplest way to extract all files from a zip archive is


    Where is the file (zip archive) you are unzipping. So lets say you need to extract (unzip) a zip file of your resumé which contains different files, you would something like


    You can find more detail here:

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    In my business, I use the LTS (Long Term Support) versions of Linux. My workstations do real work, and so I rarely have the patience to deal with silly problems caused by an upgraded kernel that had experimental software on it to begin with from a r…
    1. Introduction As many people are interested in Linux but not as many are interested or knowledgeable (enough) to install Linux on their system, here is a safe way to try out Linux on your existing (Windows) system. The idea is that you insta…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.

    733 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    23 Experts available now in Live!

    Get 1:1 Help Now