'screen' is the answer. It does a ton of useful stuff, so well worth learning.
Discussion
Got a link? If not I can look it up later.
Probably just need to 'man screen'. If not: https://www.gnu.org/software/screen/
Derp I dident know it was something already in linux systems. 😅