Question:
To learn LINUX PROGRAMMING is it necessary to know C or c++.?
2012-05-26 04:40:06 UTC
To know linux are C or C++ are important ??
Five answers:
Unca Alby
2012-05-27 17:46:10 UTC
To augment what others have already said, it really depends on what you mean by "Linux Programming".



E.g., you can do programming using Bash, which is a command-shell script program. The most typical use is to act as the mediator between the human, who enters a command, and the computer, which executes the command, then displays the results of that command.



Additionally, the script can be set up to run certain commands, as if typed by the user, according to certain conditions. E.g., it can run a compiler against source code, and the stop processing if the compiler detects an error condition. Or, if no errors are found, the output of the compiler can be passed to a linker to link various modules together into an application. Then finally, if no errors occur in linking, the result can be installed into a certain directory for public use.



All of this can be done without knowing C or C++, and scripts can be just as complex.



BUT -- --



If you mean "Linux Programming" as in programming modules that will become *part* of Linux, such as device drivers, or security controls, or networking, etc. etc., then yes, you must learn C. I would guesstimate that probably 92% of that is written in C, 3% in C++, and the rest in assembly and machine language.



You are not going to write that kind of Linux Programming without knowing C and C++.
Motorhead
2012-05-26 11:31:37 UTC
Linux is just another operating system, like Windows, Mac OS, etc., and you can program in any language.

But if you want to learn systems programming, then yes learn C and C++ because they are what is used for systems programming, because they are the fastest you can do without getting down to machine code.

Easier languages like C#, Java, Perl, Python, etc., are all much slower then C or C++, because they need run time interpretation, just in time compiling, or some sort of emulation that takes more than 5 instructions for every 1 implemented.
ray_diator
2012-05-26 04:47:29 UTC
I'm not sure what you mean by Linux programming. Although the various modules and programs that make up Linux are written in C, there are are also scripting language files written using the Bash sell and Perl..



It would help if you know C in particular if you want to develop or hack programs on a Linux operating system.
green meklar
2012-05-26 22:27:48 UTC
What do you mean by 'Linux programming'? You can do programming in many languages on Linux. Most of them, including C and C++, are not specific to Linux.
ratter_of_the_shire
2012-05-26 07:45:22 UTC
No, you can write program for linux in just about any language that you choose.



That being said, C, C++, bash, and python are the most common languages used for linux programs. Java, lisp, C#, can also be commonly found.



C is the language used in the kernel so if you want to hack on the kernel, you need to be a master of C code.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...