I am new to part of encryption on Ubuntu .
Is there any way to encrypt files and folder with password from terminal ? without using truecrypt or cryptkeeper etc.
You can encrypt and decrypt files with gpg
To encrypt a file
To decrypt a file
But gpg will not do entire directories. For entire directories you have several options, ecryptfs is popular.
That will make a directory "Private". Any data you put into the directory
If you want a different behavior or a different directory ...
Put your data into ~/secrte
Hint: make an alias for that second command.
ecryptfs will certainly encrypt files and folders, ensuring that the data that gets written to disk is always encrypted, and that applications which need access to the cleartext context can get that seamlessly.
However, to answer your question specifically, you can certainly encrypt a single file with a passphrase and gpg:
To encrypt a folder, you should use tar in conjunction with gpg: