1.创建分区:
dd if=/dev/zero of=test bs=1M count=20

cryptsetup加密分区


2.格式化luks分区:
cryptsetup luksFormat test

cryptsetup加密分区


3.映射分区:
cryptsetup luksOpen test luksTest
会在/dev/mapper目录下发现生成了luksTest文件

cryptsetup加密分区


4.格式化、挂载、使用分区:
mkfs.ext4 /dev/mapper/luksTest(格式化为ext4)

cryptsetup加密分区

mount /dev/mapper/luksTest dir_test(挂载)

cryptsetup加密分区


5.卸载、关闭映射:
umount dir_test(先卸载)
cryptsetup luksClose luksTest(后关闭)
cryptsetup加密分区

相关文章:

  • 2022-01-31
  • 2021-05-30
  • 2021-04-08
  • 2021-12-31
  • 2022-01-18
  • 2022-12-23
  • 2021-05-09
  • 2021-05-29
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-02-13
  • 2022-02-14
  • 2021-11-04
  • 2021-11-12
  • 2022-12-23
相关资源
相似解决方案