Linux-Fundamentals.pdf
(
2849 KB
)
Pobierz
Linux Fundamentals
Paul Cobbaut
Linux Fundamentals
Paul Cobbaut
lt-2.0
Publication date Mon 26 May 2014 01:00:19 AM CEST
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 author:
• Paul Cobbaut: paul.cobbaut@gmail.com, http://www.linkedin.com/in/cobbaut
Contributors to the Linux Training project are:
• Serge van Ginderachter: serge@ginsys.eu, build scripts and infrastructure setup
• Ywein Van den Brande: ywein@crealaw.eu, license and legal sections
• Hendrik De Vloed: hendrik.devloed@ugent.be, buildheader.pl script
We'd also like to thank our reviewers:
• Wouter Verhelst: wo@uter.be, http://grep.be
• Geert
Goossens:
geertgoossens
mail.goossens.geert@gmail.com,
http://www.linkedin.com/in/
• Elie De Brauwer: elie@de-brauwer.be, http://www.de-brauwer.be
• Christophe Vandeplas: christophe@vandeplas.com, http://christophe.vandeplas.com
• Bert Desmet: bert@devnox.be, http://blog.bdesmet.be
• Rich Yonts: richyonts@gmail.com,
Copyright 2007-2014 Netsec BVBA, 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. Linux history ............................................................................................................. 3
1.1. Linux history .................................................................................................... 4
2. distributions ............................................................................................................... 5
2.1. Red Hat ........................................................................................................... 6
2.2. Ubuntu ............................................................................................................. 6
2.3. Debian ............................................................................................................. 6
2.4. Other ............................................................................................................... 6
2.5. Which to choose ? ............................................................................................. 6
3. licensing ..................................................................................................................... 7
3.1. about software licenses ....................................................................................... 8
3.2. public domain software and freeware ..................................................................... 8
3.3. Free Software or Open Source Software ................................................................. 8
3.4. GNU General Public License ............................................................................... 9
3.5. using GPLv3 software ........................................................................................ 9
3.6. BSD license .................................................................................................... 10
3.7. other licenses ................................................................................................... 10
3.8. combination of software licenses ......................................................................... 10
4. getting Linux at home ............................................................................................... 11
4.1. download a Linux CD image .............................................................................. 12
4.2. download Virtualbox ........................................................................................ 12
4.3. create a virtual machine .................................................................................... 13
4.4. attach the CD image ......................................................................................... 18
4.5. install Linux .................................................................................................... 21
II. first steps on the command line ............................................................................................ 22
5. man pages ................................................................................................................ 24
5.1. man $command ............................................................................................... 25
5.2. man $configfile ................................................................................................ 25
5.3. man $daemon .................................................................................................. 25
5.4. man -k (apropos) .............................................................................................. 25
5.5. whatis ............................................................................................................ 25
5.6. whereis ........................................................................................................... 25
5.7. man sections ................................................................................................... 26
5.8. man $section $file ............................................................................................ 26
5.9. man man ........................................................................................................ 26
5.10. mandb .......................................................................................................... 26
6. working with directories ............................................................................................ 28
6.1. pwd ............................................................................................................... 29
6.2. cd .................................................................................................................. 29
6.3. absolute and relative paths ................................................................................. 30
6.4. path completion ............................................................................................... 30
6.5. ls ................................................................................................................... 31
6.6. mkdir ............................................................................................................. 33
6.7. rmdir .............................................................................................................. 33
6.8. practice: working with directories ........................................................................ 34
6.9. solution: working with directories ....................................................................... 35
7. working with files ..................................................................................................... 37
7.1. all files are case sensitive .................................................................................. 38
7.2. everything is a file ........................................................................................... 38
7.3. file ................................................................................................................ 38
7.4. touch .............................................................................................................. 38
7.5. rm ................................................................................................................. 39
7.6. cp .................................................................................................................. 40
7.7. mv ................................................................................................................. 41
7.8. rename ........................................................................................................... 41
iv
Linux Fundamentals
7.9. practice: working with files ................................................................................
7.10. solution: working with files ..............................................................................
8. working with file contents ..........................................................................................
8.1. head ...............................................................................................................
8.2. tail .................................................................................................................
8.3. cat .................................................................................................................
8.4. tac .................................................................................................................
8.5. more and less ..................................................................................................
8.6. strings ............................................................................................................
8.7. practice: file contents ........................................................................................
8.8. solution: file contents ........................................................................................
9. the Linux file tree .....................................................................................................
9.1. filesystem hierarchy standard ..............................................................................
9.2. man hier .........................................................................................................
9.3. the root directory / ............................................................................................
9.4. binary directories .............................................................................................
9.5. configuration directories ....................................................................................
9.6. data directories ................................................................................................
9.7. in memory directories .......................................................................................
9.8. /usr Unix System Resources ...............................................................................
9.9. /var variable data ..............................................................................................
9.10. practice: file system tree ..................................................................................
9.11. solution: file system tree ..................................................................................
III. shell expansion .................................................................................................................
10. commands and arguments ........................................................................................
10.1. arguments .....................................................................................................
10.2. white space removal ........................................................................................
10.3. single quotes ..................................................................................................
10.4. double quotes ................................................................................................
10.5. echo and quotes .............................................................................................
10.6. commands .....................................................................................................
10.7. aliases ..........................................................................................................
10.8. displaying shell expansion ................................................................................
10.9. practice: commands and arguments ....................................................................
10.10. solution: commands and arguments ..................................................................
11. control operators .....................................................................................................
11.1. ; semicolon ....................................................................................................
11.2. & ampersand .................................................................................................
11.3. $? dollar question mark ...................................................................................
11.4. && double ampersand .....................................................................................
11.5. || double vertical bar .......................................................................................
11.6. combining && and || .......................................................................................
11.7. # pound sign ..................................................................................................
11.8. \ escaping special characters .............................................................................
11.9. practice: control operators ................................................................................
11.10. solution: control operators ..............................................................................
12. shell variables .........................................................................................................
12.1. $ dollar sign ..................................................................................................
12.2. case sensitive .................................................................................................
12.3. creating variables ............................................................................................
12.4. quotes ...........................................................................................................
12.5. set ................................................................................................................
12.6. unset ............................................................................................................
12.7. $PS1 ............................................................................................................
12.8. $PATH .........................................................................................................
12.9. env ..............................................................................................................
12.10. export .........................................................................................................
12.11. delineate variables .........................................................................................
43
44
46
47
47
47
49
50
50
51
52
53
54
54
54
55
57
59
61
66
68
70
72
74
77
78
78
79
79
79
80
81
82
83
85
87
88
88
88
89
89
89
90
90
91
92
93
94
94
94
95
95
95
96
97
98
98
99
v
Plik z chomika:
musli_com
Inne pliki z tego folderu:
2004_filesystem_hierarchy_standard(1).pdf
(498 KB)
Administration-Reseau-Linux(1).pdf
(390 KB)
Administration-systeme-Linux(2).pdf
(1261 KB)
Advanced Bash Scripting - Mendel Cooper(2).pdf
(2657 KB)
Advanced Linux Programming(2).pdf
(3775 KB)
Inne foldery tego chomika:
Aix
android
bsd
OSX
rhel
Zgłoś jeśli
naruszono regulamin