Preparation for Programming in Linux

This topic was published by and viewed 1753 times since "". The last page revision was "".

Viewing 1 post (of 1 total)
  • Author

  • Hooman Aminvand
    • Topics - 11
    • @hooman

    In this session, we will familiarize ourselves with the installation requirements and see what tools are needed for programming in C.

    Basic Concepts

    Compiler: Tool or software that converts programming codes (C/C++, Java, etc.) to machine code (computers understanding machine code)

    Important Outputs

    • Error Codes: If there is a mistake in your code, error codes will show your mistakes
    • Precautions: In some cases, such as when the code contains a useless variable that is not used in the program, an alert is generated. Warnings, unlike errors, do not prevent the implementation of the program, and warnings are merely notifications to optimize the program.
    • Executable File: A file that has the ability to execute.

    For this tutorial, we will use Ubuntu. You will be able to work with Linux and learn basic information about commands. You will learn about C-programming and the GCC compiler.


    First, you need a GNU/Linux operating-system with BASH, such as Ubuntu. We will see if the GCC compiler is installed using a terminal (Ctrl+Alt+T). Type "gcc" and then double-press Tab.

    Check GCC in Terminal
    Check GCC in Terminal

    If it shows you that it is not installed on your system, you will enter sudo apt-get install gcc.

    GCC has C libraries, but to be able to compile C++, you will enter sudo apt-get install build-essential.

    Next, type "g++" and double-press Tab and you should see a list of "g++" commands.

    Check G++ in Terminal
    Check G++ in Terminal

    Now, your compiler is ready!

    Further Reading

    1. Check GCC in Terminal
    2. Check G++ in Terminal
Viewing 1 post (of 1 total)