Hello,
Is there any way, can turn off history permanently for the following shells on the RHEL 7 platform.
shells:
/bin/sh
/bin/bash
Hello,
Is there any way, can turn off history permanently for the following shells on the RHEL 7 platform.
shells:
/bin/sh
/bin/bash
set +o history
unset HISTFILE
history -c
For more info read:
https://www.cyberciti.biz/faq/disable-bash-shell-history-linux/
Thanks,
This setting not working for “sh” shell …
/bin/sh is nothing but bash shell itself on RHEL 7. So it should work. You can verify symlink with the following command:
ls -l /bin/sh
ls -l /bin/{sh,bash}
-rwxr-xr-x. 1 root root 964608 Oct 30 22:37 /bin/bash lrwxrwxrwx. 1 root root 4 Dec 5 06:53 /bin/sh -> bash
Also only v8 of Unix sh has history feature defined by HISTORY variable. So try to unset in $HOME/.profile.
unset HISTORY