How to increase command line history size?

  1. To see how many commands does it remember in the command history, run
      echo $HISTSIZE
     
  2. To change that value, open ~/.bashrc and then change the value of HISTSIZE or add the following if it doesn't exist.
      export HISTSIZE=999
     
    .
  3. Run the following for the change to take effect
      source ~/.bashrc
     
  4. Run the following to see the change
      echo $HISTSIZE