Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
There are literally thousands of tutorials and books out there for any given programming language. Do you have a specific language in mind? I personally think that Python may be a good start for beginners, it is easy to understand and can do everything you want.
Are there any particular languages you're interested in? What kind of programming are we talking about? Do you want to write system scripts, kernel, stand-alone applications or web applications? Generally, what are you trying to achieve? Your question is VERY, VERY, VERY vague and unless you give us more details, it'll be hard to help you.
I would recommend C, C++, or Python, depending on what you want to do.
Both C and C++ are very low-level, you have to manually manage memory and you can access bytes in memory directly. C++ is basically C with more features, most notably classes (https://secure.wikimedia.org/wikiped...programming%29).
Python is a high-level language, it does all the memory management for you, and you can't manipulate memory directly. It's easier and more convenient to use and learn, but it won't teach you all the low-level details that C or C++ will.
I have never programmed before, and I'd like to start right with Linux. Are there any avalible resources I can use to learn how-to and get started?
As for "learning how to program", I recommend either Python or Perl. They're both widely used, and are easy enough to learn using freely available (online and your local library) resources. And they both make it simple to perform simple tasks. Believe it or not, many languages are not so merciful.
Since your choice would be arbitrary (or perhaps based on which name sounds cooler), I'm going to recommend Perl for you. Why? Because it's my language du jour. If you'd asked me twelve months ago, it would have been something else.
Once you've gotten the hang of programming (in any language), there is a big world to explore out there. You'll want to learn Bourne shell and C. But you need to establish a reasonable foundation first.
I personally would suggest learning python as a first language. It's syntax is very easy and simplfied, so you can actually learn how to program over learning the syntax of a specific language. Plus it makes you indent which is a great habit to start with.
I had a hard time understanding C pointers and the lower level aspects at first. So starting with python should make programming seem less crazy IMO.
After working with python and learning what programming is like, I would move to C; You can learn the lower level memory management.
Formally there are several classes of programming languages. It is not easy to pass from a class to another class. Also languages are divided into interpreted and compiled (say so). If you are thinking about numbers, arrays, records - then in fact you are in class of languages with data types - procedural languagues where building blocks are data types, variables and procedures - say C or Pascal. If you forget about data types and think about objects and methods - this is an objective programming - to this class of languages belongs eg. C++ (some people treat C++ as a some kind of an extension of C - which is a complete misunderstanding). There are other more strange languages like LISP (a freetype language) or Prolog (logic programming) or Haskell (functional programming). There are languages created for very particular applications - say Fortran - created for scientific computations.
The choice is always yours. So before choosing anything try to find an introduction to a concept of a computer programming - what is it all about - why there are so many languages - which is better.
Advanced Linux Programming book takes a tutorial approach, introducing the most important programming concepts and techniques, and providing examples of how to use them. The book is not intended for beginners, and readers are expected to be competent with the C programming language and C library functions. But can be useful once you have started.
LINUX: Rute User's Tutorial and Exposition is a technical reference and teaching tool for new GNU/Linux users as well as advanced administrators. It provides concise, thorough explanations and practical examples of each aspect of a Linux system. Very useful!
Tutorials section has several links for helpful tutorials.
Many newbies really do not see the benefit of learning script. You can develop most application needs with good script programming. That can sometimes lead into development of advanced level programming from the script model. While at times the script tool itself will suffice. You would be surprised as to the usefulness of developing a application via script language that meets the needs for applications without the use of higher level languages. Linux Shell Scripting Tutorial - A Beginner's handbook would be a good starting point. Plus look at items 4,5 & 6 below.
This can lead into learning good techniques that will enhance your abilities to learn other programming methodologies and languages.
Look at LDP for useful information. You will find a load of information from LDP since it is document central for Linux.
Do not forget about Virtualization since it can be used as a safe environment to develop within. A VM will allow you to experiment without the worry of damage to the host system when the client is properly setup. You can play within the sandbox without worry.
Just a few links to aid you to gaining some understanding;
I want to try to write code for Gtk+ applications specifically. I've learned some extreme basics of using the graphical Glade to make basic buttons and text that do nothing and compiled source code, but that's about it.
Big cloud, small rain. OK! If the buttons on a desktop is this what you want then maybe try this http://inux.pte.hu/~pipas/gtkdialog/
I've got this. It's nice and funny.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.