How to run cryptsetup luksFormat non-interactivelyWhen LUKS formatting a partition, I recieve the message# cryptsetup luksFormat /dev/sdbWARNING!========This will overwrite data on /dev/sdb irrevocably.Are you sure? (Type uppercase yes): YESFollowed by Enter passphrase:.How can I automatically answer YES to the question Are you sure ?
How to answer YES automatically with a cryptsetup luksFormat command?
command line;scripting;luks;cryptsetup
You could make use of the --batch-mode, -q option of cryptsetup to skip the question.$ cryptsetup -q luksFormat /dev/sdbThis option also disables password verification, so one should use it with care or in an automated environment