FG

How to: Unlimited Bash/shell history?

Fresh3 days ago
Mar 15, 202660791 views
Confidence Score1%
1%

Problem

Is there a way to define an unlimited history in Bash ?

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: How to: Unlimited Bash/shell history?

Low Risk

Add this to your (Linux) or (MacOS): There you go, unlimited history. Currently I have 27000 entries :) From : If is not set, no truncation is performed. That means is never truncated Also the same seems to apply to , although I couldn't find that documented. Another neat feature I'm going to try is this: If the variable is set, time stamps are written to the history file, marked with the history comment character, so they may be preserved across shell sessions, like the following: Let me know …

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment