How To Zip Files and Folders in Ubuntu Linux

I use the zip tool a lot in Ubuntu 14.04 and 16.04 because I work with people who use Windows. I also use tar, but we can talk about that in another tutorial.

Here's the command to create a zip file of your current working directory, including all files and folders:

zip -r .

Note: Don't forget the "." at the end. 

Here's an example. We'll pretend we're working on a site called Web App Path, so we're going to call our zip file

Here's how you can make a zip archive called

zip -r .

Sometimes, though, you need to make a zip file that doesn't include a folder. For instance, if you use NetBeans, there is often a folder called nbproject in your project directory. Here's how you can exclude that folder via the command line:

zip -r . -x  nbproject/\*

There is a lot more to the zip tool, but this is basically all I ever do with it.