Skip to content

Commit 9e41ae8

Browse files
author
Paul Cobbaut
committed
Merge pull request #43 from paulcobbaut/master
update
2 parents 793f803 + 68b3631 commit 9e41ae8

20 files changed

+425
-25
lines changed

books/minibook_boot_management/config

+1
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ BOOKTITLE="boot management"
1010
# define book as directories in certain order
1111
add_mod chapter bootloader
1212
add_mod chapter init
13+
add_mod chapter systemd

books/minibook_shell/config

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ BOOKTITLE="shell expansion"
99

1010
# define book as directories in certain order
1111

12-
#add_mod chapter shell_introduction
1312
add_mod chapter shell_arguments
1413
add_mod chapter shell_control_operators
1514
add_mod chapter shell_variables

images/systemd_diagram.png

64.4 KB
Loading

modules/intro_vi/030_vi_theory.xml

+7-2
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,9 @@
102102
</tgroup>
103103
</table>
104104
</section>
105-
<section><title>undo and repeat (u .)</title>
106-
<para>When in command mode, you can undo your mistakes with u. You can do your mistakes twice with . (in other words, the . will repeat your last command).</para>
105+
<section><title>undo, redo and repeat (u .)</title>
106+
<para>When in command mode, you can undo your mistakes with u. Use <command>ctrl-r</command> to redo the undo.</para>
107+
<para>You can do your mistakes twice with . (in other words, the . will repeat your last command).</para>
107108
<table frame='all'><title>undo and repeat</title>
108109
<?dbfo table-width="80%" ?>
109110
<tgroup cols='2' align='center' colsep='1' rowsep='1'>
@@ -120,6 +121,10 @@
120121
<entry>u</entry>
121122
<entry>undo the last action</entry>
122123
</row>
124+
<row>
125+
<entry>ctrl-r</entry>
126+
<entry>redo the last undo</entry>
127+
</row>
123128
<row>
124129
<entry>.</entry>
125130
<entry>repeat the last action</entry>

modules/ioredirection/050_ioredirection_solution.xml

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ set -C</screen>
66
<para>2. Verify that <command>noclobber</command> is active by repeating an <command>ls</command> on <command>/etc/</command> with redirected output to a file.</para>
77
<screen>ls /etc &#062; etc.txt
88
ls /etc &#062; etc.txt (should not work)</screen>
9-
<para>4. When listing all shell options, which character represents the <command>noclobber</command> option ?</para>
9+
<para>3. When listing all shell options, which character represents the <command>noclobber</command> option ?</para>
1010
<screen>echo $- (noclobber is visible as C)</screen>
11-
<para>5. Deactivate the <command>noclobber</command> option.</para>
11+
<para>4. Deactivate the <command>noclobber</command> option.</para>
1212
<screen>set +o noclobber</screen>
13-
<para>6. Make sure you have two shells open on the same computer. Create an empty <command>tailing.txt</command> file. Then type <command>tail -f tailing.txt</command>. Use the second shell to <command>append</command> a line of text to that file. Verify that the first shell displays this line.</para>
13+
<para>5. Make sure you have two shells open on the same computer. Create an empty <command>tailing.txt</command> file. Then type <command>tail -f tailing.txt</command>. Use the second shell to <command>append</command> a line of text to that file. Verify that the first shell displays this line.</para>
1414
<screen>paul@deb503:~$ &#062; tailing.txt
1515
paul@deb503:~$ tail -f tailing.txt
1616
hello
@@ -19,7 +19,7 @@ world
1919
in the other shell:
2020
paul@deb503:~$ echo hello >> tailing.txt
2121
paul@deb503:~$ echo world >> tailing.txt</screen>
22-
<para>7. Create a file that contains the names of five people. Use <command>cat</command> and output redirection to create the file and use a <command>here document</command> to end the input.</para>
22+
<para>6. Create a file that contains the names of five people. Use <command>cat</command> and output redirection to create the file and use a <command>here document</command> to end the input.</para>
2323
<screen>paul@deb503:~$ cat &#062; tennis.txt &#060;&#060; ace
2424
> Justine Henin
2525
> Venus Williams

modules/kernel/031_linux_kernel.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?hard-pagebreak?>
22
<section><title>about the Linux kernel</title>
33
<section><title>kernel versions</title>
4-
<para>In 1991 Linux Torvalds wrote (the first version of) the Linux kernel. He put it online, and other people started contributing code. Over 4000 individuals contributed source code to the latest kernel release (version 2.6.27 in November 2008).</para>
4+
<para>In 1991 Linus Torvalds wrote (the first version of) the Linux kernel. He put it online, and other people started contributing code. Over 4000 individuals contributed source code to the latest kernel release (version 2.6.27 in November 2008).</para>
55
<para>Major Linux kernel versions used to come in even and odd numbers. Versions <command>2.0</command>, <command>2.2</command>, <command>2.4</command> and <command>2.6</command> are considered stable kernel versions. Whereas <command>2.1</command>, <command>2.3</command> and <command>2.5</command> were unstable (read development) versions. Since the release of 2.6.0 in January 2004, all development has been done in the 2.6 tree. There is currently no v2.7.x and according to Linus the even/stable vs odd/development scheme is abandoned forever.</para>
66
</section>
77
<section><title>uname -r</title>

modules/logging/030_logging_theory.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ root@rhel65:/etc#</screen>
180180
</section>
181181
<?hard-pagebreak?>
182182
<section><title>logger</title>
183-
<para>The logger command can be used to generate syslog test messages. You can aslo use it in scripts. An example of testing syslogd with the <command>logger</command><indexterm><primary>logger(1)</primary></indexterm> tool.</para>
183+
<para>The logger command can be used to generate syslog test messages. You can also use it in scripts. An example of testing syslogd with the <command>logger</command><indexterm><primary>logger(1)</primary></indexterm> tool.</para>
184184
<screen>[root@rhel4a ~]# logger -p local4.debug "l4 debug"
185185
[root@rhel4a ~]# logger -p local4.crit "l4 crit"
186186
[root@rhel4a ~]# logger -p local4.emerg "l4 emerg"

modules/monitoring/030_monitoring_theory.xml

+23
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,29 @@ laika.local =&#062; ik-in-f83.google.com 0b 0b 39b
173173
<screen>[root@centos65 ~]# iptraf
174174
[root@centos65 ~]# iptraf -i eth0</screen>
175175
</section>
176+
<section><title>nload</title>
177+
<para><command>nload</command> displays current network traffic in the command line. Use the arrow keys to walk through devices.</para>
178+
<screen>Device wlan0 [192.168.1.35] (2/2):
179+
==============================================================================================
180+
Incoming:
181+
182+
183+
||
184+
.. ## || .. Curr: 13.20 kBit/s
185+
## ## ##.. ## Avg: 656.33 kBit/s
186+
##.. ##||#### ## Min: 0.00 Bit/s
187+
#### ########## ##.. Max: 4.44 MBit/s
188+
.#### ..########## ..#### Ttl: 895.44 MByte
189+
Outgoing:
190+
191+
192+
193+
Curr: 11.84 kBit/s
194+
Avg: 105.90 kBit/s
195+
Min: 0.00 Bit/s
196+
Max: 518.48 kBit/s
197+
.. ............ .. Ttl: 672.49 MByte</screen>
198+
</section>
176199
<?hard-pagebreak?>
177200
<section><title>nmon</title>
178201
<para>Another popular and all round tool is <command>nmon</command>.</para>
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
<para>The shell is also responsible for <command>file globbing</command><indexterm><primary>file globbing</primary></indexterm> (or dynamic filename generation). This chapter will explain <command>file globbing</command>.</para>
1+
<para>Typing <command>man 7 glob</command> (on Debian) will tell you that long ago there was a program called <command>/etc/glob</command> that would expand wildcard patterns.</para>
2+
<para>Today the shell is responsible for <command>file globbing</command><indexterm><primary>file globbing</primary></indexterm> (or dynamic filename generation). This chapter will explain <command>file globbing</command>.</para>

modules/storage_devices/030_diskdevices_theory.xml

+22-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<?hard-pagebreak?>
2020
<section><title>block device</title>
2121
<para>Random access hard disk devices have an abstraction layer called <command>block device</command><indexterm><primary>block device</primary></indexterm> to enable formatting in fixed-size (usually 512 bytes) blocks. Blocks can be accessed independent of access to other blocks.</para>
22-
<screen>[root@centos65 ~]# lsblk
22+
<screen>[root@centos65 ~]# <command>lsblk</command>
2323
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
2424
sda 8:0 0 40G 0 disk
2525
--sda1 8:1 0 500M 0 part /boot
@@ -35,9 +35,30 @@ brw-rw----. 1 root disk 8, 1 Apr 19 10:12 /dev/sda1
3535
brw-rw----. 1 root disk 8, 2 Apr 19 10:12 /dev/sda2
3636
brw-rw----. 1 root disk 8, 16 Apr 19 10:12 /dev/sdb
3737
brw-rw----. 1 root disk 8, 32 Apr 19 10:12 /dev/sdc</screen>
38+
<para>Virtual devices like <command>raid</command> or <command>lvm</command> are also listed as <command>block devices</command> as seen in this RHEL7 virtual machine.</para>
39+
<screen>[root@centos7 ~]# <command>lsblk</command>
40+
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
41+
sda 8:0 0 8G 0 disk
42+
├─sda1 8:1 0 400M 0 part
43+
│ └─md0 9:0 0 399.7M 0 raid1
44+
├─sda2 8:2 0 400M 0 part
45+
│ └─md0 9:0 0 399.7M 0 raid1
46+
└─sda3 8:3 0 400M 0 part
47+
sdb 8:16 0 8G 0 disk
48+
sdc 8:32 0 8G 0 disk
49+
sdd 8:48 0 2G 0 disk
50+
sde 8:64 0 2G 0 disk
51+
sdf 8:80 0 20.5G 0 disk
52+
├─sdf1 8:81 0 500M 0 part /boot
53+
└─sdf2 8:82 0 20G 0 part
54+
├─centos_centos7-swap 253:0 0 2G 0 lvm [SWAP]
55+
└─centos_centos7-root 253:1 0 18G 0 lvm /
56+
sr0 11:0 1 1024M 0 rom
57+
[root@centos7 ~]#</screen>
3858
<para>Note that a <command>character device</command><indexterm><primary>character device</primary></indexterm> is a constant stream of characters, being denoted by a c in <command>ls -l</command>. Note also that the <command>ISO 9660</command> standard for cdrom uses a <command>2048 byte</command> block size.</para>
3959
<para>Old hard disks (and floppy disks) use <command>cylinder-head-sector</command><indexterm><primary>CHS</primary></indexterm> addressing to access a sector on the disk. Most current disks use <command>LBA (Logical Block Addressing)</command><indexterm><primary>LBA</primary></indexterm>.</para>
4060
</section>
61+
<?hard-pagebreak?>
4162
<section><title>solid state drive</title>
4263
<para>A <command>solid state drive</command><indexterm><primary>solid state drive</primary></indexterm> or <command>ssd</command><indexterm><primary>ssd</primary></indexterm> is a block device without moving parts. It is comparable to <command>flash memory</command>. An <command>ssd</command> is more expensive than a hard disk, but it typically has a much faster access time.</para>
4364
<para>In this book we will use the following pictograms for <command>spindle disks</command> (in brown) and <command>solid state disks</command> (in blue).</para>

modules/storage_mounting/040_mounting_practice.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?hard-pagebreak?>
22
<section><title>practice: mounting file systems</title>
33
<para>1. Mount the small 200MB partition on /home/project22.</para>
4-
<para>2. Mount the big 400MB primary partition on /mnt, the copy some files to it (everything in /etc). Then umount, and mount the file system as read only on /srv/nfs/salesnumbers. Where are the files you copied ?</para>
4+
<para>2. Mount the big 400MB primary partition on /mnt, then copy some files to it (everything in /etc). Then umount, and mount the file system as read only on /srv/nfs/salesnumbers. Where are the files you copied ?</para>
55
<para>3. Verify your work with <command>fdisk</command>, <command>df</command> and <command>mount</command>. Also look in <command>/etc/mtab</command> and <command>/proc/mounts</command>.</para>
66
<para>4. Make both mounts permanent, test that it works.</para>
77
<para>5. What happens when you mount a file system on a directory that contains some files ?</para>

modules/storage_mounting/050_mounting_solution.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<para>1. Mount the small 200MB partition on /home/project22.</para>
44
<screen>mkdir /home/project22
55
mount /dev/sdc1 /home/project22</screen>
6-
<para>2. Mount the big 400MB primary partition on /mnt, the copy some files to it (everything in /etc). Then umount, and mount the file system as read only on /srv/nfs/salesnumbers. Where are the files you copied ?</para>
6+
<para>2. Mount the big 400MB primary partition on /mnt, then copy some files to it (everything in /etc). Then umount, and mount the file system as read only on /srv/nfs/salesnumbers. Where are the files you copied ?</para>
77
<screen>mount /dev/sdb1 /mnt
88
cp -r /etc /mnt
99
ls -l /mnt</screen>

modules/systemd/010_systemd_title.xml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<title>systemd</title>

modules/systemd/020_systemd_about.xml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<para>Many Unix and Linux distributions have been using <command>init</command> scripts to start daemons in the same way that <command>Unix System V</command><indexterm><primary>System V</primary></indexterm> did back in 1983.</para>
2+
<para>Starting 2015 this is considered legacy. Most Linux distributions, including Debian and Red Hat/CentOS, are in the process of migrating to <command>systemd</command>. They will however remain compatible with <command>init</command> because it will take many years before all applications are migrated.</para>
3+
<para>This chapter explains how to manage Linux with <command>systemd</command>.</para>

0 commit comments

Comments
 (0)