How to ZIP a File on Linux
So, you decided to look for instructions on creating a ZIP file on Linux. Great, we’re glad to have you here. Generating a ZIP archive is a great thing – it helps keeps things organized, and it’s easy to transfer from one device to another or upload to the Internet. Best of all, its powerful…

ZIP File in Linux
So, you decided to look for instructions on creating a ZIP file on Linux. Great, we’re glad to have you here. Generating a ZIP archive is a great thing – it helps keeps things organized, and it’s easy to transfer from one device to another or upload to the Internet. Best of all, its powerful compression affects the size positively – it goes down without a loss in data or quality after you extract it. Unfortunately, doesn’t support zipping files right off the bat, but there’s an easy way around it. This is how to ZIP a file on Linux.
Steps to make a ZIP file on Linux
Linux does have a default way to create archives, through a command called tar. We recommend installing a utility called zip, however.
- Open Terminal by pressing Ctrl + Alt + T on the keyboard.
- Type this:
sudo apt install zip unzip - If prompted, enter your administrator password.
- A wall of text will show the installation progress and indicate whether it was successful.
After this is installed, if you like to see the graphical interface, do this:
- Open your File Manager app.
- Right-click on the file you want to convert into ZIP.
- Select Compress from the list.
- Enter a name for the archive and change the location if you want.
- Verify that a checkbox in front of .zip is ticked.
- Click on OK.
If you prefer the old-school way, do this:
- Open Terminal (Ctrl + Alt + T on keyboard)
- Inside the Terminal, navigate to the address your file is in. For example, type:
cd Documents/My Files/
Explanation: There’s no need to add root folders such as Home/YourUsername/ manually, they’re automatically included. - To ZIP a file, type this:
zip -r archive-name.zip name-of-file.extension - Exchange these generic names with the actual names on your computer. You don’t have to type .zip on the archive name, but you have to replace the extension for the file you want to zip. For example, .txt, .docx, .xlsx, .exe, etc.
Is it possible to put a password on the ZIP file?
- Open Terminal, and navigate to the location in the same way as above.
- This time, type:
zip -e archive-name name-of-file - After this, you are asked to Enter password.
Don’t worry if you see no visual indication that your keystrokes are accepted. This is intentional and prevents prying eyes from remembering the number of characters in your password. - Now, you have to Verify password by entering it again.
- After this, the archive will appear in the same folder as the file.
It was pretty quick and easy, wasn’t it? Now that you know how to generate a ZIP file, keep using the skill. And, don’t forget to mention who taught you – a little kindness goes a long way.
More in Linux

How to Rename a File in Linux using Command
You are a beginner to the Linux commands right? No worries, it is extremely easy to rename Linux files using the terminal. All you have to do is to use the ‘mv’ command in the terminal. In this article, we are going to teach you how to use that command to rename a file in…

Able2Extract Professional 8 Is A Decent PDF Converter For Windows, Mac And Linux
Looking for a PDF converter tool that can quickly convert PDF Documents into Word, Image and other formats? Able2Extract Professional 8 is a best example of a decent PDF converter, this application is extremely simple and easy to use. Able2Extract PDF Professional 8 file converter is a best cross-platform application works on Windows, Mac and Linux. Able2Extract…

How to Install WebTorrent on Linux
WebTorrent is an excellent application available for cross-platforms. It works like a charm for viewing and streaming music using peer to peer Torrent protocol. The WebTorrent application is available for Linux, Mac, and Windows platforms. It is an open source torrent client built on Javascript and uses WebRTC for peer-to-peer connection support. The WebTorrent is…
The week in tech, minus the noise.
New reviews, fixes and the stories that matter — once a week, straight to your inbox.
We only use your email to send the newsletter. Unsubscribe any time. See our privacy policy.
Comments