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
   58*
   59  curl foo.bar

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.

These are rough notes that vary greatly in quality and length, but prove useful to me, and hopefully to you too!

← Previous: Freeing up disk space on Arch Linux
Next: How to reload Ethernet udev rules without reboot →