Linux Fun Paul Cobbaut Linux Fun Paul Cobbaut Lt-2.0
Total Page:16
File Type:pdf, Size:1020Kb
Linux Fun Paul Cobbaut Linux Fun Paul Cobbaut lt-2.0 Published Tue Sep 13 01:02:39 2011 Abstract This book is meant to be used in an instructor-led training. For self-study, the intent is to read this book next to a working Linux computer so you can immediately do every subject, practicing each command. This book is aimed at novice Linux system administrators (and might be interesting and useful for home users that want to know a bit more about their Linux system). However, this book is not meant as an introduction to Linux desktop applications like text editors, browsers, mail clients, multimedia or office applications. More information and free .pdf available at http://linux-training.be . Feel free to contact the authors: • Paul Cobbaut: [email protected], http://www.linkedin.com/in/cobbaut Contributors to the Linux Training project are: • Serge van Ginderachter: [email protected], build scripts; infrastructure setup; minor stuff • Hendrik De Vloed: [email protected], buildheader.pl script We'd also like to thank our reviewers: • Wouter Verhelst: [email protected], http://grep.be • Geert Goossens: [email protected], http://www.linkedin.com/in/geertgoossens • Elie De Brauwer: [email protected], http://www.de-brauwer.be • Christophe Vandeplas: [email protected], http://christophe.vandeplas.com • Bert Desmet: [email protected], http://bdesmet.be • Rich Yonts: [email protected], Copyright 2007-2011 Paul Cobbaut Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled 'GNU Free Documentation License'. Table of Contents I. introduction to Linux ........................................................................................ 1 1. Unix history ................................................................................................ 2 2. licensing ...................................................................................................... 6 3. distributions ................................................................................................. 9 4. online help ................................................................................................ 15 II. first steps on the command line .................................................................... 18 5. man pages ................................................................................................. 19 6. working with directories ........................................................................... 23 7. working with files ..................................................................................... 33 8. working with file contents ........................................................................ 42 9. the Linux file tree ..................................................................................... 49 III. shell expansion .............................................................................................. 69 10. commands and arguments ....................................................................... 70 11. control operators ..................................................................................... 80 12. variables .................................................................................................. 86 13. shell history ............................................................................................. 96 14. file globbing .......................................................................................... 102 IV. pipes and commands .................................................................................. 109 15. redirection and pipes ............................................................................. 110 16. filters ..................................................................................................... 118 17. basic unix tools ..................................................................................... 130 V. vi ..................................................................................................................... 139 18. Introduction to vi .................................................................................. 140 VI. scripting ....................................................................................................... 150 19. scripting introduction ............................................................................ 151 20. scripting loops ....................................................................................... 157 21. scripting parameters .............................................................................. 164 22. more scripting ....................................................................................... 171 VII. local user management ............................................................................. 178 23. users ...................................................................................................... 179 24. groups .................................................................................................... 200 VIII. file security ............................................................................................... 206 25. standard file permissions ...................................................................... 207 26. advanced file permissions ..................................................................... 217 27. access control lists ................................................................................ 223 28. file links ................................................................................................ 227 IX. process management ................................................................................... 234 29. introduction to processes ...................................................................... 235 30. process priorities ................................................................................... 247 31. background jobs .................................................................................... 254 X. disk management .......................................................................................... 260 32. disk devices ........................................................................................... 261 33. disk partitions ........................................................................................ 274 34. file systems ........................................................................................... 282 35. mounting ............................................................................................... 290 36. introduction to uuid's ............................................................................ 299 iii Linux Fun 37. introduction to raid ............................................................................... 304 38. logical volume management ................................................................. 312 XI. boot management ........................................................................................ 336 39. bootloader .............................................................................................. 337 40. init and runlevels .................................................................................. 349 XII. system management .................................................................................. 365 41. scheduling ............................................................................................. 366 42. logging .................................................................................................. 373 43. memory management ............................................................................ 384 44. package management ............................................................................ 391 XIII. network management .............................................................................. 407 45. general networking ................................................................................ 408 46. interface configuration .......................................................................... 417 47. network sniffing .................................................................................... 432 48. binding and bonding ............................................................................. 438 49. introduction to networking .................................................................... 447 XIV. kernel management ................................................................................. 462 50. the Linux kernel .................................................................................... 463 51. library management ............................................................................... 480 XV. backup management ................................................................................. 483 52. backup ................................................................................................... 484 XVI. samba ........................................................................................................ 493 53. samba .................................................................................................... 494 XVII. dns server ...............................................................................................