
- English
- ePUB (mobile friendly)
- Available on iOS & Android
Beginning Linux Programming
About this book
Beginning Linux Programming, Fourth Edition continues its unique approach to teaching UNIX programming in a simple and structured way on the Linux platform. Through the use of detailed and realistic examples, students learn by doing, and are able to move from being a Linux beginner to creating custom applications in Linux. The book introduces fundamental concepts beginning with the basics of writing Unix programs in C, and including material on basic system calls, file I/O, interprocess communication (for getting programs to work together), and shell programming. Parallel to this, the book introduces the toolkits and libraries for working with user interfaces, from simpler terminal mode applications to X and GTK+ for graphical user interfaces. Advanced topics are covered in detail such as processes, pipes, semaphores, socket programming, using MySQL, writing applications for the GNOME or the KDE desktop, writing device drivers, POSIX Threads, and kernel programming for the latest Linux Kernel.
Frequently asked questions
- Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
- Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app.
Information
- UNIX, Linux, and GNU
- Programs and programming languages for Linux
- How to locate development resources
- Static and shared libraries
- The UNIX philosophy
- Simplicity: Many of the most useful UNIX utilities are very simple and, as a result, small and easy to understand. KISS, âKeep It Small and Simple,â is a good technique to learn. Larger, more complex systems are guaranteed to contain larger, more complex bugs, and debugging is a chore that weâd all like to avoid!
- Focus: Itâs often better to make a program perform one task well than to throw in every feature along with the kitchen sink. A program with âfeature bloatâ can be difficult to use and difficult to maintain. Programs with a single purpose are easier to improve as better algorithms or interfaces are developed. In UNIX, small utilities are often combined to perform more demanding tasks when the need arises, rather than trying to anticipate a userâs needs in one large program.
- Reusable Components: Make the core of your application available as a library. Well-documented libraries with simple but flexible programming interfaces can help others to develop variations or apply the techniques to new application areas. Examples include the dbm database library, which is a suite of reusable functions rather than a single database management program.
- Filters: Many UNIX applications can be used as filters. That is, they transform their input and produce output. As youâll see, UNIX provides facilities that allow quite complex applications to be developed from other UNIX programs by combining them in novel ways. Of course, this kind of reuse is enabled by the development methods that weâve previously mentioned.
- Open File Formats: The more successful and popular UNIX programs use configuration files and data files that are plain ASCII text or XML. If either of these is an option for your program development, itâs a good choice. It enables users to use standard tools to change and search for configuration items and to develop new tools for performing new functions on the data files. A good example of this is the ctags source code cross-reference system, which records symbol location information as regular expressions suitable for use by searching programs.
- Flexibility: You canât anticipate exactly how ingeniously users will use your program. Try to be as flexible as possible in your programming. Try to avoid arbitrary limits on field sizes or number of records. If you can, write the program so that itâs network-aware and able to run across a network as well as on a local machine. Never assume that you know everything that the user might want to do.
Table of contents
- Cover
- Title Page
- Copyright
- About the Authors
- Credits
- Acknowledgments
- Foreword
- Introduction
- Chapter 1: Getting Started
- Chapter 2: Shell Programming
- Chapter 3: Working with Files
- Chapter 4: The Linux Environment
- Chapter 5: Terminals
- Chapter 6: Managing Text-Based Screens with curses
- Chapter 7: Data Management
- Chapter 8: MySQL
- Chapter 9: Development Tools
- Chapter 10: Debugging
- Chapter 11: Processes and Signals
- Chapter 12: POSIX Threads
- Chapter 13: Inter-Process Communication: Pipes
- Chapter 14: Semaphores, Shared Memory, and Message Queues
- Chapter 15: Sockets
- Chapter 16: Programming GNOME Using GTK+
- Chapter 17: Programming KDE Using Qt
- Chapter 18: Standards for Linux
- Index
- Advertisement
- Wiley End User License Agreement