18

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?

1
  • 2
    Apparently I miss-clicked downvote and now its set in stone, sorry about that. Commented Oct 8, 2015 at 16:59

2 Answers 2

17

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:
2
4

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.