To password protect a folder in Linux

Use the zip command: zip -e -r "name_of_the_new_zip_file" "path_of_the_folder_which_has_to_be_protected" Example: If you want to protect a folder named "old" in your desktop. Just do it... zip -e -r /home/gautam/Desktop/new /home/gautam/Desktop/old [gautam@gautam-home ~]$ zip -e -r /home/gautam/Desktop/new /home/gautam/Desktop/old Enter password: Verify password: This will create a zip file named "" in your desktop ( After that delete the folder "old".