Answer the question
In order to leave comments, you need to log in
What are the differences between programming under UNIX and Linux?
Greetings.
Tell me, is it true that I will read a book on system programming in UNIX and then be able to program in Linux without changes?
If not, what is the difference?
And are these differences great?
Thank you for your time.
Answer the question
In order to leave comments, you need to log in
You can.
Differences between UNIX and Linux (in English)
Linux is a Unix clone written from scratch by Linus Torvalds with assistance from a loosely-knit team of hackers across the Net. It aims towards POSIX compliance.
System programming? Yes, you will acquire basic knowledge, in fact, study the POSIX api, which for the most part is completely identical for all Unixes. You will be able to write utilities and daemons, communicate via sockets, pipes, messages and shared memory, synchronize via mutexes and semaphores. It will definitely come in handy, as you will know what kind of neon they have inside. Moreover, these examples will most likely work in Linux as well. For example, the winsock library completely repeats posix, and if you use only posix calls from it, then your program will work under both Windows and any posix-compatible system.
However, in each system there are still a dozen, if not a hundred, of their own mechanisms for any occasion. Here they will have to be dealt with separately for each system, but this is already a specialization.
Is it worth studying? It is definitely worth it, and this knowledge will not be wasted. All Unixes are quite similar, study!
I will add that the kernels and internal mechanisms of different Unixes can differ, and radically, especially with regard to drivers, extensions of the kernel itself and its environment.
Well, the statement itself is a little crafty, and yes and no. The devil is in the details, alas.
Tell me, is it true that I will read a book on system programming in UNIX and after that I will be able to program in Linux without changes?
that I will read a book on UNIX systems programming and then be able to program on Linux without modification?
First you need to decide what "system programming" is for you.
Writing your own daemons, using queues, threads, shared memory, sockets, pipes? You can, although it's not a fact that the examples given in the book will work in a particular version of Linux - you still have to read the mana, they will obviously be newer than the book.
Writing drivers, system calls, kernel modules? No, you will need to read the mana specifically for kernel-hacking
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question