All the commands get stored by the shell interpreter: Find where it is stored, how to make it useful; and clear the history data if there’s something you don’t want to save in the record.
Source: LXer – Linux History Command with Advance Examples