Linux System Programming [closed]
I wanted to get into systems programming for linux and wanted to know how to approach that and where to begin. I come from a web development background (Python, PHP) but I also know some C and C++.
Essenti开发者_如何学Goally, I would like to know:
- Which language(s) to learn and pursue (I think mainly C and C++)?
- How/Where to learn those languages specific to Systems Programming? Books, websites, blogs, tutorials etc.
- Any other good places where I can start this from basics?
- Any good libraries to begin with?
- What environment setup (or approx.) do I need? Assuming linux has to be there but I have a linux box which I rarely log into using GUI (always use SSH). Is GUI a lot more helpful or VI editor is enough? (Please let me know if this part of the question should go to serverfault.com)
PS: Just to clarify, by systems programming I mean things like writing device drivers, System tools, write native applications which are not present on Linux platform but are on others, play with linux kernel etc.
If you are playing with the kernel, you must use C. There are several books, like Essential Linux Device Drivers, which give you the basics of structures, where to run your code, etc.
In general, many servers are written in C, and sometimes C++. Popular libraries include Glib, libevent, boost (for C++).
You can do everything from the command line in your editor of choice - there isn't a clear win here, pick what you like.
To really get into linux system programming, I say C and x86 assembly.
For applications, Linux supports a myriad of languages, python, C++, fortran, perl, etc, so pick which one you want to use.
Your question is pretty broad. "Native applications which are not present on Linux" covers things like office suites, which I don't consider system programming. I would focus on one thing (say device drivers) at a a time. There are a lot of existing questions about this, including Linux Programming Book, What IDE would be good for linux kernel driver development, Are there recommended tutorials for writing drivers for Gnu/Linux?, and Ubuntu Linux, what programming languages should I learn?.
To learn C89, I would definitely delve into The C Programming Language (2nd Edition).
Nano is my favourite editor by far. Vi is also nice. I haven't taken the time to learn it, but they both can aid in your programming experiences. Onces it comes down to the tricky errors in code, mount the SSH drive, and then open up the files remotely with you're favourite GUI program.
Most of the system programming is done in C as have already been mentioned here. Some of the good books you need to get around to understand the mindset, and righteous unix/Linux way of doing things would be "The Art of Unix programming" by Eric Raymond, and "Advanced Programming in the Unix environment" by Richard Stevens. there are some new books in the market such as Robert Love Book "Linux system programming" as well as 'the linux programming interface', they are up2date, however they do not discuss the original principles and thoughts like the ones i mentioned earlier.
精彩评论