shell history cannot be shared between terminals

Solution Verified - Updated -

Issue

The user shell history cannot be shared between terminals. The accounts are configured in order to have a shared history written and available in real time, instead of waiting for the end of the session for it to be updated. These lines were added to the bash configuration:

export HISTCONTROL=ignoreboth
shopt -s histappend
export PROMPT_COMMAND="history -a;$PROMPT_COMMAND"

and while the history seems to be written correctly, the user in the other terminal does not have it updated.

Environment

Red Hat Enterprise Linux 7
bash

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content