Check if partition is encrypted

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
35
down vote

favorite
9












How do I check if a partition is encrypted? In particular I would like to know how I check if /home and swap is encrypted.







share|improve this question
























    up vote
    35
    down vote

    favorite
    9












    How do I check if a partition is encrypted? In particular I would like to know how I check if /home and swap is encrypted.







    share|improve this question






















      up vote
      35
      down vote

      favorite
      9









      up vote
      35
      down vote

      favorite
      9






      9





      How do I check if a partition is encrypted? In particular I would like to know how I check if /home and swap is encrypted.







      share|improve this question












      How do I check if a partition is encrypted? In particular I would like to know how I check if /home and swap is encrypted.









      share|improve this question











      share|improve this question




      share|improve this question










      asked Jul 15 '11 at 18:33









      N.N.

      7,909144884




      7,909144884




















          3 Answers
          3






          active

          oldest

          votes

















          up vote
          32
          down vote



          accepted










          Regarding the standard home encryption provided by Ubuntu, you can



          sudo ls -lA /home/username/


          and if you get something like



          totale 0
          lrwxrwxrwx 1 username username 56 2011-05-08 18:12 Access-Your-Private-Data.desktop -> /usr/share/ecryptfs-utils/ecryptfs-mount-private.desktop
          lrwxrwxrwx 1 username username 38 2011-05-08 18:12 .ecryptfs -> /home/.ecryptfs/username/.ecryptfs
          lrwxrwxrwx 1 username username 37 2011-05-08 18:12 .Private -> /home/.ecryptfs/username/.Private
          lrwxrwxrwx 1 username username 52 2011-05-08 18:12 README.txt -> /usr/share/ecryptfs-utils/ecryptfs-mount-private.txt


          then the username's home directory is encrypted. This works when username is not logged in, so the partition is not mounted. Otherwise you can look at mount output.



          About the swap, do



          sudo blkid | grep swap


          and should check for an output similar to



          /dev/mapper/cryptswap1: UUID="95f3d64d-6c46-411f-92f7-867e92991fd0" TYPE="swap" 





          share|improve this answer
















          • 3




            So if I get /dev/sda4: UUID="6ba2ce7b-a355-41ea-8739-2ac5d6880bac" TYPE="swap" the swap is not encrypted?
            – N.N.
            Jul 15 '11 at 19:30










          • I suppose you're right, but my limited knowledge cannot exclude there are other swap encryption methods.
            – enzotib
            Jul 15 '11 at 19:45










          • If you get that, your swap is definitely NOT encrypted.
            – David
            Jul 16 '11 at 1:47






          • 3




            @ChristopherStansbury (Yes, yes, I'm more than two years late; this is for anyone that stumbles on the question in future) au contraire, the "/dev/mapper/cryptswap" implies that your swap is encrypted.
            – Darael
            Dec 2 '13 at 15:26







          • 1




            There is no need to execute sudo ls -lA /home/username/ as root, so it should be ls -lA /home/username/
            – Akronix
            Jul 31 '17 at 16:10

















          up vote
          15
          down vote













          In addition to the answer provided by enzotib, there's the possibility of full disk encryption as provided by the alternate installer. (Also called LUKS-crypt.)



          You can use sudo dmsetup status to check if there are any LUKS-encrypted partitions. The output should look something like:



          ubuntu-home: 0 195305472 linear 
          ubuntu-swap_1: 0 8364032 linear
          sda5_crypt: 0 624637944 crypt
          ubuntu-root: 0 48824320 linear


          The line marked "crypt" shows that sda5 has been encrypted. You can see which filesystems are on that via the lvm tools.



          In the case of LUKS encryption, the Disk Utility in Ubuntu will also show the encryption layer and the configuration in a graphical manner.






          share|improve this answer


















          • 4




            what about if I get No devices found ?
            – Akronix
            Nov 19 '15 at 11:48

















          up vote
          10
          down vote













          To check the encrypted swap status and cipher details, use this cmd:



          $ sudo cryptsetup status /dev/mapper/cryptswap1
          /dev/mapper/cryptswap1 is active and is in use.
          type: PLAIN
          cipher: aes-cbc-essiv:sha256
          keysize: 256 bits
          device: /dev/sda2
          offset: 0 sectors
          size: 8388608 sectors
          mode: read/write


          Your swap device name may be different, you can check the proper name by:



          $ swapon -s
          Filename Type Size Used Priority
          /dev/mapper/cryptswap1 partition 4194300 0 -1





          share|improve this answer




















            Your Answer







            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "89"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            convertImagesToLinks: true,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );








             

            draft saved


            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f53242%2fcheck-if-partition-is-encrypted%23new-answer', 'question_page');

            );

            Post as a guest






























            3 Answers
            3






            active

            oldest

            votes








            3 Answers
            3






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            32
            down vote



            accepted










            Regarding the standard home encryption provided by Ubuntu, you can



            sudo ls -lA /home/username/


            and if you get something like



            totale 0
            lrwxrwxrwx 1 username username 56 2011-05-08 18:12 Access-Your-Private-Data.desktop -> /usr/share/ecryptfs-utils/ecryptfs-mount-private.desktop
            lrwxrwxrwx 1 username username 38 2011-05-08 18:12 .ecryptfs -> /home/.ecryptfs/username/.ecryptfs
            lrwxrwxrwx 1 username username 37 2011-05-08 18:12 .Private -> /home/.ecryptfs/username/.Private
            lrwxrwxrwx 1 username username 52 2011-05-08 18:12 README.txt -> /usr/share/ecryptfs-utils/ecryptfs-mount-private.txt


            then the username's home directory is encrypted. This works when username is not logged in, so the partition is not mounted. Otherwise you can look at mount output.



            About the swap, do



            sudo blkid | grep swap


            and should check for an output similar to



            /dev/mapper/cryptswap1: UUID="95f3d64d-6c46-411f-92f7-867e92991fd0" TYPE="swap" 





            share|improve this answer
















            • 3




              So if I get /dev/sda4: UUID="6ba2ce7b-a355-41ea-8739-2ac5d6880bac" TYPE="swap" the swap is not encrypted?
              – N.N.
              Jul 15 '11 at 19:30










            • I suppose you're right, but my limited knowledge cannot exclude there are other swap encryption methods.
              – enzotib
              Jul 15 '11 at 19:45










            • If you get that, your swap is definitely NOT encrypted.
              – David
              Jul 16 '11 at 1:47






            • 3




              @ChristopherStansbury (Yes, yes, I'm more than two years late; this is for anyone that stumbles on the question in future) au contraire, the "/dev/mapper/cryptswap" implies that your swap is encrypted.
              – Darael
              Dec 2 '13 at 15:26







            • 1




              There is no need to execute sudo ls -lA /home/username/ as root, so it should be ls -lA /home/username/
              – Akronix
              Jul 31 '17 at 16:10














            up vote
            32
            down vote



            accepted










            Regarding the standard home encryption provided by Ubuntu, you can



            sudo ls -lA /home/username/


            and if you get something like



            totale 0
            lrwxrwxrwx 1 username username 56 2011-05-08 18:12 Access-Your-Private-Data.desktop -> /usr/share/ecryptfs-utils/ecryptfs-mount-private.desktop
            lrwxrwxrwx 1 username username 38 2011-05-08 18:12 .ecryptfs -> /home/.ecryptfs/username/.ecryptfs
            lrwxrwxrwx 1 username username 37 2011-05-08 18:12 .Private -> /home/.ecryptfs/username/.Private
            lrwxrwxrwx 1 username username 52 2011-05-08 18:12 README.txt -> /usr/share/ecryptfs-utils/ecryptfs-mount-private.txt


            then the username's home directory is encrypted. This works when username is not logged in, so the partition is not mounted. Otherwise you can look at mount output.



            About the swap, do



            sudo blkid | grep swap


            and should check for an output similar to



            /dev/mapper/cryptswap1: UUID="95f3d64d-6c46-411f-92f7-867e92991fd0" TYPE="swap" 





            share|improve this answer
















            • 3




              So if I get /dev/sda4: UUID="6ba2ce7b-a355-41ea-8739-2ac5d6880bac" TYPE="swap" the swap is not encrypted?
              – N.N.
              Jul 15 '11 at 19:30










            • I suppose you're right, but my limited knowledge cannot exclude there are other swap encryption methods.
              – enzotib
              Jul 15 '11 at 19:45










            • If you get that, your swap is definitely NOT encrypted.
              – David
              Jul 16 '11 at 1:47






            • 3




              @ChristopherStansbury (Yes, yes, I'm more than two years late; this is for anyone that stumbles on the question in future) au contraire, the "/dev/mapper/cryptswap" implies that your swap is encrypted.
              – Darael
              Dec 2 '13 at 15:26







            • 1




              There is no need to execute sudo ls -lA /home/username/ as root, so it should be ls -lA /home/username/
              – Akronix
              Jul 31 '17 at 16:10












            up vote
            32
            down vote



            accepted







            up vote
            32
            down vote



            accepted






            Regarding the standard home encryption provided by Ubuntu, you can



            sudo ls -lA /home/username/


            and if you get something like



            totale 0
            lrwxrwxrwx 1 username username 56 2011-05-08 18:12 Access-Your-Private-Data.desktop -> /usr/share/ecryptfs-utils/ecryptfs-mount-private.desktop
            lrwxrwxrwx 1 username username 38 2011-05-08 18:12 .ecryptfs -> /home/.ecryptfs/username/.ecryptfs
            lrwxrwxrwx 1 username username 37 2011-05-08 18:12 .Private -> /home/.ecryptfs/username/.Private
            lrwxrwxrwx 1 username username 52 2011-05-08 18:12 README.txt -> /usr/share/ecryptfs-utils/ecryptfs-mount-private.txt


            then the username's home directory is encrypted. This works when username is not logged in, so the partition is not mounted. Otherwise you can look at mount output.



            About the swap, do



            sudo blkid | grep swap


            and should check for an output similar to



            /dev/mapper/cryptswap1: UUID="95f3d64d-6c46-411f-92f7-867e92991fd0" TYPE="swap" 





            share|improve this answer












            Regarding the standard home encryption provided by Ubuntu, you can



            sudo ls -lA /home/username/


            and if you get something like



            totale 0
            lrwxrwxrwx 1 username username 56 2011-05-08 18:12 Access-Your-Private-Data.desktop -> /usr/share/ecryptfs-utils/ecryptfs-mount-private.desktop
            lrwxrwxrwx 1 username username 38 2011-05-08 18:12 .ecryptfs -> /home/.ecryptfs/username/.ecryptfs
            lrwxrwxrwx 1 username username 37 2011-05-08 18:12 .Private -> /home/.ecryptfs/username/.Private
            lrwxrwxrwx 1 username username 52 2011-05-08 18:12 README.txt -> /usr/share/ecryptfs-utils/ecryptfs-mount-private.txt


            then the username's home directory is encrypted. This works when username is not logged in, so the partition is not mounted. Otherwise you can look at mount output.



            About the swap, do



            sudo blkid | grep swap


            and should check for an output similar to



            /dev/mapper/cryptswap1: UUID="95f3d64d-6c46-411f-92f7-867e92991fd0" TYPE="swap" 






            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Jul 15 '11 at 18:41









            enzotib

            60k5124150




            60k5124150







            • 3




              So if I get /dev/sda4: UUID="6ba2ce7b-a355-41ea-8739-2ac5d6880bac" TYPE="swap" the swap is not encrypted?
              – N.N.
              Jul 15 '11 at 19:30










            • I suppose you're right, but my limited knowledge cannot exclude there are other swap encryption methods.
              – enzotib
              Jul 15 '11 at 19:45










            • If you get that, your swap is definitely NOT encrypted.
              – David
              Jul 16 '11 at 1:47






            • 3




              @ChristopherStansbury (Yes, yes, I'm more than two years late; this is for anyone that stumbles on the question in future) au contraire, the "/dev/mapper/cryptswap" implies that your swap is encrypted.
              – Darael
              Dec 2 '13 at 15:26







            • 1




              There is no need to execute sudo ls -lA /home/username/ as root, so it should be ls -lA /home/username/
              – Akronix
              Jul 31 '17 at 16:10












            • 3




              So if I get /dev/sda4: UUID="6ba2ce7b-a355-41ea-8739-2ac5d6880bac" TYPE="swap" the swap is not encrypted?
              – N.N.
              Jul 15 '11 at 19:30










            • I suppose you're right, but my limited knowledge cannot exclude there are other swap encryption methods.
              – enzotib
              Jul 15 '11 at 19:45










            • If you get that, your swap is definitely NOT encrypted.
              – David
              Jul 16 '11 at 1:47






            • 3




              @ChristopherStansbury (Yes, yes, I'm more than two years late; this is for anyone that stumbles on the question in future) au contraire, the "/dev/mapper/cryptswap" implies that your swap is encrypted.
              – Darael
              Dec 2 '13 at 15:26







            • 1




              There is no need to execute sudo ls -lA /home/username/ as root, so it should be ls -lA /home/username/
              – Akronix
              Jul 31 '17 at 16:10







            3




            3




            So if I get /dev/sda4: UUID="6ba2ce7b-a355-41ea-8739-2ac5d6880bac" TYPE="swap" the swap is not encrypted?
            – N.N.
            Jul 15 '11 at 19:30




            So if I get /dev/sda4: UUID="6ba2ce7b-a355-41ea-8739-2ac5d6880bac" TYPE="swap" the swap is not encrypted?
            – N.N.
            Jul 15 '11 at 19:30












            I suppose you're right, but my limited knowledge cannot exclude there are other swap encryption methods.
            – enzotib
            Jul 15 '11 at 19:45




            I suppose you're right, but my limited knowledge cannot exclude there are other swap encryption methods.
            – enzotib
            Jul 15 '11 at 19:45












            If you get that, your swap is definitely NOT encrypted.
            – David
            Jul 16 '11 at 1:47




            If you get that, your swap is definitely NOT encrypted.
            – David
            Jul 16 '11 at 1:47




            3




            3




            @ChristopherStansbury (Yes, yes, I'm more than two years late; this is for anyone that stumbles on the question in future) au contraire, the "/dev/mapper/cryptswap" implies that your swap is encrypted.
            – Darael
            Dec 2 '13 at 15:26





            @ChristopherStansbury (Yes, yes, I'm more than two years late; this is for anyone that stumbles on the question in future) au contraire, the "/dev/mapper/cryptswap" implies that your swap is encrypted.
            – Darael
            Dec 2 '13 at 15:26





            1




            1




            There is no need to execute sudo ls -lA /home/username/ as root, so it should be ls -lA /home/username/
            – Akronix
            Jul 31 '17 at 16:10




            There is no need to execute sudo ls -lA /home/username/ as root, so it should be ls -lA /home/username/
            – Akronix
            Jul 31 '17 at 16:10












            up vote
            15
            down vote













            In addition to the answer provided by enzotib, there's the possibility of full disk encryption as provided by the alternate installer. (Also called LUKS-crypt.)



            You can use sudo dmsetup status to check if there are any LUKS-encrypted partitions. The output should look something like:



            ubuntu-home: 0 195305472 linear 
            ubuntu-swap_1: 0 8364032 linear
            sda5_crypt: 0 624637944 crypt
            ubuntu-root: 0 48824320 linear


            The line marked "crypt" shows that sda5 has been encrypted. You can see which filesystems are on that via the lvm tools.



            In the case of LUKS encryption, the Disk Utility in Ubuntu will also show the encryption layer and the configuration in a graphical manner.






            share|improve this answer


















            • 4




              what about if I get No devices found ?
              – Akronix
              Nov 19 '15 at 11:48














            up vote
            15
            down vote













            In addition to the answer provided by enzotib, there's the possibility of full disk encryption as provided by the alternate installer. (Also called LUKS-crypt.)



            You can use sudo dmsetup status to check if there are any LUKS-encrypted partitions. The output should look something like:



            ubuntu-home: 0 195305472 linear 
            ubuntu-swap_1: 0 8364032 linear
            sda5_crypt: 0 624637944 crypt
            ubuntu-root: 0 48824320 linear


            The line marked "crypt" shows that sda5 has been encrypted. You can see which filesystems are on that via the lvm tools.



            In the case of LUKS encryption, the Disk Utility in Ubuntu will also show the encryption layer and the configuration in a graphical manner.






            share|improve this answer


















            • 4




              what about if I get No devices found ?
              – Akronix
              Nov 19 '15 at 11:48












            up vote
            15
            down vote










            up vote
            15
            down vote









            In addition to the answer provided by enzotib, there's the possibility of full disk encryption as provided by the alternate installer. (Also called LUKS-crypt.)



            You can use sudo dmsetup status to check if there are any LUKS-encrypted partitions. The output should look something like:



            ubuntu-home: 0 195305472 linear 
            ubuntu-swap_1: 0 8364032 linear
            sda5_crypt: 0 624637944 crypt
            ubuntu-root: 0 48824320 linear


            The line marked "crypt" shows that sda5 has been encrypted. You can see which filesystems are on that via the lvm tools.



            In the case of LUKS encryption, the Disk Utility in Ubuntu will also show the encryption layer and the configuration in a graphical manner.






            share|improve this answer














            In addition to the answer provided by enzotib, there's the possibility of full disk encryption as provided by the alternate installer. (Also called LUKS-crypt.)



            You can use sudo dmsetup status to check if there are any LUKS-encrypted partitions. The output should look something like:



            ubuntu-home: 0 195305472 linear 
            ubuntu-swap_1: 0 8364032 linear
            sda5_crypt: 0 624637944 crypt
            ubuntu-root: 0 48824320 linear


            The line marked "crypt" shows that sda5 has been encrypted. You can see which filesystems are on that via the lvm tools.



            In the case of LUKS encryption, the Disk Utility in Ubuntu will also show the encryption layer and the configuration in a graphical manner.







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Jul 16 '11 at 9:56









            enzotib

            60k5124150




            60k5124150










            answered Jul 16 '11 at 1:51









            David

            86468




            86468







            • 4




              what about if I get No devices found ?
              – Akronix
              Nov 19 '15 at 11:48












            • 4




              what about if I get No devices found ?
              – Akronix
              Nov 19 '15 at 11:48







            4




            4




            what about if I get No devices found ?
            – Akronix
            Nov 19 '15 at 11:48




            what about if I get No devices found ?
            – Akronix
            Nov 19 '15 at 11:48










            up vote
            10
            down vote













            To check the encrypted swap status and cipher details, use this cmd:



            $ sudo cryptsetup status /dev/mapper/cryptswap1
            /dev/mapper/cryptswap1 is active and is in use.
            type: PLAIN
            cipher: aes-cbc-essiv:sha256
            keysize: 256 bits
            device: /dev/sda2
            offset: 0 sectors
            size: 8388608 sectors
            mode: read/write


            Your swap device name may be different, you can check the proper name by:



            $ swapon -s
            Filename Type Size Used Priority
            /dev/mapper/cryptswap1 partition 4194300 0 -1





            share|improve this answer
























              up vote
              10
              down vote













              To check the encrypted swap status and cipher details, use this cmd:



              $ sudo cryptsetup status /dev/mapper/cryptswap1
              /dev/mapper/cryptswap1 is active and is in use.
              type: PLAIN
              cipher: aes-cbc-essiv:sha256
              keysize: 256 bits
              device: /dev/sda2
              offset: 0 sectors
              size: 8388608 sectors
              mode: read/write


              Your swap device name may be different, you can check the proper name by:



              $ swapon -s
              Filename Type Size Used Priority
              /dev/mapper/cryptswap1 partition 4194300 0 -1





              share|improve this answer






















                up vote
                10
                down vote










                up vote
                10
                down vote









                To check the encrypted swap status and cipher details, use this cmd:



                $ sudo cryptsetup status /dev/mapper/cryptswap1
                /dev/mapper/cryptswap1 is active and is in use.
                type: PLAIN
                cipher: aes-cbc-essiv:sha256
                keysize: 256 bits
                device: /dev/sda2
                offset: 0 sectors
                size: 8388608 sectors
                mode: read/write


                Your swap device name may be different, you can check the proper name by:



                $ swapon -s
                Filename Type Size Used Priority
                /dev/mapper/cryptswap1 partition 4194300 0 -1





                share|improve this answer












                To check the encrypted swap status and cipher details, use this cmd:



                $ sudo cryptsetup status /dev/mapper/cryptswap1
                /dev/mapper/cryptswap1 is active and is in use.
                type: PLAIN
                cipher: aes-cbc-essiv:sha256
                keysize: 256 bits
                device: /dev/sda2
                offset: 0 sectors
                size: 8388608 sectors
                mode: read/write


                Your swap device name may be different, you can check the proper name by:



                $ swapon -s
                Filename Type Size Used Priority
                /dev/mapper/cryptswap1 partition 4194300 0 -1






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Apr 28 '14 at 2:05









                Tomofumi

                47746




                47746






















                     

                    draft saved


                    draft discarded


























                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f53242%2fcheck-if-partition-is-encrypted%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Popular posts from this blog

                    pylint3 and pip3 broken

                    Missing snmpget and snmpwalk

                    How to enroll fingerprints to Ubuntu 17.10 with VFS491