Linux学习指南——我的Linux书架

工作几年来,一直从事Linux内核驱动方面的开发。从接触Linux到现在,读过不少Linux方面的书籍,现把认为很不错的一部分列出来和大家分享一下。

入门类

一直认为,在一个系统上学习开发之前,首先需要熟悉这个系统的使用。鉴于天朝的国情,绝大部分人第一个接触的操作系统就是Windows,因此对于这绝大部分人来说,如果要学习Linux开发,学会使用这个系统都是必不可少的一个环节。
现在的Linux初学者是幸福的,随着Linux桌面环境越来越易用,入门一个新的系统是非常容易的事情。虽然命令行对于提高工作效率更加有效,但我们完全可以把熟悉命令的过程放到日常使用中进行。无论学习什么知识,在实践中学习都是高效而且有趣的。在这个阶段,我们也未必一定需要书籍。现在很多Linux发行版的Wiki写得都非常详细,在使用某一种发行版时找到相应的Wiki阅读查询就可以了。而且,桌面环境变化太快,关于桌面的介绍类书籍几乎都没有必要看,这类书籍大多刚一出版就过时了。
那入门类书籍里哪些比较有价值呢?我比较推荐涉及的技术相对比较稳定的书。比如,Linux基本的体系结构和命令一般都是经久不变的,甚至从上古时期的Unix开始就没太多变化,这类书籍讲解的知识也是以后大幅提高我们的生产力的基础。比如《 鸟哥的Linux私房菜》,比如《 Unix Power Tools》(中译名是“UNIX超级工具”),或者是为Linux+认证考试准备的《 Linux+ Study Guide》。当然,这一类书籍其实都不必精读,快速浏览之后作为工具书备查就可以了。

编程类

类Unix系统的编程书籍里,最经典的莫过于简称为APUE的《 Advanced Programming in the UNIX Environment》(中译名是“Unix环境高级编程”),这本书被广大Unix程序员(包括Linux)捧为“圣经”。借用葛大爷的广告词:“这就像进馆子一样,一条街上,哪家人多我进哪家”。APUE对类Unix系统的编程接口讲解的非常全面详细,对于这本书,我们不仅要精读,还应该放在案头常备。
但是,APUE对于Linux编程初学者似乎稍深了一点,而且很多细节在Linux中并不会用到。讲述Linux编程的书籍里,《 Advanced Linux Programming》应该更加适合初学者。不要被书名中的“Advanced”吓到,书里的内容还是很容易理解的。看完这本书再看APUE应该效果会更好。
如果要开发GUI程序,上面两本书就无能为力了。在Linux世界里,最常用的GUI Toolkit是GTK+和QT。
GTK+的书籍并不多,在线文档只适合查阅,并不是一个完整的学习体系。《 Foundations of GTK+ Development》是其中很不错的一本书,喜欢GTK+的开发者可以拿来作为入门书籍。
相对来说,QT的书籍就很丰富了,这和QT具有良好的跨平台能力有很大关系,QT的书籍并不只是写给Linux程序员看的,在Windows和MAC OSX下同样可以使用QT开发程序。比较值得一看的QT类书籍有《 C++ GUI Programming with QT4》、《 Foundations of QT Development》、《 The Art of Building QT Applications》,这三本都比较适合QT初学者阅读。另外,《 Advanced Qt Programming》会介绍到QT一些比较高级的用法,适合有一定QT基础的读者阅读。

内核类

对于Linux内核或者设备驱动的开发者,最全面最直接的学习资料一定是Linux内核代码及其文档。Linux内核的发布周期很短,相关书籍的出版完全跟不上脚步。但随着内核代码的日益庞大,学习曲线越来越陡峭,入门者又非常需要书籍来作为指导,这确实是非常矛盾的事情。所幸,很多Linux内核技术作家也是很勤奋的,经常会更新自己的作品。就像Robert Love,以2.6内核为蓝本的《 Linux Kernel Development》已经更新到第三版了。LKD是非常适合内核初学者阅读的一本好书,对它的评价可以引用陈莉君老师的译者序:
相对于 Daniel P. Bovet 和 Marco Cesati 的内核巨著《 Understand the Linux Kernel 》,它少了五分细节,相对于实践经典《 Linux Device Drivers 》,它多了五分说理。可以说,本书填补了 Linux 内核理论和实践之间的鸿沟,“一桥飞架南北,天堑变通途”。
谢谢陈老师,她的译者序帮我引出了另外要谈到的两本经典书籍,对,就是《 Understanding the Linux Kernel》和《 Linux Device Drivers》。对于这两本书,如果要挑它们的缺点,我只能说,内容有点老,很多知识点都需要更新了,除此之外,我要说的是,是它们把我带上了内核驱动开发这条路上来,当然,还有LKD。
最近,我又发现一本分析Linux内核的优秀书籍,就是《 Professional Linux Kernel Architecture》。这本书我目前正在读,写得非常好,而且因为此书相对较新(只是相对,2.6.24内核在现在看来也很老了),没有看过ULK的同学可以直接看这本书。

工具类

工欲善其事,必先利其器。进行Linux开发,相关工具还是需要熟练使用的。比如,GNU Tool Chain、自动构建工具、编辑器、版本控制工具等等。
这里有一本包罗万象的书,叫做《 Handbook of Open Source Tools》,书中介绍了各种各样的开源工具,可称之为开源技术的总决式。这本书试图面面俱到,因此并不深入,粗读即可。
GNU Tool Chain参考Redhat的《 The GNUPro Toolkit》已经足够了,如果单独把makefile拎出来,还可以参考《 Managing Projects with GNU Make》。
自动构建工具可以参考《 Autotools》。如果您准备使用cmake,推荐cjacker的《 Cmake实践》。《 Mastering CMake》据说是cmake的权威书籍,但一直无缘得见啊。
说到编辑器,在Linux里最著名的莫过于Vim和Emacs,关于这两者的背景,可以去看看《 为何Emacs和Vim被称为两大神器》。我几乎没用过Emacs,曾经在当当做活动时花9块钱买了一本《 学习GNU Emacs》,有这本书作为Emacs的入门我想应该够了。Vim是我经常使用的编辑器之一(另一个是Kate,最初喜欢上Kate的原因之一就是它提供了Vim编辑模式),相关的书籍有两本值得一读:《 A Byte of Vim》和《 Hacking Vim 7.2》,但是对于初学者,首先跟着Vim自带的vimtutor练习效果会更好。
Linux下的版本控制工具很多,有传统的Subversion,也有现在非常流行分布式工具如Git等。Subversion可以参考这本《 Version Control with Subversion》,Git可以参考《 Version Control with Git》或者《 Git Internals》或者《 Pro Git》。

其它

除了以上几个类别,还有一些书籍值得推介。
比如《 The Art of Unix Programming》,主要介绍了Unix系统领域中的设计开发哲学、思想文化体系以及社群文化等,覆盖面非常广。书中的一些内容和《 Revolution OS》有相似之处,大家可以自己印证一下。对于这本书,我们也完全可以把它当做小说或者历史书来看,可以躺在床上看,也可以瘫在沙发上看,或者像 怪怪那样坐在马桶上看,总之,不必一定要端坐在书桌前。
Computer Systems: A Programmer's Perspective》很多人都推荐过,这是一本非常经典的计算机体系方面的教材。CSAPP的内容基础全面,讲解简明扼要,易于理解,仔细读完之后对理清计算机体系结构甚至是Linux内核都非常有帮助的。虽然中文名被译为《深入理解计算机系统》(这个译名很不贴切),但相比之下,为什么会让人感觉国内的同类教材更加“深奥”呢?也许,这就是作者功力的差距吧。

注:这里列出的书大多都可以在library.nu上下载到,注册登录之后会有搜索框,用书名搜索即可。

本文转自:http://www.cnblogs.com/wwang/archive/2011/01/27/1944406.html


  • 0
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
xv Contents Graphical Debugging Tools 299 DDD 299 Eclipse 302 Kernel Debugging 305 Don’t Panic! 306 Making Sense of an oops 307 Using UML for Debugging 309 An Anecdotal Word 312 A Note about In-Kernel Debuggers 313 Summary 313 Chapter 11: The GNOME Developer Platform 315 GNOME Libraries 316 Glib 316 GObject 316 Cairo 316 GDK 317 Pango 317 GTK+ 317 libglade 318 GConf 318 GStreamer 318 Building a Music Player 319 Requirements 319 Getting Started: The Main Window 319 Building the GUI 321 Summary 340 Chapter 12: The FreeDesktop Project 341 D-BUS: The Desktop Bus 341 What Is D-Bus? 342 Under D-Hood of D-Bus 342 D-Bus Methods 346 Hardware Abstraction Layer 350 Making Hardware Just Work 350 Hal Device Objects 353 The Network Manager 358 Other Freedesktop Projects 360 Summary 360 02_776130 ftoc.qxp 2/2/07 10:13 PM Page xv xvi Contents Chapter 13: Graphics and Audio 361 Linux and Graphics 361 X Windows 362 Open Graphics Library 364 OpenGL Utilities Toolkit 365 Simple Directmedia Layer 365 Writing OpenGL Applications 365 Downloading and Installing 366 Programming Environment 367 Using the GLUT Library 368 Writing SDL Applications 382 Downloading and Installing 382 Programming Environment 383 Using the SDL Library 383 Summary 394 Chapter 14: LAMP 395 What Is LAMP? 395 Apache 396 MySQL 396 PHP 397 The Rebel Platform 397 Evaluating the LAMP Platform 397 Apache 399 Virtual Hosting 400 Installation and Configuration of PHP 5 401 Apache Basic Authentication 402 Apache and SSL 402 Integrating SSL with HTTP Authentication 403 MySQL 404 Installing MySQL 404 Configuring and Starting the Database 404 Changing the Default Password 405 The MySQL Client Interface 405 Relational Databases 405 SQL 406 The Relational Model 409 PHP 411 The PHP Language 411 Error Handling 420 Error-Handling Exceptions 421 02_776130 ftoc.qxp 2/2/07 10:13 PM Page xvi xvii Contents Optimization Techniques 422 Installing Additional PHP Software 427 Logging 427 Parameter Handling 428 Session Handling 429 Unit Testing 430 Databases and PHP 432 PHP Frameworks 432 The DVD Library 433 Version 1: The Developer’s Nightmare 433 Version 2: Basic Application with DB-Specific Data Layer 434 Version 3: Rewriting the Data Layer,Adding Logging and Exceptions 437 Version 4: Applying a Templating Framework 441 Summary 442 Index 443 GNU 47 Acknowledgments ix Introduction xix Chapter 1: Working with Linux 1 A Brief History of Linux 2 The GNU Project 2 The Linux Kernel 3 Linux Distributions 4 Free Software vs. Open Source 4 Beginning Development 5 Choosing a Linux Distribution 6 Installing a Linux Distribution 8 Linux Community 15 Linux User Groups 15 Mailing lists 16 IRC 16 Private Communities 16 Key Differences 16 Linux Is Modular 17 Linux Is Portable 17 Linux Is Generic 17 Summary 18 Chapter 2: Toolchains 19 The Linux Development Process 19 Working with Sources 20 Configuring to the Local Environment 21 Building the Sources 22 Components of the GNU Toolchain 23 The GNU Compiler Collection 23 The GNU binutils 34 GNU Make 39 The GNU Debugger 40 02_776130 ftoc.qxp 2/2/07 10:13 PM Page xi xii Contents The Linux Kernel and the GNU Toolchain 44 Inline Assembly 44 Attribute Tags 45 Custom Linker Scripts 45 Cross-Compilation 46 Building the GNU Toolchain 47 Summary 48 Chapter 3: Portability 49 The Need for Portability 50 The Portability of Linux 51 Layers of Abstraction 51 Linux Distributions 52 Building Packages 57 Portable Source Code 70 Internationalization 81 Hardware Portability 88 64-Bit Cleanliness 89 Endian Neutrality 89 Summary 92 Chapter 4: Software Configuration Management 93 The Need for SCM 94 Centralized vs. Decentralized Development 95 Centralized Tools 95 The Concurrent Version System 96 Subversion 104 Decentralized tools 108 Bazaar-NG 109 Linux kernel SCM (git) 112 Integrated SCM Tools 115 Eclipse 115 Summary 117 Chapter 5: Network Programming 119 Linux Socket Programming 119 Sockets 120 Network Addresses 122 Using Connection-Oriented Sockets 123 Using Connectionless Sockets 130 02_776130 ftoc.qxp 2/2/07 10:13 PM Page xii xiii Contents Moving Data 133 Datagrams vs. Streams 133 Marking Message Boundaries 137 Using Network Programming Libraries 140 The libCurl Library 140 Using the libCurl Library 141 Summary 147 Chapter 6: Databases 149 Persistent Data Storage 149 Using a Standard File 150 Using a Database 150 The Berkeley DB Package 152 Downloading and Installing 153 Building Programs 154 Basic Data Handling 154 The PostgreSQL Database Server 165 Downloading and Installing 165 Building Programs 167 Creating an Application Database 167 Connecting to the Server 169 Executing SQL Commands 173 Using Parameters 181 Summary 184 Chapter 7: Kernel Development 185 Starting Out 185 Kernel Concepts 199 A Word of Warning 200 The Task Abstraction 200 Virtual Memory 205 Don’t Panic! 208 Kernel Hacking 208 Loadable Modules 209 Kernel Development Process 211 Git: the “Stupid Content Tracker” 212 The Linux Kernel Mailing List 213 The “mm” Development Tree 215 The Stable Kernel Team 215 LWN: Linux Weekly News 216 Summary 216 02_776130 ftoc.qxp 2/2/07 10:13 PM Page xiii xiv Contents Chapter 8: Kernel Interfaces 217 What Is an Interface? 217 Undefined Interfaces 218 External Kernel Interfaces 219 System Calls 219 The Device File Abstraction 224 Kernel Events 238 Ignoring Kernel Protections 239 Internal Kernel Interfaces 243 The Kernel API 243 The kernel ABI 244 Summary 245 Chapter 9: Linux Kernel Modules 247 How Modules Work 247 Extending the Kernel Namespace 250 No Guaranteed Module Compatibility 251 Finding Good Documentation 251 Linux Kernel Man Pages 251 Writing Linux Kernel Modules 252 Before You Begin 253 Essential Module Requirements 253 Logging 256 Exported Symbols 257 Allocating Memory 259 Locking considerations 267 Deferring work 275 Further Reading 283 Distributing Linux Kernel Modules 284 Going Upstream 284 Shipping Sources 284 Shipping Prebuilt Modules 284 Summary 285 Chapter 10: Debugging 287 Debugging Overview 287 A Word about Memory Management 288 Essential Debugging Tools 289 The GNU Debugger 289 Valgrind 298 02_776130 ftoc.qxp 2/2/07 10:13 PM Page xiv

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值