*nix command line tip - man is your friend

The command line is great. When you know how to use it properly, it can be the fastest way to achieve a task and it is endlessly extensible.

The problem is, commands and their syntax can be really tricky to remember. Sometimes you just can't remember what a particular switch does, or what switch you need to perform a particular task. My common one until recently was always forgetting which way round you use ln (I've taught myself that it's target, link name).

Thankfully, help is at hand, thanks to man. Short for manual, if you invoke the man command followed by the name of the command you're looking for help with, you'll get a rather geeky, but still often helpful manual page.

For example,

$ man ls

will show you all you need to know about ls.

Once you're viewing a man page, you can use page up and page down to scroll through and press q to quit out when you're done reading up.

If you're not at a machine with a decent CLI (read: a Windows box), a web search for man commandname will usually give you a web-based man page, which might help. It's sometimes best to use the ones on your system, though, if possible, as online versions might be talking about slightly differing versions of the commands on your system. For quick reference, though, they're great.

So next time you're sitting at the blinking cursor and you're stumped, try using man before giving up!

Avatar for peter Peter Upfold - http://peter.upfold.org.uk/

Peter Upfold is a technology enthusiast from the UK. Peter’s interest in Linux stems back to 2003, when curiosity got the better of him and he began using SUSE 9.0. Now he runs Linux Mint 9 on the desktop, runs a CentOS-based web server from home for his personal website and dabbles in all sorts of technology things across the Windows, Mac and open source worlds.

Home » Articles »

Discussion: *nix command line tip - man is your friend

  1. # Posted on 21 February 2007 at 09:37 AM

    [...] always, you can read the man page for more advanced options on using the [...]



  2. # Posted on 02 April 2007 at 01:22 AM

    [...] there are quite a few configuration options for it, so if you can decipher it, it’s worth reading the man page. $ [...]



  3. # Posted on 28 April 2007 at 10:40 AM

    [...] This throws up some pretty geeky DNS information. There are a plethora of options available, so I won’t go over them all here. Remember, the man page can help there. [...]



  4. # Posted on 20 June 2007 at 01:48 PM

    [...] have a complex setup (for example -p portnumber for alternative ports), which you can read up on by using the man page. digg_url = "http://fosswire.com/2007/06/20/use-scp-to-securely-transfer-files/"; digg_skin = [...]



  5. # Posted on 06 July 2007 at 01:34 PM

    [...] you’re looking for some documentation and help about a specific command, man really is your best friend. Almost all the commands on your system will have a man page where you can look to find all sorts [...]



Home » Articles » *nix command line tip - man is your friend