How can I encrypt a folder in linux using only the command line?
I need to encrypt a folder with documents (about 560kb if that makes any difference) and I was wondering whether it was possible to accomplish that using the command line?
I am searching for something like this:
encrypt /path/to/folder encryption_method password
than can be decrypted the same way
decrypt /path/to/folder encryption_method password
linux kali-linux encryption
bumped to the homepage by Community♦ 35 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
I need to encrypt a folder with documents (about 560kb if that makes any difference) and I was wondering whether it was possible to accomplish that using the command line?
I am searching for something like this:
encrypt /path/to/folder encryption_method password
than can be decrypted the same way
decrypt /path/to/folder encryption_method password
linux kali-linux encryption
bumped to the homepage by Community♦ 35 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
What counts as "unnecessary software"? The software to encrypt and decrypt would probably be necessary for this sort of problem, right?
– Eric Renouf
Nov 20 '16 at 12:31
I was referring to bloat-ware and it would be preferable to use the software that is pre-installed if there are any. Sorry if that was unclear. I will edit the question and remove that part completely.
– Clone
Nov 20 '16 at 12:36
1
Have a look atencfs
to have directories encrypted and used as filesystem to mount, even automatically withlibpam-encfs
.
– ridgy
Nov 20 '16 at 12:54
add a comment |
I need to encrypt a folder with documents (about 560kb if that makes any difference) and I was wondering whether it was possible to accomplish that using the command line?
I am searching for something like this:
encrypt /path/to/folder encryption_method password
than can be decrypted the same way
decrypt /path/to/folder encryption_method password
linux kali-linux encryption
I need to encrypt a folder with documents (about 560kb if that makes any difference) and I was wondering whether it was possible to accomplish that using the command line?
I am searching for something like this:
encrypt /path/to/folder encryption_method password
than can be decrypted the same way
decrypt /path/to/folder encryption_method password
linux kali-linux encryption
linux kali-linux encryption
edited Nov 20 '16 at 12:38
Clone
asked Nov 20 '16 at 12:21
CloneClone
1183
1183
bumped to the homepage by Community♦ 35 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 35 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
What counts as "unnecessary software"? The software to encrypt and decrypt would probably be necessary for this sort of problem, right?
– Eric Renouf
Nov 20 '16 at 12:31
I was referring to bloat-ware and it would be preferable to use the software that is pre-installed if there are any. Sorry if that was unclear. I will edit the question and remove that part completely.
– Clone
Nov 20 '16 at 12:36
1
Have a look atencfs
to have directories encrypted and used as filesystem to mount, even automatically withlibpam-encfs
.
– ridgy
Nov 20 '16 at 12:54
add a comment |
What counts as "unnecessary software"? The software to encrypt and decrypt would probably be necessary for this sort of problem, right?
– Eric Renouf
Nov 20 '16 at 12:31
I was referring to bloat-ware and it would be preferable to use the software that is pre-installed if there are any. Sorry if that was unclear. I will edit the question and remove that part completely.
– Clone
Nov 20 '16 at 12:36
1
Have a look atencfs
to have directories encrypted and used as filesystem to mount, even automatically withlibpam-encfs
.
– ridgy
Nov 20 '16 at 12:54
What counts as "unnecessary software"? The software to encrypt and decrypt would probably be necessary for this sort of problem, right?
– Eric Renouf
Nov 20 '16 at 12:31
What counts as "unnecessary software"? The software to encrypt and decrypt would probably be necessary for this sort of problem, right?
– Eric Renouf
Nov 20 '16 at 12:31
I was referring to bloat-ware and it would be preferable to use the software that is pre-installed if there are any. Sorry if that was unclear. I will edit the question and remove that part completely.
– Clone
Nov 20 '16 at 12:36
I was referring to bloat-ware and it would be preferable to use the software that is pre-installed if there are any. Sorry if that was unclear. I will edit the question and remove that part completely.
– Clone
Nov 20 '16 at 12:36
1
1
Have a look at
encfs
to have directories encrypted and used as filesystem to mount, even automatically with libpam-encfs
.– ridgy
Nov 20 '16 at 12:54
Have a look at
encfs
to have directories encrypted and used as filesystem to mount, even automatically with libpam-encfs
.– ridgy
Nov 20 '16 at 12:54
add a comment |
2 Answers
2
active
oldest
votes
You are looking for dm-crypt and cryptsetup.
Basically you encrypt a block device and mount it as directory
add a comment |
You are looking for encfs
: It mounts a dir on another dir, so that the files are stored encrypted as normal files. This way you do not need to make a block device.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
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',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f324687%2fhow-can-i-encrypt-a-folder-in-linux-using-only-the-command-line%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
You are looking for dm-crypt and cryptsetup.
Basically you encrypt a block device and mount it as directory
add a comment |
You are looking for dm-crypt and cryptsetup.
Basically you encrypt a block device and mount it as directory
add a comment |
You are looking for dm-crypt and cryptsetup.
Basically you encrypt a block device and mount it as directory
You are looking for dm-crypt and cryptsetup.
Basically you encrypt a block device and mount it as directory
edited Nov 20 '16 at 12:54
Rui F Ribeiro
41.5k1482140
41.5k1482140
answered Nov 20 '16 at 12:43
NilsNils
12.7k73670
12.7k73670
add a comment |
add a comment |
You are looking for encfs
: It mounts a dir on another dir, so that the files are stored encrypted as normal files. This way you do not need to make a block device.
add a comment |
You are looking for encfs
: It mounts a dir on another dir, so that the files are stored encrypted as normal files. This way you do not need to make a block device.
add a comment |
You are looking for encfs
: It mounts a dir on another dir, so that the files are stored encrypted as normal files. This way you do not need to make a block device.
You are looking for encfs
: It mounts a dir on another dir, so that the files are stored encrypted as normal files. This way you do not need to make a block device.
answered Nov 20 '16 at 13:56
Ole TangeOle Tange
12.7k1455107
12.7k1455107
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f324687%2fhow-can-i-encrypt-a-folder-in-linux-using-only-the-command-line%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
What counts as "unnecessary software"? The software to encrypt and decrypt would probably be necessary for this sort of problem, right?
– Eric Renouf
Nov 20 '16 at 12:31
I was referring to bloat-ware and it would be preferable to use the software that is pre-installed if there are any. Sorry if that was unclear. I will edit the question and remove that part completely.
– Clone
Nov 20 '16 at 12:36
1
Have a look at
encfs
to have directories encrypted and used as filesystem to mount, even automatically withlibpam-encfs
.– ridgy
Nov 20 '16 at 12:54