INDEX

Numbers and Symbols ARP (Address Resolution Protocol), ., 17. See also directory, current 264–265 /. See directory, root at, 187–188 .., 17. See also directory, parent ATA, 64–66 #, 13 autoconf, 388–393 #!. See shebang Autotools. See GNU Autotools $, 12–13. See also shell, prompt Avahi, 281 $#, 297 awk, 309 $$, 33, 298 $0, 297 B $1, 296 basename, 308–309 $?, 298. See also exit code bash, 12. See also Bourne Shell $@, 297 startup file see( startup file, bash) &&, 300–301 .bash_profile, 340–342 *, 18–19. See also glob .bashrc, 340–342 |, 28–29. See also pipe bg, 34 ||, 300–301 /bin, 42 <. See file, redirect command input /bin/bash. See bash from /bin/sh. See Bourne Shell <<. See here document BIOS, 121–122 >. See file, redirect command output to boot partition, 133 >>. See file, redirect command output to bison, 379 ?, 18–19. See also glob blkid, 85 [, 299. See also test block bitmap, 114 ~, 17 block device. See device, block blockdev, 76 A /boot, 43, 127–131 abstraction, 1–2 boot, 117–118. See also init administrator. See root init (see init) AFS (Andrew File System), 333–334 loader (see boot loader) alias, 339 messages, 118–119, 171–172 ALSA (Advanced Sound network configuration, 239–240 Architecture), 55–56 boot loader, 117, 121–123 Apple partition. See filesystem, HFS+ chainloading, 132 application layer. See network, filesystem access, 121–122 see( also application layer GRUB, filesystem access) archive, 39–41 GRUB (see GRUB) table of contents, 40 internals, 132–135 testing, 40, 387–388 multi-stage, 133 system other than Linux, 132 Bourne Shell, 12–13 compiling, 364–366 basic use, 12–13 compositor. See Wayland, compositor Bourne-again (see bash) compress. See file, compress script (see shell script) concatenate (files), 13–14 bpfilter, 259 configuration file, 42 Btrfs. See filesystem, Btrfs configure, 388–393 building software, 386–399 container bunzip2, 41 building, 407–409 bus error, 31–32 definition, 406 BusyBox, 258 filesystem, 410–411 bzip2, 41 image, 407–409, 413 limitations, 415–417 C networking, 411 C, 364–365 operation, 412–414 compiler, 376–377, 392 privilege requirements, 406–407 preprocessor, 372–373, 377, 391, purpose, 405 398 rootless, 407 case, 304 running, 409–410 cat, 13–14 storing data, 416 cd, 17 context switch, 5–6 cgroup, 144, 147, 216–220 control group. See cgroup container, 406 controlling terminal, 54 controller, 219–221 coreboot, 123 creating, 220–221 coreutils, 389, 395 listing, 218–219 cp, 15 version 1, 218–219 cpio, 164 chainloading. See boot loader, cpp, 373. See also C, preprocessor chainloading CPU, 2–6 character device. See device, character load (see load average) child process. See process, child multiple, 6, 205 chmod, 36–37. See also permissions performance, 208–210, 212–214 Chrome OS, 362 time, 32, 200, 207–208, 221 chroot, 406 virtual machine, 403–404 chsh, 12, 22, 193–195 cron, 183–185, 187 chvt, 55, 355 csh, 342 CIDR (Classless Inter-Domain CTRL-C, 14 Routing), 229–232 CTRL-D, 14 CIFS. See filesystem, CIFS CUPS, 360–362 clang, 364 curl, 271–272 CLASSPATH, 382 current working directory. See clobber, 28 directory, current clock. See real-time clock; system clock cylinder (disk), 78–79 cloud services, 403–404 cloud storage, 333 D CMake, 388, 399 D-Bus, 148, 241, 359–360 command-line editing, 25 instance, 360 command substitution, 306 monitoring, 360 compiler, 383 unit, 142

424 Index date, 182 parallel, 55 dd, 50–51, 93 pipe (see pipe, named) , 93 SCSI (see SCSI) default gateway, 230–231, 238 serial, 55 default route, 230 socket, 49, 289–290 default.target, 143 terminal, 53–55 default user settings, 343–344 types, 48–49 demand paging, 210 , 53, 108–110 desktop, 347–348 devtmpfs, 57–58 desktop background, 359 df, 89–91 Desktop Bus. See D–Bus DHCP (Dynamic Host Configuration desktop environment, 350 Protocol), 252–253 /dev, 42, 48–66 diff, 21, 395 /dev/dm–*, 53, 100 directory, 16–18, 36 /dev/hd*, 53 change, 17 /dev/lp*, 55 create, 17 /dev/mapper, 53, 100, 105 current, 17, 20, 201 /dev/null, 48–49 errors, 31 /dev/nvme*, 53 hierarchy, 16–17, 42–44 /dev/parport*, 55 home (see home directory) /dev/pts, 54 internal structure, 112–113 /dev/sd*, 52–53 listing contents, 15 /dev/sg*, 53, 66–67 parent, 17, 112–114 /dev/snd, 55 permissions (see permissions, /dev/sr*, 53, 67 directory) /dev/tty*, 54–55 remove, 17–18 /dev/vd*, 53 root, 16–17, 42–43, 117, 120, /dev/xvd*, 53, 403 124–125, 144 (see also inode, /dev/zero, 50–51 root) device, 47 disk audio, 55–56 buffer and cache, 86 block, 48–50, 56, 64, 66–67, 69–78, capacity, 72–74 (see also filesystem, 96–97 capacity) character, 49–50, 56 device, 52–53, 69–78 creating file, 56 see( device, disk) disk, 48–50 format (see filesystem, creating; driver, 4, 6–7, 117 partition, creating table) file, 42, 48–49, 56–61 geometry, 77–80 finding, 51 monitoring usage, 212–216 information, 49–50, 58, 60–61 partition (see partition) initialization, 57–62 PATA, 53 major and minor numbers, 49, 58, quota, 222 100 raw access, 71 monitor, 61 SATA, 52, 58–60, 62, 64–66 name, 51–55 priority, 215 network, 49 schematic, 70–71 node (see device, file) SCSI, 52–53, 62–63 optical, 53, 67, 81 solid state, 80

Index 425 disk (continued) /etc/login.defs, 197 swap (see swap) /etc/mtab, 86–87 usage (see filesystem, usage) /etc/nologin, 162 virtual, 53 /etc/nsswitch.conf, 246 display manager, 355 /etc/passwd, 27, 36, 177–179, 192–193 display modes, 54–55 /etc/profile, 340 dmesg, 118. See also kernel, log /etc/rc.d, 157–161 dmsetup, 109. See also device mapper /etc/resolv.conf, 245 DNS (Domain Name Service), 235, /etc/services, 249–250 243–246 /etc/shadow, 177, 179, 197 dnsmasq, 245 /etc/shells, 179, 193–195 Docker, 406–414 /etc/sudoers, 45 documentation, 26–28 eth0, 236 Domain Name Service. See DNS Ethernet, 235–236, 264–265 dot file, 22, 336 bridge, 236 DPMS (Display Power Management wireless, 266–268 Signaling), 359 euid. See effective user ID du, 90–91 exec, 311 dual-stack network, 233 exec(), 7, 203, 311 Dynamic Host Configuration Protocol executable, 36–37, 42–43, 87, 292, (DHCP), 252–253 365–367, 380 exit, 298 E exit code, 298 echo, 13, 16 export, 23 EDITOR, 344 expr, 311 effective user ID, 189–190 ext4. See filesystem, ext2/ext3/ext4 EFI. See UEFI efilinux, 123 F egrep, 19 fail2ban, 276–277 elapsed time, 207 fdisk, 72–73, 75–78 Emacs, 26 fg, 34–35 emulator, 402 FHS (Filesystem Hierarchy Standard), encryption, 197–198, 273–274 42 env, 292, 380 file environment variable, 22–23, 311 compare with another file, 21 EOF (end-of-file) message, 14 compress, 39–41, 321–322 error message, 29–30, 204 copy, 15 (see also file transfer) ESP (EFI System Partition). See UEFI, create empty, 16 ESP delete, 16, 113–114 /etc, 42, 141, 167, 176–177 descriptor (see file descriptor) /etc/fstab, 52, 85, 88–89 details, 15 /etc/group, 180 device (see device, file) /etc/hosts, 244 dot (see dot file) /etc/init.d, 159 errors, 30–31 /etc/inittab, 157–158 find, 21 /etc/ld.so.cache, 369 find text in, 19–20 /etc/ld.so.conf, 369 format, 21 /etc/localtime, 182 group, 15, 35–37

426 Index link, 38, 111–114, 303 overlay, 94, 410–411 link count, 113–114 proc (see /proc) listing, 15 read-only, 86, 121 mode, 35–37 (see also permissions) remount, 87–88 move, 16 repairing, 91–93 open, 200–202 resizing, 97, 107 owner, 15, 35–37 squashfs, 94 permissions (see permissions) tmpfs, 93–94 redirect command input from, 29 types, 81–82 redirect command output to, 28–29 usage, 89–91 regular, 35 , 81, 115, 333–334 rename, 15 UUID (universally unique sharing across a network, 323–334 identifier), 85, 88, 96, sharing with other users, 9 120–121, 124–126 socket (see device, socket) XFS, 81 swap, 97 Filesystem Hierarchy Standard (FHS), 42 temporary, 43, 307 find, 21, 310 test, 301–303 finding appropriate command, 26–27 type, 35, 38, 48, 201 firewall, 259–264 update timestamp, 16 rule, 261–262 file (command), 21 strategy, 262–264 file descriptor, 201, 203–204 flex, 379 file transfer, 315–316 folder. See directory choosing method, 316 for, 305 rsync (see rsync) fork(), 7, 147–148, 203, 205, 272 SSH (secure shell), 278 frame (Ethernet), 236 with Python, 316 free, 96 filesystem, 70–71, 80 fsadm, 107 boot loader access (see boot loader, fsck, 88, 91–93 filesystem access) fsuid, 190 Btrfs, 81–82 FTP, 278, 287 capacity, 89–91 FUSE (File System in User Space). cgroup, 219 (see also cgroup) See filesystem, user space checking, 91–93 CIFS, 331 G creating, 82–83, 105 gateway, 227, 230–231 currently attached, 84 gcc, 364 ext2/ext3/ext4, 81–85, 91–93 GECOS, 178 FAT, 81 geteuid(), 191–192 HFS+, 81 getty, 54, 143, 158, 181 hierarchy, 42–44 Ghostscript, 361–362 internal structure, 82, 111–115 glob, 18–19, 22, 293–294. See also ISO 9660, 81 regular expression journal, 81, 91–93 global unicast address, 232–233 mount, 83–89, 140 GNOME, 350 mounting, 105 gnome–shell, 351–352 mount options, 86–87 GNU Autotools, 386, 399. NFS (Network File System), 332–333 See also autoconf

Index 427 gparted, 72 include file.See header file GPT (Globally Unique Identifier inetd, 279 Partition Table), 72–73, 126 info (GNU), 28 grep, 19–20, 300 init, 118–120, 138–139. See also systemd group, 10, 178, 180 container, 413–414 listing, 36 identifying, 139 permissions (see permissions, group) process tracking, 158 (see also groups, 36 systemd, process tracking) GRUB, 123–135 runlevel (see runlevel) boot command, 127 System V, 139, 156–161 command line, 126–127 System V sequence, 158–159 configuration, 124–125, 127–129 Upstart, 139 devices, 124–126 initramfs, 124–125, 135, 163–164 filesystem access, 126–127 initrd, 164. See also initramfs insmod, 124–125 inode, 91–92, 111–115, 303 installing, 130–131 root, 112–113 internals, 134–135 installing software, 385–386, 394–395 menu, 123–125, 128–129 interactive shell, 340–342 on removable media, 131 interface ID (IPv6), 232 root, 124–128 internet layer. See network, internet layer grub-mkconfig, 127–129 iostat, 214–215 GTK+, 350 iotop, 216–217 guest (), 403 ip (command), 228–230, 232–233, gunzip, 39–41 237–238, 264–265 gzip, 39–41 IP (internet protocol), 226 address, 227–228, 237–238 H chain, 259–260 halt, 162–163 filter, 259–262 hard link. See file, link forwarding, 255 hardware operation, 4 masquerading, 256 head, 21 subnet (see subnet) header file, 44, 371–372, 391, 393–394 table, 259–260 locating, 398 IPP (Internet Print Protocol), 361 help, 26–28 iptables, 261–264 here document, 308 IPv4, 226, 231. See also IP /home, 42 IPv6, 226–227, 231–233, 235, 238, 247, home directory, 17, 42, 178 253–254, 266 host, 224, 235 iw, 267 host key, 274–276 HTTP, 270–272 J , 402–403 jar, 382 Java, 382, 404 I job control, 34–35 I/O monitoring, 214–216 jobs, 34 ICMP, 234–235, 254 journalctl, 46, 51, 118–119, 145, if/then/else, 299–300 169–172, 175, 186 –187 ifconfig, 228. See also ip journald, 154, 156, 168–169, 173, 175, image, 4. See also container, image 186–187

428 Index K libata, 64–66 KDE, 350 libinput, 352–353 Kerberos, 333–334 library, 42 kernel, 2–5 C, 366 as a resource, 199 linking against, 366–367, 370, 377, boot, 117, 119–123 390–391, 393–394 boot messages, 118–119 shared (see shared library) compiling, 399 static, 367–368 disk buffer and cache (see disk, Lightweight Directory Access Protocol buffer and cache) (LDAP), 178 disk I/O system, 71, 111 LILO, 123 image location, 44, 125 link load, 117, 121–122 count (see file, link count) log, 51, 61, 172 farm, 159 mode, 3 hard (see file, link) modules, 44 symbolic (see symbolic link) network interface (see network, link-local address, 232–233, 254 interface) listening (on network port), 248–249, parameters, 120–122, 124–125 279–280, 288–289 reading partition table (see literal, 293–295 partition, reading table) LLMNR (Link-Local Multicast Name ring buffer, 118–119 Resolution), 245 routing table, 230 LLVM project, 364, 383 SCSI subsystem, 62–67 ln, 38–39, 111, 113, 115. See also link, space, 3 hard; link, symbolic thread, 4 lo, 247 keyboard, 357–359 loadable kernel modules. See kernel, kill, 33–34 modules Kubernetes, 415 load average, 208–210 LOADLIN, 123 L local area network (LAN), 224 LAN (local area network), 224 localhost, 242, 247 lastlog, 169 locate, 21 layer, 2 log, 9, 167–168. See also kernel, log; network (see network, layer) journald; journalctl LBA (Logical Block Addressing), 79, autoconf, 392–393 122 facility/severity/priority, 174–175 LDAP (Lightweight Directory Access message, 168 Protocol), 178 monitoring, 172 ldconfig, 369 Samba, 328 LD_LIBRARY_PATH, 344, 369–371 structured data, 175 ld.so, 369–370 sudo, 46 ldd, 368–369 systemd unit (see systemd, unit log) less, 20, 341–344 logger, 186 level, 2 logical volume. See LVM in user space, 8–9 Logical Volume Manager (LVM). See Lex, 379 LVM /lib, 42 login, 181

Index 429 loginctl, 188 separator, 375 login shell, 340–342 standard target, 378, 392 logrotate, 172–173 staying up-to-date, 375–376 loop. See shell script, loop target, 374 lost+found, 92, 114 man, 26–28 ls, 15 manual page, 26–28, 44, 338. See also lsof, 200–202 man network, 280–281 MBR (Master Boot Record), 72–73, 126 domain socket, 290 boot, 130–131, 133 lsscsi, 52, 63, 66 mDNS, 245 lsusb, 65 /media, 43 ltrace, 204 memory, 3–4 LV (logical volume). See LVM, logical capacity, 94–96, 209–210 volume insufficient, 94–96, 209–210 LVM (Logical Volume Manager), management, 6, 119, 210–214 52–53, 96–110 monitoring usage, 212–214 advantages, 96–97 page (see page) constructing system, 102–105 problems, 31–32 creating filesystem, 105 protection, 3 device names, 100 swap (see swap) devices, 73–74 test, 129 implementation, 107–110 virtual (see virtual memory) listing, 97–100 mkdir, 17 logical volume, 96–100 mkfs, 82–83 logical volume, arrangement, mknod, 56 109–110 mkswap, 96–97 logical volume, creating, 104–105 MMU (), 6, logical volume, removing, 106–107 210–211 physical extent, 99 modules. See kernel, modules physical volume, 96–99, 101–103 mount, 83–89. See also filesystem, mount physical volume, creating, 103 mouse, 358 physical volume, metadata, 101, multitasking, 5–6 108 mv, 16 resizing, 106–107, 110 scanning volumes, 108 N schematic, 96–97 namespace. See network, namespace; volume group, 96–99, 101–103 process, namespace volume group, creating, 103 nano, 26, 344 LXC, 414–415 NAT (Network Address Translation), 255–258 M NDP (Neighbor Discovery Protocol), MAC address, 235–237, 243, 264–265 266 main memory. See memory netcat, 282–283 make, 373–379 Netplan, 239 Makefile netstat, 248–249, 279 dependency, 373–375, 377, 379 network, 223–224 organization, 378–379 application layer, 225, 269–272 rule, 374, 377 client, 248–249

430 Index configuration, 237–243, 252–254 nobody (user), 178 (see also network configuration nslookup, 245 manager) NTP (Network Time Protocol), connection, 248–249, 270–271, 281 182–183, 251 container (see container, NVMe (Non-Volatile Memory Express), networking) 53, 63 firewall see( firewall) host (see host) O interface, 49, 236–238, 411–412 object file, 365–366 internet layer, 225–235 (see also IP) OOM killer, 96 layer, 223, 225–227 open(), 203–204 localhost (see localhost) open source, 385–386 namespace, 411–412 OpenWRT, 258 packet (see packet) operating system–level , physical layer, 226, 235–236 406 port, 248–250, 270 /opt, 43 prefix, 228 OSS (Open Sound System), 55–56 private (see private network) promiscuous mode, 281 P route, 230–231 package, 390, 394–395, 399–400 router (see router) packet, 224–225 security, 285–287 page, 210–213 server, 248–249, 272 page fault, 211–212 simple, 224, 227, 252 PAGER, 344 stack, 225 pager, 20, 344 transport layer, 225–226, 247 page table, 6, 210 troubleshooting, 234–235, PAM (Pluggable Authentication 279–284 Modules), 192–198 wireless (see wireless network) parallel port, 55 Network Address Translation (NAT), paravirtualization, 403 255–258 parted, 72–73, 75–76 network configuration manager, partition, 52, 57, 70, 82 240–243 alignment, 79–80 Network Information Service (NIS), altering table, 75–76 178 Apple (see filesystem, HFS+) network layer, 225–226. See also capacity, 72–74 (see also filesystem, network, internet layer capacity) NetworkManager, 240–243, 267–268 creating table, 76–78 network mask. See subnet, mask extended, 72–73 Network Time Protocol (NTP), logical, 72–73 182–183, 251 primary, 72–73 NFS (Network File System). See reading table, 74–76 filesystem, NFS swap, 72–73, 96 (see also swap) , 259 system ID, 72–74 nice value, 208 table, 70–79 NIS (Network Information Service), viewing, 72–75 178 Windows (see filesystem, FAT) nmap, 284 passwd, 22, 35–36, 179

Index 431 password PostScript, 360–362 change, 22 predictable network interface device file see( /etc/passwd) name, 236 password change, 197–198 printing, 55, 360–362 password file.See /etc/passwd private network, 255–257 patch, 395–396 /proc, 42, 88, 93 patchelf, 370 /proc/devices, 51 PATH. See path, command process, 3–4, 32–35, 93 path accounting, 222 absolute, 17 background, 34–35 command, 23–24, 337–338 blocked, 213 relative, 17 child, 204, 413–414 pathname. See path continue, 33–35 pattern matching, 18–20 grouping (see cgroup) PE. See LVM, physical extent ID, 32–34, 201, 205–206, 220, 298 performance, 199–200, 210 interface, 42 memory, 95–96 listing, 32–33 Perl, 20, 381 log messages, 169 permissions, 31, 35–37 management, 5–6 bits, 35–37 memory, 6, 96, 200, 210–212 changing, 36–37 monitoring, 216 default, 37, 339–340 namespace, 410 directory, 37 open files, 200–202 execute, 35–37 owner, 9, 189–190 group, 35–37 parent, 413–414 other, 35–37 priority, 207–208 preserving, 40 ready to run, 208–210 read, 35–37 starting new, 7 testing, 302–303 status, 32 user, 35–37 stop, 33–35 world (see permissions, other) terminate, 33–34 , 35–37 tracking, 200 physical layer. See network, physical layer unexpected termination, 96 physical volume (PV). See LVM, .profile, 340 physical volume prompt. See shell, prompt Pico, 26 ps, 32–33, 190, 212 PID. See process, ID pseudodevice, 8 pidstat, 216 pseudoterminal, 54 ping, 234–235 pseudo-user, 178 –179 pipe, 20, 28–29, 41 public key encryption, 274 named, 49, 56 , 56 pkg–config, 393–394 PV (physical volume). See LVM, physical Pluggable Authentication Modules volume (PAM), 192–198 pwd, 20 plymouth, 54 Python, 292, 380–381, 417–418 Podman, 406–407, 411 port. See network, port Q port scan, 284 Qt, 350

432 Index R saved user ID, 190 read, 312 /sbin, 43 real-time clock, 181 scheduling class, 215 real user ID, 189–190 scheduling tasks, 183–188 reboot, 162–163 SCons, 399 redraw display, 35 scp, 278 regular expression, 19–20 screen, 34 regular file.See file, regular scripting language, 380–382 remote login, 273–278 SCSI (Small Computer System renice, 208 Interface), 52–53, 62–67 rescue image or CD, 164–165 disk (see disk, SCSI) resolvectl, 246 generic, 53, 66–67 resolved. See system-resolved ID, 62–63 resource listing device information, 52, 63, limiting, 216–222, 406 66 utilization, 207, 216, 221 sector, 79 resource monitoring, 206 secure shell. See SSH reverse isearch, 35 security, 191–198 RIP (Raster Image Processor), 361–362 application, 405 rm, 16 in command path, 338 file sharing, 323–324, 331–334 rmdir, 17–18 root, 9, 178–179. See also directory, root network (see network, security) running programs as, 44–46 sed, 309–310 root directory. See directory, root segmentation fault, 31–32 route, 230. See also network, route serial port, 55 router, 224, 227, 233, 254–259 server role, 8–9 RPC (remote procedure call), 284–285 setuid, 36, 87, 189–191 rsync, 317 sftp, 278 bandwidth, 322 shadow password. See /etc/shadow compression, 321–322 shared library, 42, 367–371, 390–391 copying from remote host, 322 system calls, 203 copying to remote host, 317–322 trace, 204 exact copy, 318–319 shebang, 292, 380 excluding files, 320 shell, 12–14. See also Bourne Shell verifying transfer, 321 change, 12, 22 rsyslogd, 169, 175 default, 343–344 ruid. See real user ID editing commands, 25 /run, 43 process ID, 33, 298 runlevel, 156–157 prompt, 12–13, 22, 338–339 run-parts, 160–161 quoting, 293–295 runtime-based virtualization, 417–418 special variable, 295–298 runtime information, 43 user, 178 –179 runtime library search path, 369, 394 variable, 22–23, 33, 295 window, 13, 35, 54 S shell script, 12, 291–292 Samba, 324–330 arguments, 296–297 client, 329–330 arithmetic, 303–304, 311, 313 conditional, 299–304 sar, 222

Index 433 shell script (continued) stat() , 115 include, 312 state, 4 limitations, 292–293, 312–313 stateless (network) configuration, loop, 305–306 253–254 name, 297 static library. See library, static permission, 292 stderr. See standard error reading user input, 312 stdin. See standard input string test, 303 stdio. See standard I/O shift, 296 stdout. See standard output shortcut. See symbolic link strace, 202–205 shutdown, 159, 162–163 stream, 14, 20, 28–29, 49 signal, 33–34 edit (see sed) in shell script, 307 ID (in shell), 29 single-user mode, 121, 156, 164–165 search (see grep) Small Computer System Interface. See subnet, 227–229, 236 SCSI choosing, 255–256 socket, 288–290 mask, 228–230, 238 device (see device, socket) routing between, 254–256 Unix domain (see Unix domain subshell, 311–312 socket) sudo, 13, 45–46, 190 socket unit. See systemd, socket unit superblock, 82, 92, 114 sort, 22 superserver, 279 sound, 55–56 superuser. See root source code, 364 swap, 88, 94–96, 212–214 sourcing, 312 partition (see partition, swap) special characters, 24–25 swapoff, 95 splash screen, 54, 118, 120 swapon, 94–95 SSD (solid-state disk). See disk, solid symbolic link, 38–39, 302 state , 86 SSH (secure shell), 272–278 /sys, 43, 49–50. See also systemd unit, 142–143 syscall. See system call SSHFS, 331–332 sysctl, 255 SSID, 266 sysfs, 49–50, 58, 93 standard error, 29, 35 SYSLINUX, 123 standard I/O, 14 syslog, 168–169, 174–176 redirection, 28–29 system call, 4, 7 standard input, 14, 20, 29, 35, 39, 51 trace, 202–205 standard output, 14, 20, 28–29, 35, 39, system clock, 181–183 51 systemctl, 142, 144 –147, 149 startup. See boot systemd, 118, 139–140 startup file, 335–336 activating unit, 146 bash, 340–342 conditional dependencies, 150 command path, 337–338 configuration, 141–143 example, 341–343 Conflicts dependency, 149 order, 340–342 creating (adding) unit, 146–147 problems, 344 deactivating unit, 147 tcsh, 342–343 dependency, 140–141, 147–155 stat command, 113–114 enabling unit, 147, 150–151

434 Index instance, 154 telnet, 270, 273, 287 job, 145–146 tempfs. See filesystem, tmpfs mount unit, 89, 140, 144 temporary file.See file, temporary on-demand resource, 151–154 terminal, 53–54. See also shell, window operation, 144 –147 controlling (see controlling parallel unit activation, 154–156 terminal) process tracking, 143, 147–148 device (see device, terminal) reload unit configuration, 145 virtual (see virtual console) Requires dependency, 148–151 test, 299–304 Requisite dependency, 149 text editor, 25–26, 344 service unit, 140, 142–143, 186 text search, 19–20 socket unit, 140, 142, 152–154, 279 thrash, 209–211. See also memory, specifier, 143, 153–154 insufficient System V compatibility, 161 thread, 204–206 target unit, 140, 146–147, 150–151 time, 207, 211–212. See also CPU, time; timer unit, 185–188 system time; elapsed time unit, 140–148 time (of day), 181–183 unit cgroup, 144 timer unit. See systemd, timer unit unit file, 142–143, 146 –147, time slice, 5 150–151, 185–186 timesyncd, 182–183 unit listing, 144–145 time zone, 182 unit log, 144–145 TLS (Transport Layer Security), 226, unit startup order, 140–141, 287 148–149 /tmp, 43 unit status, 144, 146 toolkit, 350 variable, 143 top, 200, 205–208 Wants dependency, 146, 148–151 touch, 16 systemd- (prefix), 156 Transmission Control Protocol. See systemd–analyze, 140–141, 149 TCP systemd-boot, 123 transport layer. See network, application systemd-resolved, 156, 245 layer systemd-run, 188 Transport Layer Security. See TLS system time, 207 troubleshooting, 168 System V init. See init, System V tune2fs, 85 system virtual machine, 402 U T , 48, 51–52, 56–62, 109 tail, 21 configuration and rules, 58–60 TAP interface, 412 event (see uevent) tar, 39–41, 312 udevadm, 50–51, 60–61, 76 TCP (Transmission Control Protocol), udevd, 56–62, 85, 156, 163 247–251, 279–281 udisksd, 62 filtering, 262–264 UDP (User Datagram Protocol), interacting with service, 270–272 250–251, 279–281 wrapper, 279 UEFI (Unified Extensible Firmware tcpdump, 281–283 Interface), 121–122, 130–132 tcsh, 342–343 ESP (EFI System Partition), 133–135 telinit, 161 secure boot, 131–132

Index 435 uevent, 58, 61 organization, 8–9 umask, 37, 339–340 start, 117–118, 120, 137–139 umount, 84 (see also init) Unified Extensible Firmware Interface. /usr, 43–44 See UEFI /usr/lib, 367 Universal Coordinated Time (UTC), /usr/local, 44, 390, 395 181–183 /usr/share, 44 Universally Unique Identifier (UUID), UTC (Universal Coordinated Time), 52 181–183 Unix, 11–12 UUID (Universally Unique Identifier), Unix domain socket, 289–290 52 unlink, 114. See also file, delete filesystem see( also filesystem, unxz, 41 UUID) unzip, 41 uplink, 224. See also default gateway V Upstart, 139 /var, 43 uptime, 209 /var/log, 169 USB VFS (), 81, 115 listing device information, 65 vi, 26 relationship to SCSI, 52, 64–65 vipw, 179 serial port, 55 virtual, 401 user, 9 VirtualBox, 402–403 change, 44–46 virtual console, 54–55, 158, 355 id (see user ID) virtual disk. See disk, virtual management, 177–180 virtual interface (network), 411–412 name (see username) virtual machine, 53, 382, 402–405 regular, 12 virtual memory, 6, 96, 401. See also root (see root) memory, management user authentication, 192–198. See also vmstat, 212–214 PAM; /etc/passwd volume group. See LVM, volume group user authorization, 193. See also PAM User Datagram Protocol (UDP), W 250–251, 279–281 wait(), 413 user environment, 335–336 wallpaper. See desktop background user ID, 9, 177–179, 189–190 warning messages, 30 user identification, 191–192 Wayland, 349–350 userland. See user space compositor, 349–352 user mode, 3 input, 352–353 username, 9, 177–179 window manager, 349 user process. See process X compatibility, 353–354 user space, 3 web server, 316 and filesystems, 111 WEP (Wired Equivalent Privacy), 268 and LVM, 107 Weston, 351–352, 354 and user IDs, 179, 191–192 while, 305–306 creating filesystems in, 82 who, 156 filesystem see( filesystem, user widget, 350 space) WiFi Protected Access (WPA), 268

436 Index wildcard. See glob xlsclients, 356 windowing system (determining), 351 xset, 359 window manager, 349–350 X Window System Windows application, 350 boot, 132 client, 348–349, 355–356 file sharing, 324–330 diagnostics, 356–357 partition (see filesystem, FAT) display, 354 password, 326–327 event, 356–357 printer sharing, 329 input, 357–359 Wired Equivalent Privacy (WEP), 268 network transparency, 355 wireless network, 240–241. See also preferences, 357–359 Ethernet, wireless server, 54, 348–349, 354–355 wlan0, 236, 267 tunneling, 273, 355 worker process, 272 Wayland compatibility, 354 WPA (WiFi Protected Access), 268 window manager (see window wtmp, 169 manager) xwininfo, 356 X xz, 41 xargs, 310 XDG Desktop Entry, 142 Y , 403 Yacc, 379 xev, 356–357 X event. See X Window System, event Z xinetd, 279 zcat, 41 xinput, 357–358 zip, 41 XKB (X keyboard extension), 358–359

Index 437