Skip navigation

If you’ve spent any amount of time in the terminal, you’ve probably had to look up some specific function of a command–if you’re like me and basically self-taught in the ways of Linux, you’ve probably spent a lot of time with man pages. If you’re like me, you probably also never knew that there are switches, though I suppose options is the more correct term on Linux systems, to go along with man.

Running man with the -k option (or --apropos) is something I wish I’d known about long ago. man -k, which has the same function as the apropos command (which I also wish I’d known about long ago) allows you to look up a command when you know what you want to do, but don’t know the command name. Simply type man -k followed by your search term to pop up a list of commands whose names or synopses match what you’re looking for.

In the case that you know the name of a command–maybe you heard some wizards tossing it around–but don’t actually know what it does and don’t want to read through the whole man page, there’s an option for that, too. man -f or whatis will give you the synopsis of the command. Now you don’t have to wonder anymore.

Finally, if you want to read up on a command but don’t want to spend any more time in front of a computer screen, there is a way for you to print out man pages. Using the -t option in conjunction with some things I don’t fully understand yet, you can send a man page to a printer or, if you do want to read off a screen after all, you can make a PDF version of a man page. The commands for this are man -t grep | lpr -P [some printer set up on your system] to print and man -t nslookup > && ps2pdf && rm to create a PDF.

Soon, I will have a better understanding of what those last things I just typed mean, but I thought they were too interesting to pass up right now.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: