Linux MAN page question


I have couple of question regarding using Man pages in Linux.

1. When i get into the folder /usr/share/man, I could see folders such as man1, man2, man3, man4 ......man9. what are all those?  In some article, I noticed something like "refer man5 page" etc. How can i do that?

2. Can I convert the Man pages into a file so that I can take print out of it or save it for future reference.

Who is Participating?
jazzIIIloveConnect With a Mentor Commented:
Hi there;

Some commands have multiple man pages. For instance, the passwd command has a man page in section 1 and another in section 5. By default, the man page with the lowest number is shown. If you want to see another section than the default, specify it after the man command:

man 5 passwd

If you want to see all man pages about a command, one after the other, use the -a to man:

man -a passwd

This way, when you reach the end of the first man page and press SPACE again, the man page from the next section will be displayed.

Best regards...

michofreihaConnect With a Mentor Commented:
man ls > file_name

In order to append the same file

man ls >> file_name
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

if you want some informaiton, you type

man ls = to get information about ls command
you dont go to /usr/share/man folder for that
man man

to find out all about man and the various categories.

TintinConnect With a Mentor Commented:
To refer to a particular section, just do

man 5 name
rdashokrajAuthor Commented:
Thanks so much for all your responses.
rdashokrajAuthor Commented:
Hi fosiul01,

In the script given in the specified page:
has one small bug.

Instead of this line,  man $i  col -b > $OUTDIR/$i.txt
the syntax should be as  man $i | col -b > $OUTDIR/$i.txt

The pipe is left out in it.

Just want to bring to your notice.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.