How to add a command to the Bash history without executing it

bashcommand history

Every now and then it would be useful to add a command directly to the history in Bash without actually executing it. So far the closed thing I have found is adding a # in front of it and hitting return. Are there better ways?

Best Answer

history -s command