Bash

Live Sharing Bash Command History Across Multiple Terminals

This article introduces how to live share command history across multiple terminals in Bash language on Linux PC/server command line.

Shou Arisaka
1 min read
Nov 24, 2025

This article introduces how to live share command history across multiple terminals in Bash language on Linux PC/server command line.

export PROMPT_COMMAND="history -a; history -c; history -r; $PROMPT_COMMAND"

command line - How to share history between terminal tabs? - Ask Different

Image

Image

Note that commands like ssh arenโ€™t reflected until they exit, so be careful about this.

Share this article

Shou Arisaka Nov 24, 2025

๐Ÿ”— Copy Links