You can also get information beside man gcc (you have to change the order of your cmd) by using

info gcc

To get a short command description type

gcc --help

For a full manual install the gcc documentation by

gccv=$(gcc --version | awk '/gcc /{print $NF}' | cut -c 1)
sudo apt install gcc-$gccv-doc

and then type

xdg-open /usr/share/doc/gcc-$gccv-doc/gcc.html

to read the gcc manual in your browser.

Answer from abu_bua on askubuntu.com
🌐
Linux Man Pages
man7.org β€Ί linux β€Ί man-pages β€Ί man1 β€Ί gcc.1.html
gcc(1) - Linux manual page
gcc [-c|-S|-E] [-std=standard] [-g] [-pg] [-Olevel] [-Wwarn...] [-Wpedantic] [-Idir...] [-Ldir...] [-Dmacro[=defn]...] [-Umacro] [-foption...] [-mmachine-option...] [-o outfile] [@file] infile... Only the most useful options are listed here; see below for the remainder.
🌐
Linux Man Pages
linux.die.net β€Ί man β€Ί 1 β€Ί gcc
gcc(1): GNU project C/C++ compiler - Linux man page
( NOTE: This manual does not describe the Objective-C and Objective-C ++ languages themselves. See Β· This section describes the command-line options that are only meaningful for Objective-C and Objective-C ++ programs, but you can also use most of the language-independent GNU compiler options. For example, you might compile a file "some_class.m" like this: gcc -g -fgnu-runtime -O -c some_class.mIn this example, -fgnu-runtime is an option meant only for Objective-C and Objective-C ++ programs; you can use the other options with any language supported by GCC .
Discussions

What is a great, well-written tutorial on the GCC command line parameters? (please don't say to read the 8,000+ page manual)
Why would you have to read the entire manual just for the command line parameters? Here's the page for options specific to C . While it's not brief, it's only about 7 printed pages. More on reddit.com
🌐 r/C_Programming
39
74
December 30, 2018
c++ - Man pages for gcc Library functions - Stack Overflow
I want to view function man pages in gcc on Ubuntu. For instance, say I want to look up a certain function accept(), I can issue a command man acccept, which gives me the function definition. Ho... More on stackoverflow.com
🌐 stackoverflow.com
macos - How to fix "No manual entry for gcc"? - Stack Overflow
I somehow lost the man pages for gcc and g++. I'm not sure where/what to look for. I'm pretty sure the man pages used to work some time ago. It also works on my Mac at work where I use roughly the ... More on stackoverflow.com
🌐 stackoverflow.com
Is there a c++ package for man pages?
Hi does opensuse have a package for c++ man pages? More on forums.opensuse.org
🌐 forums.opensuse.org
0
August 4, 2022
🌐
GNU
gcc.gnu.org β€Ί onlinedocs
GCC online documentation - GNU Project
January 30, 2026 - GNU M2 15.2 Manual (also in PDF or PostScript or an HTML tarball) GCC COBOL 15.2 Manual Page (also in PDF) and GCC COBOL 15.2 I/O API Manual Page (also in PDF)
🌐
GNU
gcc.gnu.org β€Ί onlinedocs β€Ί gccint β€Ί Man-Page-Generation.html
Man Page Generation (GNU Compiler Collection (GCC) Internals)
Because of user demand, in addition to full Texinfo manuals, man pages are provided which contain extracts from those manuals. These man pages are generated from the Texinfo manuals using contrib/texi2pod.pl and pod2man. (The man page for g++, cp/g++.1, just contains a β€˜.so’ reference to gcc.1, ...
🌐
Manpagez
manpagez.com β€Ί man β€Ί 1 β€Ί gcc-3.3
man page gcc-3.3 section 1
If the description for a particular option does not mention a source language, you can use that option with all supported languages. The gcc program accepts options and file names as operands. Many options have multi-letter names; therefore multiple single-letter options may not be grouped: ...
🌐
Reddit
reddit.com β€Ί r/c_programming β€Ί what is a great, well-written tutorial on the gcc command line parameters? (please don't say to read the 8,000+ page manual)
What is a great, well-written tutorial on the GCC command ...
December 30, 2018 - Why would you have to read the entire manual just for the command line parameters? Here's the page for options specific to C. While it's not brief, it's only about 7 printed pages. ... Using GCC by Richard Stallman et al all the command line parameters explained.
Find elsewhere
🌐
Red Hat
docs.redhat.com β€Ί en β€Ί documentation β€Ί red_hat_enterprise_linux β€Ί 7 β€Ί html β€Ί developer_guide β€Ί gcc-compiling-code
Chapter 15. Building Code with GCC | Developer Guide | Red Hat Enterprise Linux | 7 | Red Hat Documentation
$ gcc ... -O2 -g -Wall -Wl,-z,now,-z,relro -fstack-protector-strong -D_FORTIFY_SOURCE=2 ... Copy to Clipboard Copied! ... For programs, add the -fPIE and -pie Position Independent Executable options. For dynamically linked libraries, the mandatory -fPIC (Position Independent Code) option indirectly increases security.
🌐
Linux Man Pages
linux.die.net β€Ί man β€Ί 1 β€Ί m68k-linux-gnu-gcc
m68k-linux-gnu-gcc(1) - Linux man page
When you invoke GCC , it normally does preprocessing, compilation, assembly and linking. The "overall options" allow you to stop this process at an ...
🌐
Retriever's blog
retriever.hashnode.dev β€Ί understanding-the-absence-of-gcc-man-pages
Understanding the Absence of GCC Man Pages
July 5, 2023 - Compiler Exists: The which gcc command confirms that the gcc compiler does exist. Installing Man Page: To obtain the man page for gcc, you may need to install a documentation or manual package for gcc.
🌐
ManKier
mankier.com β€Ί package β€Ί gcc
Package gcc - man pages | ManKier
The gcc package contains the GNU Compiler Collection version 16.
🌐
Arch Linux Man Pages
man.archlinux.org β€Ί man β€Ί gcc.1
gcc(1) β€” Arch manual pages
GCC is capable of preprocessing and compiling several files either into several assembler input files, or into one assembler input file; then each assembler input file produces an object file, and linking combines all the object files (those newly compiled, and those specified as input) into ...
🌐
GNCC Racing
gnccracing.com β€Ί home β€Ί 2026 race schedule
2026 Race Schedule - GNCC Racing
GNCC Racing is the World's Premier Cross Country Racing Series since 1975, featuring ATV, Motorcycle and eMTB racing, Pro and Amateur racers, Adult and Youth classes.
🌐
Medium
medium.com β€Ί @larmalade β€Ί gcc-the-hard-way-how-to-include-functions-from-the-math-library-1cfe60f24a7a
gcc The Hard Way: How to Include Functions from the Math Library | by Larry Madeo | Medium
February 12, 2017 - My next question is, β€œWhy should ... steps to link the math.h file? Time to RTFM, yet again. First step: openman gcc from the command line. I encourage you to pour through this very long man page, as I did....
🌐
Reddit
reddit.com β€Ί r/debian β€Ί why is the manpage for gcc missing in debian?
r/debian on Reddit: Why is the manpage for gcc missing in debian?
August 17, 2021 -

gcc, a pretty basic, commonly used, and somewhat important command has not had a manpage in debian 10, and from what i can tell by checking a live image of debian 11, it has no manpage in debian 11.

Why is this?

I did a brief search but found only like two results/discussions about this. One was from the early days of stretch, and said that the manpage was not packaged on time for stretch. Well, i would have guessed that it is not that much of a deal to write a manpage and we could have one at least by now in bullseye.

I also read that it is only available in non-free (or contrib?). Has this something to with it? Anyway, i have both enabled in my sources.list on stretch and can not find or install a package called gcc-doc or the like (that was the packagename suggested in my search results). I have not tested this on bullseye yet.

I am primarily interested in how to get the manual for gcc and the reason for that it's missing. But i am also curious why a manpage would be contrib or non-free while the acutal package is in the main repository.

Top answer
1 of 3
41
gcc-8-doc is in buster-backports and gcc-9-doc and gcc-10-doc are in bullseye. But all are in non-free, because gcc's documentation is licensed under the GFDL and has invariant sections, and Debian considers that to be not free.
2 of 3
5
As stated else where Debian seem to think the GNU Free Documentation License is non-free, which I think is a bit nit-picky as "invariant sections" are there to protect elements that should be verbatim, such as a quote or speech or something that obviously should not be allowed to be modified by anyone other that the one who actually wrote it. Such things are essential in publishing a text as a book is very different from code. Code merely instructs a computer what to do, text like a book, or certain sections of a manual that are relevant to the author rather the program the manual describes are quite clearly, different. Debian have this page about the subject: https://wiki.debian.org/GFDLHistory This one seems much better: https://people.debian.org/~srivasta/Position_Statement.xhtml Some of the links there look broken after 20 years. One thing I can *partly* agree with on Debians part is they say most issues would go away if the invariant sections can be removed from a new version of the text. I only partly agree there as I can see how it can be miss-used by an author to hamper the update of a manual for a new version. But if you allow their removal, it can thus be miss-used by third parties to change the original text! Which clearly is a paradox as neither are good. We may not be simply talking about modifying a manual to say option '-x' does this or that, we are also talking about the authors sections title "About the author" etc. Here the author describes themselves, their political stances, maybe more personal things like sexuality. If such sections were *not protected*, then anyone would have the freedom to modify the words to change their meaning to suit their political/social ends, or remove them entirely, sweeping them away as if they never existed. That would apply to *all* works under the GNU FDL, not just manuals. Here I side with GNU. The GNU FDL is not doing much more than what the GNU GPL does. The GPL places restrictions on developers, which many BSD license fans think is pure evil as they think that there should be *no restriction* whatsoever, sure this is free as can be, including granting the freedom to remove freedom from users, which is precisely what the GPL was designed to prevent. https://www.gnu.org/philosophy/free-doc.html Considering the alternative is a totally non-free manual from some well know publisher I say the FDL works fine in doing for documentation what the GPL does for software. Debian took votes back then (the link I provided shows the options), I know what I would have voted for. Even though I think Debian is incorrect through possibly not understanding the differences between software and documents I'm pretty happy they have this process, many distributions don't even bother discussing Free Software issues etc. The DFSG is one of the reasons I use Debian, even if it has a few little funny errors and odd bits like this.