I have a notesfile on how to fix/debug things. When I started it, I would write things down after I fixed something and figured I'd need to remember it later.
Problem was, I would often forget to write things down, or naively think "that was quick to find out, don't need to write it down", which is a classic mistake of confusing post-facto mindset with pre-facto.
So now when I wonder how to do a thing, I first write down in my notesfile what my question is, so when I do resolve it I go and write down the answer to satisfy my need for closure.
I make a new markdown file for every program / VPS login command (the entire SSH command with custom ports), and really anything which I know I would need to search through bash history down the road to do it again.
Those files are sorted into a handful of folders which allow me to quickly find all these programs / commands quickly.
this is why I have made it a point these days that when I fix an issue, I immediately go to all the forums, subreddits and stackoverflow sites where I posted the question and post the relevant solution. Its a lot of work but totally beats figuring out what you did 6 months later
That’s just karma. I have tried not to do that to myself because so many others have done it to me. Still, sometimes the answer I left is too vague to be practical.
Oh man this happened to me last month. I was even wondering how this guy had the exact same issue that I was having and only realized after a while that it was literally me who posted it. I eventually found an answer and decided to post an answer in case future me forgets it again.
I've also had this happen, but never figured out the solution.
This is especially frustrating because your question is likely to pop up first in your search results because you probably phrase things the same way even years later!