Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I downloaded gcc-4.1-doc package to my Ubuntu computer. How can I use it? What command should I execute to see this documentation?

share|improve this question

migrated from Mar 13 '10 at 2:55

This question came from our site for professional and enthusiast programmers.

up vote 4 down vote accepted

man gcc should do the trick. /usr/share/doc/gcc-4.1/ also contains docs.

Here's the list of files that are installed: ` /usr/share/doc-base/gcc-4.1






/usr/share/info/ `

So you can use the info program to read the docs as well.

share|improve this answer
Thank you, got it working. I see that this is language specification and command line reference. What about CRT functions? For example, I want to type "sqrt" and see its definition, required h-file and library where this function is placed. – Alex Farber Mar 12 '10 at 20:10
try apropos sqrt. Output: csqrt (3) - complex square root csqrtf (3) - complex square root csqrtl (3) - complex square root sqrt (3) - square root function sqrtf (3) - square root function sqrtl (3) - square root function If you do not get the required output you should try installing libc6-dev – Radhesh Mar 12 '10 at 20:12

Running man gcc is likely to give you an abbreviated manual page.

Usually (most systems - I'm not certain of Ubuntu specifically) you get more information from:

info gcc

You might need to specify where info is to look for the documentation; add options such as:

info -d /usr/gcc/v4.1 -f gcc

You might need to specify a sub-directory like /usr/gcc/v4.1/share/info rather than the configured prefix directory.

share|improve this answer

gcc's man page is only good for an overview of the command line options. The real documentation is in info format.

You can use the 'info' program to view the full documentation : 'info gcc'. If you are an emacs user, you can use it's info mode also (M-x info to get there).

The gcc-*-doc packages also include html formated versions of the info docs. You can point your web browser to file:///usr/share/doc/gcc-4.1-base/ to find it.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .