How to create an encrypted partition?

It's probably best to use a built-in solution like eCryptFS or LUKS. For an explanation about using eCryptFS, see the sites Jorge points to.

LUKS encryption is easy to set up with the GNOME Disk Utility; just tick the encryption checkbox at the bottom of the "format partition" dialog:

Screenshot of Format Partition dialog

The difference between both is that eCryptFS encrypts files (including the filenames), while LUKS encrypts a complete partition under the filesystem level.

Ubuntu can then remember your password when mounting if you want, allowing you to just plug and play on your device after logging in.


You don't really go into details of what your use case is so I'll just highlight the built in encryption features:

Ubuntu has built in support for an encrypted Private directory that might meet your needs, or you can set up encrypted home directories.


Deprecated answer

left around for historical purposes.

TrueCrypt is no longer actively maintained, although there are alternative products/projects... The dust hasn't truly settled yet as far as I am aware.

truecrypt is more operating system angostic than some other solutions. if you need portability across os that is a good idea. as to filesystems, this too comes down to portability. are you using it on only linux boxes? then ext4 with luks and full volume encryption is the recommendation...portability to an unmodified windows box? then ntfs with truecrypt