关闭HISTORY记录
说明:
为避免指令历史记录安全隐患,需关闭各主机的history指令。
步骤 1 修改根目录下/etc/profile文件。
vim /etc/profile
步骤 2 设置HISTSIZE值为0。例如,系统中HISTSIZE默认值为1000,将其修改为0。
HISTSIZE=0
步骤 3 保存/etc/profile。
:wq
步骤 4 设置/etc/profile生效。
source /etc/profile
—-结束
说明:
为避免指令历史记录安全隐患,需关闭各主机的history指令。
步骤 1 修改根目录下/etc/profile文件。
vim /etc/profile
步骤 2 设置HISTSIZE值为0。例如,系统中HISTSIZE默认值为1000,将其修改为0。
HISTSIZE=0
步骤 3 保存/etc/profile。
:wq
步骤 4 设置/etc/profile生效。
source /etc/profile
—-结束