{"id":2582,"date":"2019-06-11T10:01:27","date_gmt":"2019-06-11T04:31:27","guid":{"rendered":"https:\/\/www.24x7serversupport.com\/blog\/?p=2582"},"modified":"2019-06-15T12:19:59","modified_gmt":"2019-06-15T06:49:59","slug":"how-to-create-a-password-protected-zip-file-in-linux","status":"publish","type":"post","link":"https:\/\/www.24x7serversupport.com\/blog\/how-to-create-a-password-protected-zip-file-in-linux\/","title":{"rendered":"How to Create a Password Protected ZIP File in Linux"},"content":{"rendered":"\n<p>Zip is an useful and frequently used tool for compressing files\/directories on Linux as well as on Windows.<\/p>\n\n\n\n<p>In this post, we will let you know how to use zip command with password protection.<\/p>\n\n\n\n<p>Install zip package on server using yum or rpm<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># yum install zip    [On CentOS\/RHEL] <br># sudo apt-get install zip    [On Debian\/Ubuntu]<\/pre>\n\n\n\n<p>After installation, you can use zip command with <strong>-P<\/strong> flag to create a password protected zip file.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># zip -P pass@123 mydir.zip mydir\/<\/pre>\n\n\n\n<p><strong>adding: mydir\/ (stored 0%)<\/strong><\/p>\n\n\n\n<p>But in this way the password is still be visible in Bash History. That is why, it is insecure. <br>So use flag <strong>-e<\/strong> to encrypt the zip file<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># zip -e  mydir.zip mydir\/ <\/pre>\n\n\n\n<p>This command will prompt you for password, and allow you to enter hidden password:<\/p>\n\n\n\n<p><strong>Enter password:<br> Verify password:<br>   adding: mydir\/ (stored 0%)<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Zip is an useful and frequently used tool for compressing files\/directories on Linux as well as on Windows. In this post, we will let you know how to use zip command with password protection. Install zip package on server using yum or rpm # yum install zip [On CentOS\/RHEL] # sudo apt-get install zip [On [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[34],"tags":[112,164,163],"class_list":["post-2582","post","type-post","status-publish","format-standard","hentry","category-linux","tag-linux","tag-unzip","tag-zip"],"jetpack_publicize_connections":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Create a Password Protected ZIP File in Linux | 24x7serversupport Blog<\/title>\n<meta name=\"description\" content=\"How to create password protected zip file\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.24x7serversupport.com\/blog\/how-to-create-a-password-protected-zip-file-in-linux\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Create a Password Protected ZIP File in Linux | 24x7serversupport Blog\" \/>\n<meta property=\"og:description\" content=\"How to create password protected zip file\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.24x7serversupport.com\/blog\/how-to-create-a-password-protected-zip-file-in-linux\/\" \/>\n<meta property=\"og:site_name\" content=\"24x7serversupport Blog\" \/>\n<meta property=\"article:published_time\" content=\"2019-06-11T04:31:27+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-06-15T06:49:59+00:00\" \/>\n<meta name=\"author\" content=\"24x7support\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@24x7serversuppo\" \/>\n<meta name=\"twitter:site\" content=\"@24x7serversuppo\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"24x7support\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/how-to-create-a-password-protected-zip-file-in-linux\/\",\"url\":\"https:\/\/www.24x7serversupport.com\/blog\/how-to-create-a-password-protected-zip-file-in-linux\/\",\"name\":\"How to Create a Password Protected ZIP File in Linux | 24x7serversupport Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/#website\"},\"datePublished\":\"2019-06-11T04:31:27+00:00\",\"dateModified\":\"2019-06-15T06:49:59+00:00\",\"author\":{\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/#\/schema\/person\/decfb5fad6bde6ac6822d4e965c6d401\"},\"description\":\"How to create password protected zip file\",\"breadcrumb\":{\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/how-to-create-a-password-protected-zip-file-in-linux\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.24x7serversupport.com\/blog\/how-to-create-a-password-protected-zip-file-in-linux\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/how-to-create-a-password-protected-zip-file-in-linux\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.24x7serversupport.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Create a Password Protected ZIP File in Linux\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/#website\",\"url\":\"https:\/\/www.24x7serversupport.com\/blog\/\",\"name\":\"24x7serversupport Blog\",\"description\":\"Linux | CPanel | WHM | webhosting| Plesk | DirectAdmin | CentOs | Debian | Ubuntu Blog\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.24x7serversupport.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/#\/schema\/person\/decfb5fad6bde6ac6822d4e965c6d401\",\"name\":\"24x7support\",\"url\":\"https:\/\/www.24x7serversupport.com\/blog\/author\/24x7support\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Create a Password Protected ZIP File in Linux | 24x7serversupport Blog","description":"How to create password protected zip file","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.24x7serversupport.com\/blog\/how-to-create-a-password-protected-zip-file-in-linux\/","og_locale":"en_US","og_type":"article","og_title":"How to Create a Password Protected ZIP File in Linux | 24x7serversupport Blog","og_description":"How to create password protected zip file","og_url":"https:\/\/www.24x7serversupport.com\/blog\/how-to-create-a-password-protected-zip-file-in-linux\/","og_site_name":"24x7serversupport Blog","article_published_time":"2019-06-11T04:31:27+00:00","article_modified_time":"2019-06-15T06:49:59+00:00","author":"24x7support","twitter_card":"summary_large_image","twitter_creator":"@24x7serversuppo","twitter_site":"@24x7serversuppo","twitter_misc":{"Written by":"24x7support","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.24x7serversupport.com\/blog\/how-to-create-a-password-protected-zip-file-in-linux\/","url":"https:\/\/www.24x7serversupport.com\/blog\/how-to-create-a-password-protected-zip-file-in-linux\/","name":"How to Create a Password Protected ZIP File in Linux | 24x7serversupport Blog","isPartOf":{"@id":"https:\/\/www.24x7serversupport.com\/blog\/#website"},"datePublished":"2019-06-11T04:31:27+00:00","dateModified":"2019-06-15T06:49:59+00:00","author":{"@id":"https:\/\/www.24x7serversupport.com\/blog\/#\/schema\/person\/decfb5fad6bde6ac6822d4e965c6d401"},"description":"How to create password protected zip file","breadcrumb":{"@id":"https:\/\/www.24x7serversupport.com\/blog\/how-to-create-a-password-protected-zip-file-in-linux\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.24x7serversupport.com\/blog\/how-to-create-a-password-protected-zip-file-in-linux\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.24x7serversupport.com\/blog\/how-to-create-a-password-protected-zip-file-in-linux\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.24x7serversupport.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Create a Password Protected ZIP File in Linux"}]},{"@type":"WebSite","@id":"https:\/\/www.24x7serversupport.com\/blog\/#website","url":"https:\/\/www.24x7serversupport.com\/blog\/","name":"24x7serversupport Blog","description":"Linux | CPanel | WHM | webhosting| Plesk | DirectAdmin | CentOs | Debian | Ubuntu Blog","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.24x7serversupport.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.24x7serversupport.com\/blog\/#\/schema\/person\/decfb5fad6bde6ac6822d4e965c6d401","name":"24x7support","url":"https:\/\/www.24x7serversupport.com\/blog\/author\/24x7support\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/posts\/2582","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/comments?post=2582"}],"version-history":[{"count":4,"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/posts\/2582\/revisions"}],"predecessor-version":[{"id":2586,"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/posts\/2582\/revisions\/2586"}],"wp:attachment":[{"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/media?parent=2582"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/categories?post=2582"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/tags?post=2582"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}