What is the linux installation gcc command
Editor to share with you what the linux installation gcc command is. I hope you will gain a lot after reading this article. Let's discuss it together.
Linux installs gcc command
Get to know gcc.
Gcc is the GNU compiler suite (GNU Compiler Collection), which includes the front end of the C, C++, Objective-C, Fortran, Java, Ada, Go and D languages, as well as libraries for these languages (such as libstdc++, libgcj, and so on). The original intention of GCC is to write a compiler specifically for the GNU operating system. The GNU system is thoroughly free software. Here, "freedom" means that it respects the freedom of the user.
CentOS installation command
Use yum to install gcc in Centos
Yum-y install gcc
Press the enter key to install gcc. To install gencrypted, you need to enter on the command line:
Yum-y install gcc-c++
You will be able to install grub +.
Ubuntu installation command
Use apt to install gcc in Ubuntu
Sudo apt install build-essential
Verification
Gcc-version
Compile the Hello World sample
Compiling basic C or C + + programs using GCC is very simple. Open a text editor and create the following file:
Nano hello.c#include int main () {printf ("Hello World!\ n"); return 0;}
Compile
Gcc hello.c-o hello
This creates a binary file named hello in the same directory where the command was run.
Execute the hello program:
. / hello
The program will display:
Hello World! After reading this article, I believe you have a certain understanding of what linux install gcc command is, want to know more about it, welcome to follow the industry information channel, thank you for reading!