Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Possible Duplicate:
How can I add man page entries for my own power tools?

Most (if not all) Linux commands have their man pages that describe their usage options etc. Can I create similar man page for my own bash scripts?

share|improve this question

marked as duplicate by manatwork, Kevin, sr_, Michael Mrozek Mar 19 '12 at 15:03

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

add comment

2 Answers 2

Man pages are roff (see man 7 roff) formatted documents.

  • You can write it by hand.
  • You can use help2man to generate it from your script's help output.
  • You can write it in a markup language and use a dedicated tool to convert it to man:
share|improve this answer
add comment

Yes, you can. The man pages are written as nroff files.
The /usr/local/man directory is the location typically used for any locally installed packages/files.
You can look at examples by looking at the existing manpages, (which will likely need to be uncompressed first), also read man.
Presently many users prefer groff to nroff, man groff to get started

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.