Bash: Write to History Log
Bash Write to Bash History Log
history -w
- write current terminal session to bash history log.
You might want to do this when connecting to remote server and after running a long command you want it to be in bash history but fear you might get disconnected.