Difference between revisions of "enable bash history in Gaia and SPLAT"
From cpwiki.net
(Created page with "by default, bash history is on but commands run are not save to the .bash_history file to be accessed upon you next login. [Expert@ckkpmgr]# s'''et -o | grep history''' his...") |
|||
(One intermediate revision by one user not shown) | |||
Line 9: | Line 9: | ||
to enable it globally for all users | to enable it globally for all users | ||
− | [Expert@myfirewall]# '''sed -i -e 's/HISTFILESIZE=0/HISTFILESIZE= | + | [Expert@myfirewall]# '''sed -i -e 's/HISTFILESIZE=0/HISTFILESIZE=1000/' /etc/bashrc; source /etc/bashrc''' |
verify it worked | verify it worked | ||
[Expert@ckkpmgr]# '''echo $HISTFILESIZE''' | [Expert@ckkpmgr]# '''echo $HISTFILESIZE''' | ||
− | + | 1000 | |
bash command history is saved upon logout | bash command history is saved upon logout |
Latest revision as of 15:26, 28 November 2023
by default, bash history is on but commands run are not save to the .bash_history file to be accessed upon you next login.
[Expert@ckkpmgr]# set -o | grep history history on [Expert@ckkpmgr]# echo $HISTFILESIZE 0
to enable it globally for all users
[Expert@myfirewall]# sed -i -e 's/HISTFILESIZE=0/HISTFILESIZE=1000/' /etc/bashrc; source /etc/bashrc
verify it worked
[Expert@ckkpmgr]# echo $HISTFILESIZE 1000
bash command history is saved upon logout