From f3343ece776697e70b2d03dda32a12d8a4a74472 Mon Sep 17 00:00:00 2001 From: carvilsi Date: Sun, 22 Feb 2026 11:18:19 +0100 Subject: [PATCH] adds HISTCONTROL environment variable to Interesting variables for hacking section under linux-hardening --- src/linux-hardening/linux-environment-variables.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/linux-hardening/linux-environment-variables.md b/src/linux-hardening/linux-environment-variables.md index 70b354b0172..40cb4418ef3 100644 --- a/src/linux-hardening/linux-environment-variables.md +++ b/src/linux-hardening/linux-environment-variables.md @@ -79,6 +79,19 @@ Change the **value of this variable to 0**, so when you **end your session** any ```bash export HISTSIZE=0 + +``` +### **HISTCONTROL** + +If the **value of this variable is set to ignorespace or ignoreboth** any command prepend it with an extra space will not be saved in the history. + +```bash +export HISTCONTROL=ignorespace +``` + +```bash +$ echo "to save or" +$ echo "not to save" ``` ### http_proxy & https_proxy