Apologies if this information seems slightly trivial – the thing is, it took me a few moments to find it, so in that sense it wasn’t entirely trivial… :)
I wanted to know how to end/close a sudo session – in many cases it seems unnecessary to leave your system “exposed” for the length of the timeout, but changing the timeout would be inconvenient at other occasions. So I searched the web, searched the man page, and didn’t find the answer with the keywords “close” or “end”.
The solution is of course to actually read the man page, and find out that better keywords would have been “kill” or “invalidate”. With those you would have quickly learned that “sudo -k” ends your session. There’s also “sudo -K” for “sure kill”, I’m not entirely sure about the subtle difference between these two.
Let me also seize the opportunity to link to the Ubuntu Manpages Repository, which I believe is a fairly new facility. You can find the man pages for sudo there, for example. I realise it’s a bit odd to use online man pages, and I personally much prefer reading them in a console with the fixed-width font they were intended for. But there’s one really good thing about online man pages: they will finally be able to acquire the Page Rank that they deserve – after all, most questions we ask Google about our OS should have a man page popping up in first position. So I’ll try to consistently link to the relevant man pages from now on…