How to encrypt usb pendrive/thumdrive/ that can be accessed from windows also ? Actually I have both ubuntu(Home) and Windows (Office) , and have to take my data to and fro using usb pendrive . So I need a software so that I can add files from cross platform OS unlocking with my password. Please help me . thanks in advance ...

  • 1
    What level of security do you need? – sudodus Feb 19 '19 at 14:19
  • I have used bitlocker for windows , Just I need a password prompt to open my usb drive thats all . I dont need military grade security , simple user just not to copy my documents etc . – SGhosal Feb 19 '19 at 14:23
  • See techradar.com/news/best-secure-drives some of them are OS agnostic. – user68186 Feb 19 '19 at 14:44
  • 1
    7Zip has encryption, I always install 7Zip in Windows and Ubuntu. – C.S.Cameron Feb 20 '19 at 4:14
  • 1
    @SGhosal: I think my previous comment refers to Windows 7. With Win10 and 7Zip 18.04 it is the archive that gets encrypted, to add more files open the archive using the password and drop additional files into it. Ubuntu 18.04 can open the archive using ArchiveManager/P7zip. I Installed P7Zip from Ubuntu Software Center and a second time using sudo apt-get install p7zip-full.Software Center I think that combination works best. – C.S.Cameron Feb 25 '19 at 7:12

For me, the easiest way to encrypt a thumbdrive that you can access from Windows and Ubuntu would be Veracrypt. It is available for both Windows and Ubuntu. I use it all the time.


If you need to encrypt a container for storage in the cloud, consider Cryptomator. It is available for Windows, Ubuntu, and your phone/tablet.


  • cryptomator is the best way and easy too . Thank you all . – SGhosal Feb 20 '19 at 2:33

zip -e - no extra hardware or software - easy to use but not very secure

You get a simple and rather low security level encryption with an encrypted zip file, that can contain a number of files or directory trees. It works in Ubuntu and Windows as long as you use the standard encryption of the zip file.

There is zip in Ubuntu, and there are several tools in Windows, that are compatible (but if you use some 'enhanced encryption' in Windows, Ubuntu's zip will probably fail to decrypt it).

For all files in the current directory:

zip -e file.zip *

For all files in the current directory tree, 'recurse into subdirectories':

zip -er file.zip *

Unzip with

unzip file.zip

From man zip (in Ubuntu), we see that -e or --encrypt is the option to encrypt the archive.

          Encrypt  the  contents  of the zip archive using a password which is
          entered on the terminal in response to a prompt (this  will  not  be
          echoed;  if  standard  error  is  not  a  tty, zip will exit with an
          error).  The password prompt is repeated to save the user from  typ‐
          ing errors.

but do not use the option -P or --password.

   -P password
   --password password
          Use password to encrypt zipfile entries (if any).  THIS IS INSECURE!
          Many multi-user operating systems provide ways for any user  to  see
          the current command line of any other user; even on stand-alone sys‐
          tems there is always the threat of over-the-shoulder peeking.  Stor‐
          ing the plaintext password as part of a command line in an automated
          script is even  worse.   Whenever  possible,  use  the  non-echoing,
          interactive prompt to enter passwords.  (And where security is truly
          important, use strong encryption such as Pretty Good Privacy instead
          of the relatively weak standard encryption provided by zipfile util‐

Higher level security

  • Dedicated (already encrypted) USB pendrives already mentioned and linked to in the comment by @user68186.
  • Systems with strong encryption
    • gpg is the gnu implementation of Pretty Good Privacy. It comes with Ubuntu because it is used to verify that the updates are correctly transferred, and you can use it to compress a file, for example a tar archive or an unencrypted zip file containing the files you want to transfer. There is a version for Windows, that you can install. (I installed gpg in Windows some years ago.)
    • Veracrypt, already mentioned and linked to in the answer by @Richard, is further developed from Truecrypt.
      • You have to install it both in Ubuntu and Windows
      • It is free, open source and has a good reputation
      • It can encrypt a whole partition with its file system and files.

I think Veracrypt is more convenient than gpg for this purpose, so if you want better security than with zip or similar tools, I would recommend Veracrypt or a dedicated (already encrypted) USB pendrive, that is compatible with linux.

  • I am very familiar with zip , I want to use password protected zip files, but can I add more files to that protected zip ? I have tried . the files added after are not password protected . So I want another solution like veracrypt or anything . If there is any solution for adding more files to password protected zip then password protected zip file is enough for my security . Only need to day to day use . thank you all ... – SGhosal Feb 19 '19 at 16:52
  • Yes: See man zip: The command add is used to update existing entries and add new files. If the archive does not exist create it. This is the default mode. -- But you can also create new zip files alongside the existing zip file(s). – sudodus Feb 19 '19 at 16:55
  • There is a Nautilus front end of gpg. I don't know about Windows side of the story. – user68186 Feb 19 '19 at 17:24
  • 1
    @user68186,seahorse :-) I have that (but don't use it much nowadays, because I have learned the text mode interface). There might be a good GUI in Windows, but what I installed was a text mode program to be run in 'DOSprompt'. – sudodus Feb 19 '19 at 17:32

7Zip AES-256

7Zip/P7Zip will encrypt per AES-256.

7Zip is available for Windows: https://www.7-zip.org/

P7Zip is available for Ubuntu: From Ubuntu Software Center and also by using:

sudo apt-get install p7zip-full

Neither worked for me producing an encrypted folder with drag and drop by themselves but installing both together let me create a 7Zip file as an encrypted folder requiring a password to open or when adding files.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.