You have to give it exe. permissions.

So: chmod +x new_file

When you create a new file with your gcc, by default, this isn't executable. So, you have to gave it permissions of execution.

With chmod (see this) you change permissions on file.

In that specific case, you gave execution permissions ( + [plus] means gave, 'x' means execution ) to that file.

If you want to revoke that permission, you can type: chmod -x filename

Answer from DonCallisto on Stack Overflow
🌐
Reddit
reddit.com › r/cprogramming › how to learn c programming for linux (total beginner)
r/cprogramming on Reddit: How to learn c programming for Linux (total beginner)
June 2, 2024 -

I've been wanting to switch my computer to Linux, just to get better with computers, and to see what I can customize. The problem is, that I don't know where to start. A lot of vocabulary gets thrown around (servers, distros, etc.), and I end up in a rabbit hole where I don't understand anything. Is there any online courses that start at a very beginner level, that help teach C programming, and that focus on using/switching to Linux?

🌐
Phoronix
phoronix.com › news › Linux-7.0-PHY-Changes
Linux 7.0 Brings Apple Type-C PHY, Snapdragon X2 & Rockchip HDMI 2.1 FRL Additions - Phoronix
2 weeks ago - Following all the Apple Silicon USB work going upstream in recent kernel releases, the Apple USB Type-C PHY support is now mainline in Linux 7.0. Another new PHY driver is for the SpacemiT PCIe/combo PHY and K1 USB2. Also new is enabling the TI TCAN1046 PHY as well as Renesas RZ/V2H(P) and RZ/V2N USB3, Mediatek MT8188 HDMI PHY, and the Google Tensor SoC USB PHY driver.
Discussions

Executing C program in Linux Terminal - Stack Overflow
I have compiled a program from my Ububtu 10.10 terminal by gcc file_name.c -o new_file command. It compiled successfully creating an executable file named new_file. But when I was trying to exec... More on stackoverflow.com
🌐 stackoverflow.com
python - What does "-c" mean in this linux shell command? - Stack Overflow
It's from a tutorial on the google cloud platform, they call python from the Linux Shell. I'm totally new to gcp and linux, please help me, where can I find some exhaustive documentation for python... More on stackoverflow.com
🌐 stackoverflow.com
In the Linux Kernel, how are callbacks and trampolines designed and implemented : C_Programming
Hobby x86-32bit C compiler I created ... C! Inspired by C4. (Very hacky) ... Planning to write a database management system as a first command-line tool. ... QuestionIn the Linux Kernel, how are callbacks and trampolines designed and implemented (self.C_Programming) ... Post a comment! ... Use of this site constitutes acceptance of our User Agreement and Privacy Policy. © 2025 reddit ... More on old.reddit.com
🌐 r/C_Programming
Linux From Scratch to learn C and Linux?

No, not really. LFS is a manual to assemble your only Linux system. As far as I know, it doesn't actually teach you a lot about how the components work, it's just a list of steps to follow.

Perhaps read learn C the hard way or just The C Programming Language and then see how far this brings you. I can also not stress enough the importance of reading other people's code to learn how to write good C code.

More on reddit.com
🌐 r/C_Programming
26
24
August 17, 2016
🌐
nixCraft
cyberciti.biz › nixcraft › howto › gnu c / c++ › how to compile and run a c/c++ code in linux
How To Compile And Run a C/C++ Code In Linux - nixCraft
June 29, 2024 - The syntax is as follows if the source code is in several files (such as light.c, sky.c, fireworks.c): $ cc light.c sky.c fireworks.c -o executable C++ syntax is as follows if the source code is in several files: $ g++ ac.C bc.C file3.C -o my-program-name See the ‘gcc(1)’ and other related Linux manual pages for more information using the man command or help command: $ man gcc $ man g++ $ man cpp $ man make
🌐
Udemy
udemy.com › it & software
The Beginner's guide to Advanced C programming for Linux
February 11, 2025 - Learn C, improve your CV & stand out from the crowd when applying for developer positions. Become a better Linux admin. ... Learn to write a hello world program in linux using nano, include stdio, define int main, print with printf, compile with gcc, and run the executable.
Rating: 4.5 ​ - ​ 100 votes
🌐
Opensource.com
opensource.com › article › 22 › 7 › learn-c-linux
5 ways to learn C programming on Linux | Opensource.com
July 14, 2022 - Our latest Linux articles · Lua is a scripting language with access to C libraries through a built-in C API. It's a tiny, fast, and simple language with about 30 functions and just a handful of built-in libraries.
🌐
Scaler
scaler.com › home › topics › how to compile c program in linux?
How to Compile C Program in Linux? - Scaler Topics
April 13, 2024 - Learn to install build-essential meta-package in Linux Operating System and compile and run a C program in the terminal on scaler topics.
Find elsewhere
🌐
GitHub
passlab.github.io › CSE564 › notes › lecture01_LinuxCProgramming.pdf pdf
Lecture 01: Linux and C Programming Language
CompilaAon Process in C · • CompilaRon process: gcc hello.c –o hello · – ConstrucRng an executable image for an applicaRon · – FOUR stages · – Command: gcc <opRons> <source_file.c> • Compiler Tool · – gcc (GNU Compiler) • man gcc (on Linux m/c) – icc (Intel C compiler) 4 Stages of CompilaAon Process ·
🌐
Quora
quora.com › Why-can-people-use-Linux-command-to-compile-and-run-C-language-Isn-t-Linux-an-operating-system-As-a-beginner-I-am-so-confused
Why can people use Linux command to compile and run C language? Isn’t Linux an operating system? As a beginner I am so confused. - Quora
Answer (1 of 6): Operating systems let you run applications. Linux is a Unix-family operating system, and unixes come with a few hundred to a few thousand applications; most commands are an application, in fact. A C compiler and the other tools you use to work on C programs are amongst those ap...
🌐
Quora
quora.com › Do-C-programs-run-on-linux
Do C programs run on linux? - Quora
Answer (1 of 10): First of all, the language you use and the operating system on which you run your code are two separate issues. Of course it is a good question whether or not a compiler for a particular language is available for a particular platform, but C being one of the most universal langu...
🌐
Arduino
arduino.cc › en › software
Bring Your Projects to Life with Arduino Software
Arduino Flasher CLIEasily flash Linux images onto your Arduino UNO Q with Arduino Flasher CLI. ... Learn how to use the Arduino Flasher CLI — check our How to use guide in Arduino Docs.
🌐
CRAN
cran.r-project.org
The Comprehensive R Archive Network
The Comprehensive R Archive Network · Your browser seems not to support frames, here is the contents page of CRAN
🌐
Linux.org
linux.org › home › forums › general linux forums › ask tuxbot (archived)
Installing C compiler | Linux.org
December 21, 2023 - To install the C compiler on most Linux distributions, you can use the following commands: For Ubuntu or Debian-based systems:
🌐
The Guardian
jobs.theguardian.com › job › 10036043 › c-linux-sr-lead-software-engineer-cross-assets-electronic-trading-services
C++, Linux Sr Lead Software Engineer Cross Assets ...
2 weeks ago - Search & apply for vacancies at top employers on our job site. Add your CV today and apply for open roles throughout the UK. Find a job where you can be you.
🌐
Medium
medium.com › @Corbin_Coleman › compiling-c-code-on-linux-using-gcc-904781113497
Compiling C Code on Linux Using gcc | by Corbin Coleman | Medium
April 1, 2018 - This means, that it’s easier for people to understand than it is for the computer to understand. So, to make it understandable for the machine the C language has to be compiled and translated into machine language. One way to do this through the Linux system is to use the command gcc to run ...
🌐
Coursera
coursera.org › browse › computer science › software development
C Programming with Linux | Coursera
In this C Programming with Linux Specialization program of seven short courses, you will learn how to write, read and debug computer programs in the C programming language while also becoming familiar with the Linux operating system.
Rating: 4.6 ​ - ​ 436 votes
🌐
LINFO
linfo.org › create_c1.html
Beginning C programming tutorial by The Linux Information Project
March 21, 2005 - Most computer users will never write a computer program, just as most people who enjoy music will never write a musical composition · However, creating programs can be extremely simple and highly educational. It is so simple, in fact, that even people who know almost nothing about computers ...
🌐
Python
python.org › downloads
Download Python | Python.org
Chat on IRC · Twitter · Download Python 3.14.3 · Download Python install manager · Or get the standalone installer for Python 3.14.3 · Download Python 3.14.3 · Download Python 3.14.3 · Looking for Python with a different OS? Python for Windows, Linux/Unix, macOS, Android, other ·