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.comWhat is a great, well-written tutorial on the GCC command line parameters? (please don't say to read the 8,000+ page manual)
c++ - Man pages for gcc Library functions - Stack Overflow
macos - How to fix "No manual entry for gcc"? - Stack Overflow
Is there a c++ package for man pages?
Videos
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.
To view manual use this commands order:
man gcc
According to man man, you can optionally give the section of the manual before the page. Section 1 is user commands, 2 system calls and 3 library functions, so:
man 1 printf
man 3 printf
give the shell command and the C library function printf, respectively.
mknod() the C function lives in section 2 of the man pages. You can view it using:
man -s2 mknod
In general things like this are likely to live in either section 2 (system calls) or section 3 (library calls)
gcc isn't installed anymore by Xcode, it really installs clang and calls it gcc
usxxplayegm1:~ grady$ which gcc
/usr/bin/gcc
usxxplayegm1:~ grady$ /usr/bin/gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.1 (clang-503.0.38) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.0.2
Thread model: posix
you need man clang
I thought it was a symlink, but ls -l doesn't list it as a symlink, so either it is a hard link or some other sort of trickery.
This may be old and doesn't quite answers your concrete question, but I found myself in the same problem with Kali Linux and I solved it with this command, maybe is useful for someone:
apt install gcc-doc
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.