Contents
Run a C/C++ program on terminal using gcc compiler
- Open terminal.
- Type command to install gcc or g++ complier:
- Now go to that folder where you will create C/C++ programs.
- Open a file using any editor.
- Add this code in the file:
- Save the file and exit.
- Compile the program using any of the following command:
- To run this program type this command:
How do I compile and install a new Linux kernel?
Configure, build, and install
- Download the latest kernel from kernel.org. The kernel comes as a 20 to 30 MB tar.gz or tar.bz2 file.
- Configure the kernel options.
- Make dependencies.
- Make the kernel.
- Make the modules.
- Install the modules.
How do I build a Linux kernel from source?
How to Compile Linux Kernel from Source to Build Custom Kernel
- Download the Latest Stable Kernel. The first step is to download the latest stable kernel from kernel.org.
- Untar the Kernel Source. The second step is to untar the kernel source file for compilation.
- Configure the Kernel.
- Compile the Linux Kernel.
- Install the New Kernel.
- Boot Linux to the new Kernel.