I'm looking to set up a quick and simple incognito-style shell session for shared environments. The goal is to make it easy to use, like a one-liner that anyone can run on a virtual machine without needing to install extra software.
I've been using a basic version to avoid saving shell command history, but it doesn't address other common tools that might leak information. I'm not trying to achieve full anonymity or sandboxing, just practical ways to keep things clean when working on shared systems.
I'd love to get feedback on this idea and hear about any edge cases I've missed, history leaks you've encountered on shared machines, or any simpler methods that might suit this lightweight, on-demand setup. If you've worked with shared VMs, please share your thoughts! Check out my progress here: https://github.com/jazho76/private_shell/
1 Answer
I really like the lightweight concept you're going for! From my experience with shared VMs, some common pitfalls include hidden history files from tools like .lesshst and .python_history, as well as environment variables that stick around. One method I've tried is using a temporary HOME directory and controlling the HISTFILE, but there seems to always be edge cases popping up. Excited to see how your project develops!

Thanks! That aligns with what pushed me to go beyond just using HISTFILE. I've noticed some serious leaks in Python and Node.js REPLs. I'm keeping an eye on common tools and trying not to overload it blindly. If you see something crucial missing, feel free to contribute! Regarding the environment variables, I'm keeping the default mode less invasive and saving the heavier stuff for paranoid mode.