How to close a sudo session, and why online man pages are useful

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…

Advertisements

6 Responses to “How to close a sudo session, and why online man pages are useful”


  1. 1 Moya.Edge 9 March 2009 at 18:36

    Thanks for the info. Searching Google with “sudo end” brings up this page.

  2. 3 Zephyrus360 1 October 2009 at 20:39

    Hey thnx, tat was a helpful piece of info..
    I was looking for it!

  3. 4 KnifeySpooney 29 November 2009 at 2:22

    Thanks, I was looking all over Google for the command and finally found this article.

  4. 5 Sourav Chakraborty 22 August 2011 at 6:10

    Hey your like box don’t seem to work on Firefox (v6 on Mac).

  5. 6 Nicholas Anderson 3 November 2012 at 7:52

    Thank you for publishing this! Came up highly in the results after a quick Google search.


Comments are currently closed.




%d bloggers like this: