I found out how to suspend via command line, namely by sudo pm-suspend. What I miss there is that when the machine wakes back up, the sessions (all of them running in different tty's) are not protected by password. I checked the man page for pm and this aspect is nowehere to be found there. Thus two questions:
1) How to make it work simply?
2) I could make an alias for pm-suspend, but then, what should I put there as instructions? Is there any way to log out of a shell session without killing it? Which is an interesting question on its own.
EDIT:
The question is about how to lock a shell session running outside any X environment (Gnome, etc).
EDIT:
To find out what I mean press Ctrl+Alt+F1 and follow from there. But make sure you know how to go back before you jump there :-)