“reset”命令是否会清除命令使用的会话内存?

use*_*pth 5 command-line bash gnome-terminal ram bash-history

我可以在 bash 中使用一个reset命令,我认为它是core-utils. 它是否会清理终端会话中先前命令所使用的 RAM?

我的意思是写入终端和命令使用的内存中的所有内容。

Neo*_*ird 5

man reset

reset - reinitialization
       When  invoked  as  reset,  tset  sets  cooked and echo modes, turns off
       cbreak and raw modes, turns on newline translation and resets any unset
       special  characters  to  their default values before doing the terminal
       initialization described above.  This is useful after  a  program  dies
       leaving a terminal in an abnormal state.[...]
Run Code Online (Sandbox Code Playgroud)

因此,它会完全重新初始化您所在的终端会话,清除所有数据(但仍会存储它~/.bash_history,如果您觉得保密,请删除它)。如果您只想重新加载设置,可以运行. ~/.bashrc. 如果您只想拥有一个空白的终端窗口而不重置,请运行clear或点击Ctrl + L