Sam Hooke

Modify bash history

Using bash history to try and find a previous command, I found it had vanished and there was a mysterious * present against the line, which I had never seen before:

   56  vi /etc/resolv.conf
   57  sudo systemctl restart dnsmasq
   59  curl

Some searching found out this indicates the line has been modified.

It turns out modifying bash history is rather simple: press up until you find the line, modify it, then press down. I must have modified the history by accident.