gcc and g++
1. man g++ / man gcc
gcc - GNU project C and C++ compiler
yongqiang@deepnorth-amax:~$ man g++
yongqiang@deepnorth-amax:~$ man gcc
g++ accepts mostly the same options as gcc.
2. which gcc / which g++
yongqiang@deepnorth-amax:~$ which gcc
/usr/bin/gcc
yongqiang@deepnorth-amax:~$
yongqiang@deepnorth-amax:~$ which g++
/usr/bin/g++
yongqiang@deepnorth-amax:~$
3. ll /usr/bin/gcc* / ll /usr/bin/g++*
yongqiang@deepnorth-amax:~$ ll /usr/bin/gcc
lrwxrwxrwx 1 root root 5 7月 8 2019 /usr/bin/gcc -> gcc-5*
yongqiang@deepnorth-amax:~$
yongqiang@deepnorth-amax:~$ ll /usr/bin/g++
lrwxrwxrwx 1 root root 5 7月 8 2019 /usr/bin/g++ -> g++-5*
yongqiang@deepnorth-amax:~$
yongqiang@deepnorth-amax:~$ ll /usr/bin/gcc*
lrwxrwxrwx 1 root root 5 7月 8 2019 /usr/bin/gcc -> gcc-5*
-rwxr-xr-x 1 root root 915736 8月 28 2018 /usr/bin/gcc-5*
lrwxrwxrwx 1 root root 8 7月 8 2019 /usr/bin/gcc-ar -> gcc-ar-5*
-rwxr-xr-x 1 root root 31136 8月 28 2018 /usr/bin/gcc-ar-5*
lrwxrwxrwx 1 root root 8 7月 8 2019 /usr/bin/gcc-nm -> gcc-nm-5*
-rwxr-xr-x 1 root root 31136 8月 28 2018 /usr/bin/gcc-nm-5*
lrwxrwxrwx 1 root root 12 7月 8 2019 /usr/bin/gcc-ranlib -> gcc-ranlib-5*
-rwxr-xr-x 1 root root 31136 8月 28 2018 /usr/bin/gcc-ranlib-5*
yongqiang@deepnorth-amax:~$
yongqiang@deepnorth-amax:~$ ll /usr/bin/g++*
lrwxrwxrwx 1 root root 5 7月 8 2019 /usr/bin/g++ -> g++-5*
-rwxr-xr-x 1 root root 919832 8月 28 2018 /usr/bin/g++-5*
yongqiang@deepnorth-amax:~$
4. gcc --version / g++ --version
--version
Display the version number and copyrights of the invoked GCC.
yongqiang@deepnorth-amax:~$ gcc --version
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.11) 5.4.0 20160609
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
yongqiang@deepnorth-amax:~$
yongqiang@deepnorth-amax:~$ g++ --version
g++ (Ubuntu 5.4.0-6ubuntu1~16.04.11) 5.4.0 20160609
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
yongqiang@deepnorth-amax:~$