If HISTSIZE
environment variable is not set in any startup configuration file of bash
, it will be set to 500. From man bash
:
The shell sets the default value to 500 after reading any startup
files.
The HISTFILESIZE
follows HISTSIZE
, if not set.
Now, you are getting the value of HISTSIZE
as 500 because Ubuntu by default sets the HISTSIZE
(and HISTFILESIZE
) environment variables to the following values in your bash
runtime configuration file (the file that will be source
-d when a new interactive shell instance is started), ~/.bashrc
:
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1000
HISTFILESIZE=2000
To be sure, read the .bashrc
skeleton file, /etc/skel/.bashrc
; It is copied to each newly created user's bash
runtime configuration file, ~/.bashrc
.