Y
Y
Yuri2017-11-08 20:49:38
linux
Yuri, 2017-11-08 20:49:38

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

5 answer(s)
S
Sergey Sokolov, 2017-11-08
@sergiks

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.

A
Alexey Cheremisin, 2017-11-08
@leahch

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.

M
Mikhail Grigoriev, 2017-11-08
@Sleuthhound

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?

I recently read a book on how to play the synthesizer and even bought a synthesizer, but my hands are not sharpened for that, so after N months of torment I gave up this disastrous business.
So no, it's not a true statement. Reading a book does not mean mastering it, let alone gaining skills.
You can program, the only question is what exactly, Hello world yes, but further and deeper than this - it all depends on perseverance and work. And of course, in order to master system programming, you need to do this regularly and constantly, and not forays for 2 hours a week. You need to work on real projects, solve real problems. This is the only way you will gain experience.

S
Saboteur, 2017-11-08
@saboteur_kiev

that I will read a book on UNIX systems programming and then be able to program on Linux without modification?

Of course not. to program in Linux you need not just read a book on system programming, but learn how to program. On practice.
And then it will not matter on what you will program.

C
CityCat4, 2017-11-09
@CityCat4

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 question

Ask a Question

731 491 924 answers to any question