HAPPY BOOKSGIVING
Use code BOOKSGIVING during checkout to save 40%-55% on books and eBooks. Shop now.
Register your product to gain access to bonus material or receive a coupon.
This eBook includes the following formats, accessible from your Account page after purchase:
EPUB The open industry format known for its reflowable content and usability on supported mobile devices.
PDF The popular standard, used most often with the free Acrobat® Reader® software.
This eBook requires no passwords or activation to read. We customize your eBook by discreetly watermarking it with your name, making it uniquely yours.
This eBook includes the following formats, accessible from your Account page after purchase:
EPUB The open industry format known for its reflowable content and usability on supported mobile devices.
PDF The popular standard, used most often with the free Acrobat® Reader® software.
This eBook requires no passwords or activation to read. We customize your eBook by discreetly watermarking it with your name, making it uniquely yours.
Developers are increasingly being asked to create software for Linux platforms. Many developers are accustomed to creating software for Microsoft or other platforms, but don't have experience with Linux environments or tools. While several books cover Linux software development, Linux for Developers is specifically designed to help these developers move to Linux.
Leading IT trainer/author William (Bo) Rothwell first provides a clear and up-to-date introduction to the complex world of open source software, including its licensing arrangements and their associated tradeoffs. Next, Rothwell introduces essential skills for both Linux command line and GUI environments, emphasizing tools that developers need to create code in Linux, including text editors.
Building on this knowledge, he introduces the primary languages used by Linux developers, from scripting tools such as Bash, Python and Perl to traditional full-fledged programming languages such as Java, C++, and C. Finally, Rothwell presents a full section on the powerful Git version control system, teaching skills that developers can use both in Linux and in many other environments.
This guide's modular coverage enables you to quickly access the information you need to meet current challenges. Appendices present one-page cheatsheets for each language, and for the Linux commands developers need most often.
Preface xii
PART I: OPEN SOURCE SOFTWARE 1
Chapter 1 Introduction to Open Source Software 3
Defining Source Code 3
Closed Source 4
Open Source 5
“Free” Software 5
Choosing Open Source Licensing 7
Options 8
Key Terms 8
Examples 8
Useful Links 9
Summary 10
PART II: LINUX ESSENTIALS 11
Chapter 2 Introduction to Linux 13
Accessing a Linux System 13
Choosing the Right Distribution 14
Logging In 15
Using the GUI 18
Basic Command-Line Execution 21
Command-Line Structure 22
Getting Help 22
Summary 28
Chapter 3 The Filesystem 29
Understanding the Filesystem 29
Learning the Most Used Directories 30
Naming Considerations 30
Navigating the Filesystem 31
Managing the Filesystem 33
Managing Directories 36
Managing Files 37
Summary 45
Chapter 4 Essential Commands 47
Command-Line Tools 47
Viewing Files 48
Finding Files 52
Comparing Files 54
Shell Features 55
Permissions 57
Developer Tools 59
File Compression Commands 59
The grep Command 62
Summary 66
Chapter 5 Text Editors 67
The vi Editor 67
Why Learn vi? 68
What Is vim? 68
Essential vi Commands 69
Additional Editors 79
Emacs 79
gedit and kwrite 81
nano and joe 81
lime and bluefish 82
Summary 82
Chapter 6 System Administration 83
Essential Tasks 83
Gaining Access to the Root Account 84
Displaying Disk Usage 86
Managing Software 88
Listing and Finding Software 89
Installing Software 90
User Accounts 91
Adding User Accounts 91
Modifying User Accounts 92
Deleting User Accounts 93
Understanding Groups 93
Managing Groups 93
Summary 94
PART III: LINUX PROGRAMMING LANGUAGES 95
Chapter 7 Overview of Linux Programming Languages 97
Scripting Languages 97
BASH Shell Scripting 98
Perl Scripting 99
Python Scripting 100
Additional Scripting Languages 101
Compiled Languages 107
C Programming Basics 107
C++ Programming Basics 108
Java Programming Basics 108
IDEs 108
Summary 109
Chapter 8 BASH Shell Scripting 111
Basics of BASH Scripting 111
Conditional Expressions 113
Integer Comparisons 115
File Test Comparisons 115
Flow Control Statements 115
The while loop 116
The for Loop 116
The case Statement 117
User Interaction 117
Additional Information 118
Summary 118
Chapter 9 Perl Scripting 119
Basics of Perl Scripting 119
Executing Perl Code 120
Additional Perl Documentation 121
Variables and Values 122
Flow Control 124
Conditions 126
Additional Features 128
Summary 130
Chapter 10 Python Scripting 131
Basics of Python Scripting 131
Executing Python Code 132
Additional Documentation 133
Variables and Values 133
Flow Control 136
Conditions 137
Additional Features 137
Summary 138
Chapter 11 C, C++, and Java 139
Understanding System Libraries 139
Managing Shared Library Files 140
Viewing Shared Library Files 142
Building Packages 142
Building RPM Packages 142
Building Debian Packages 145
Exploring Java Installation and Basics 145
Summary 146
PART IV: USING GIT 147
Chapter 12 Git Essentials 149
Version Control Concepts 149
The First Generation 149
The Second Generation 149
The Third Generation 151
Installing Git 154
Git Concepts and Features 155
Git Stages 155
Choosing Your Git Repository Host 156
Configuring Git 157
Summary 160
Chapter 13 Manage Files with Git 161
Basic Configuration 161
git status 162
Handling a Multiple Location Situation 165
Telling Git to Ignore a File 166
Removing Files 168
Handling Branches 169
Pushing Branches 171
Summary 171
Chapter 14 Manage Differences in Files 173
Executing Diffs 173
Dealing with White Space 175
Comparing Branches 176
Merging Files 178
Summary 182
Chapter 15 Advanced Git Features 183
Managing Repositories 183
Getting Content from the Remote Server 184
Connecting via SSH 186
Patching 187
Summary 188
Index 189
We've made every effort to ensure the accuracy of this book and its companion content. Any errors that have been confirmed since this book was published can be downloaded below.