centos清除历史命令

1、rm -f /root/.bash_profile  历史命令记录在此文件

2、history -c   清除缓存

会话退出后重新连接输入history可以看到历史命令清空了。两条命令的顺序不能乱

原文地址:https://www.cnblogs.com/tiantianhappy/p/13267652.html