screen
You will then be in a screen session, and you can close your terminal without losing your work. To get back your session, log in again to the same machine and run:
screen -r
You can have multiple screen sessions on the same machine, and when you run screen -r you'll get a list of them with numerical IDs. To pick a specific one, you can type:
screen -r id
You might find it easier to use multiple screen sessions if you name them, rather than relying on the numerical IDs. To start a screen session with a name you choose, run:
screen -S yourname
Then, to get that session back, you can run:
screen -r yourname