A terminal with copy on select.
And use the default shell. Zsh on Mac bash on every Linux I’ve ever used (I can’t really tell the difference). Extend your history limit and close your windows now and then so they write to the history file. If you’re doing shell scripting follow the Google style guide.