You&#x27;ve conflated terminal and shell there.  It&#x27;s an important distinction because, in fact, there&#x27;s still one race condition with history files, even if you only have &#x2F;one&#x2F; shell running.  It&#x27;s down to the Bourne Again shell not doing atomic updates when it rewrites the history file.  It&#x27;s one of two bugs, the other being systemd sending multiple signals in <i>very</i> quick succession to kill a terminal login session, that in combination cause the effect discussed at <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=10151861" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=10151861</a> .  Far from losing zero or a few history elements, it can in fact result in your losing <i>all</i> of your history.