Zipping a directory in bash (command not found)

Hi there!

I’m having an issue with the following Bash Scripting section:

At the end of the project it’s suggested that you “zip the resulting ‘build’ directory.”

This is my code and the error message I receive:

$ zip -r /build
bash: zip: command not found

Screen Shot 2020-04-22 at 10.17.34 PM

As far as I’m aware, zip should be a recognised command in bash.
Unsure where to go from here, any help is appreciated :slight_smile:

Doesn’t seem to be installed by default, but installing zip is easy:

sudo apt install zip unzip

Thanks for your response.
Just tried your suggestion but this happened:

$ sudo apt install zip unzip
bash: sudo: command not found

Apparently sudo is also not installed?

Did some quick digging and found this on StackExchange:

Followed the instructions from the top answer to enable su-mode:

$ su -

As it’s asking for a password, I’m just going to assume this is not the intended course of action. Perhaps this part of the project hasn’t been properly implemented? Maybe there is some kind of oversight here?

1 Like

i don’t think you have sudo/root privileges within the codecademy learning environment.

I will ask about this, but normally when working on your local dev environment, this should work :slight_smile:

1 Like

Ah yes I tried it out in Terminal and it worked fine! Thank you for your help :slight_smile:

1 Like