I don't want it to do it to my system, but I am wondering, is it possible to delete
And if yes, then can you bring it up again or there will be no history ever again?
Also, is the
history command using the
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
is it possible to delete .bash_history
Sure, it's a file, you can delete it!
Can I delete .bash_history without sudo?
sudo, assuming you are talking about deleting your own
.bash_history. It's your own file, you have permissions on your own home directory.
Then can you bring it up again or there will be no history ever again ?
ever again? Nothing that drastic! Your history up to now will be gone, yes, but new commands you enter will begin to be recorded in (a new instance of) the file.
Also, Is the history command using the .bash_history file ?
The contents are cached in memory by the shell, but yes, ultimately, that is where the history is loaded from.