LX0-103 Exam Essentials Flashcards

1
Q

Summarize features that Linux shells offer to speed up command entry.

A

The command history often enables you to retrieve an earlier command that’s similar or identical to the one you want to enter. Tab completion reduces typing effort by letting the shell finish long command names or filenames. Command-line editing lets you edit a retrieved command or change a typo before committing the command

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Describe the purpose of the man command.

A

The man command displays the manual page for the keyword (command; filename; system call; or other feature) that you type. This documentation provides succinct summary information that’s useful as a reference to learn about exact command options or features.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Explain the purpose of environment variables.

A

Environment variables store small pieces of data—program options; information about the computer; and so on. This information can be read by programs and used to modify program behavior in a way that’s appropriate for the current environment.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Describe the difference between standard output and standard error.

A

Standard output carries normal program output; whereas standard error carries high- priority output; such as error messages. The two can be redirected independently of one another.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Explain the purpose of pipes.

A

Pipes tie programs together by feeding the standard output from the first program into the second program’s standard input. They can be used to link together a series of simple programs to perform more complex tasks than any one of the programs could manage.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Describe the filter commands.

A

The various simple filter commands allow the manipulation of text. These commands accomplish tasks of various types; such as combining files; transforming the data in files; formatting text; displaying text; and summarizing data.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Summarize the structure of regular expressions.

A

Regular expressions are strings that describe other strings. They can contain normal alphanumeric characters; which match the exact same characters in the string they are describing; as well as several special symbols and symbol sets that match multiple different characters. The combination is a powerful pattern-matching tool used by many Linux programs.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Identify critical features of RPM and Debian package formats.

A

RPM and Debian packages store all of the files for a given package in a single file that also includes information about what other packages the software depends on. These systems maintain a database of installed packages and their associated files and dependencies.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Describe the tools used for managing RPMs.

A

The rpm program is the main tool for installing; upgrading; and uninstalling RPMs. This program accepts operations and options that tell it precisely what to do. The Yum utility; and particularly its yum command; enables installation of a package and all its dependencies via the Internet rather than from local package files

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Describe the tools used for managing Debian packages.

A

The dpkg program installs or uninstalls a single package or a group of packages that you specify. The apt-get utility retrieves programs from installation media or from the Internet for installation; and it can automatically upgrade your entire system. The dselect program serves as a menu-driven interface to apt-get ; enabling you to select programs that you want to install from a text-mode menu.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Summarize tools for extracting files and converting between package formats.

A

The rpm2cpio program can convert an RPM file to a cpio archive; enabling users of non- RPM systems to access files in an RPM. The alien utility can convert in any direction between Debian packages; RPMs; Stampede packages; and tarballs. This enables the use of packages intended for one system on another.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Summarize the reasons for using shared libraries.

A

Shared libraries keep disk space and memory requirements manageable by placing code that’s needed by many programs in separate files from the programs that use it; enabling one copy to be used multiple times. More generally; libraries enable programmers to use basic “building blocks” that others have written without having to reinvent code constantly

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Describe methods available to change the library path.

A

The library path can be changed system wide by editing the /etc/ld.so.conf file and then typing ldconfig . For temporary or per-user changes; directories may be added to the path by placing them in the LD_LIBRARY_PATH environment variable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Explain the difference between foreground and background processes.

A

Foreground processes have control of the current terminal or text-mode window (such as an xterm ). Background processes don’t have exclusive control of a terminal or text-mode window but are still running

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Describe how to limit the CPU time used by a process.

A

You can launch a program with nice or use renice to alter its priority in obtaining CPU time. If a process is truly out of control; you can terminate it with the kill command.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Summarize BIOS and EFI essentials

A

The BIOS and EFI provide two important functions: First; they configure hardware— both hardware that’s built into the motherboard and hardware on many types of plug-in cards. Second; they begin the computer’s boot process; passing control on to the boot loader in the MBR or EFI partition in GPT-formatted disks. The BIOS is currently being retired in favor of EFI; which performs these tasks on modern computers.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Describe what files contain important hardware information.

A

There are many files under the /proc filesystem. Many of these files have been mentioned throughout this chapter. Familiarize yourself with these files; such as /proc/ioports ; /proc/interrupts ; /proc/dma ; /proc/bus/usb ; and others.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Explain Linux’s model for managing USB hardware.

A

Linux uses drivers for USB controllers. These drivers in turn are used by some device- specific drivers (for USB disk devices; for instance) and by programs that access USB hardware via entries in the /proc/bus/usb directory tree.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Summarize how to obtain information about PCI and USB devices.

A

The lspci and lsusb programs return information about PCI and USB devices; respectively. You can learn manufacturers’ names and various configuration options by using these commands.

20
Q

Identify common disk types and their features.

A

PATA disks were the most common type on PCs until about 2005. Since then; SATA disks; which are more easily configured; have gained substantially in popularity. SCSI disks have long been considered the top-tier disks; but their high price has kept them out of inexpensive commodity PCs.

21
Q

Describe the purpose of disk partitions.

A

Disk partitions break the disk into a handful of distinct parts. Each partition can be used by a different OS; can contain a different filesystem; and is isolated from other partitions. These features improve security and safety and can greatly simplify running a multi-OS system.

22
Q

Summarize important Linux disk partitions.

A

The most important Linux disk partition is the root ( / ) partition; which is at the base of the Linux directory tree. Other possible partitions include a swap partition; /home for home directories; /usr for program files; /var for transient system files; /tmp for temporary user files; /boot for the kernel and other critical boot files; and more.

23
Q

Describe commands that help you monitor disk use.

A

The df command provides a one-line summary of each mounted filesystem’s size; available space; free space; and percentage of space used. The du command adds up the disk space used by all of the files in a specified directory tree and presents a summary by directory and subdirectory.

24
Q

Summarize the tools that can help keep a filesystem healthy.

A

The fsck program is a front end to filesystem-specific tools such as e2fsck and fsck.jfs . By whatever name; these programs examine a filesystem’s major data structures for internal consistency and can correct minor errors

25
Q

Explain how filesystems are mounted in Linux.

A

The mount command ties a filesystem to a Linux directory; once the filesystem is mounted; its files can be accessed as part of the mount directory. The /etc/fstab file describes permanent mappings of filesystems to mount points; when the system boots; it automatically mounts the described filesystems unless they use the noauto option (which is common for removable disks).

26
Q

Describe commands used to copy; move; and rename files in Linux.

A

The cp command copies files; as in cp first second to create a copy of first called second . The mv command does double duty as a file-moving and file-renaming command. It works much like cp ; but mv moves or renames the file rather than copying it.

27
Q

Summarize Linux’s directory-manipulation commands.

A

The mkdir command creates a new directory; and rmdir deletes a directory. You can also use many file-manipulation commands; such as mv and rm (with its -r option); on directories.

28
Q

Explain the difference between hard and symbolic links.

A

Hard links are duplicate directory entries that both point to the same inode and hence to the same file. Symbolic links are special files that point to another file or directory by name. Hard links must reside on a single filesystem; but symbolic links may point across filesystems.

29
Q

Summarize the common Linux archiving programs

A

The tar and cpio programs are both file-based archiving tools that create archives of files using ordinary file access commands. The dd program is a file-copy program; however; when it’s fed a partition device file; it copies the entire partition on a very low-level basis; which is useful for creating low-level image backups of Linux or non-Linux filesystems.

30
Q

Explain the differences between compression utilities.

A

The gzip ; bzip2 ; and xz utilities are compression tools; which reduce a file’s size via compression algorithms. They are often used in conjunction with the tar command. The gzip utility is the oldest compression tool and provides the least compression. The bzip2 utility provides slightly improved file compression. The xz utility is the newest tool; provides the best compression; and is very popular.

31
Q

Describe Linux’s file ownership system.

A

Every file has an owner and a group; identified by number. File permissions can be assigned independently to the file’s owner; the file’s group; and to all other users

32
Q

Explain Linux’s file permissions system.

A

Linux provides independent read; write; and execute permissions for the file’s owner; the file’s group; and all other users; resulting in nine main permission bits. Special permission bits are also available; enabling you to launch program files with modified account features or alter the rules Linux uses to control who may delete files

33
Q

Summarize the commands Linux uses to modify permissions.

A

The chmod command is Linux’s main tool for setting permissions. You can specify permissions using either an octal (base 8) mode or a symbolic notation. The chown and chgrp commands enable you to change the file’s owner and group; respectively. (The chown command can do both but can be run only by root .)

34
Q

Describe the prerequisites of using Linux’s disk quota system.

A

Linux’s disk quota system requires support in the Linux kernel for the filesystem on which quotas are to be used. You must also run the quotaon command; typically from a startup script; to enable this feature.

35
Q

Explain how quotas are set.

A

You can edit quotas for an individual user via the edquota command; as in edquota larry to edit larry ‘s quotas. This command opens an editor on a text file that describes the user’s quotas. You can change this description; save the file; and exit from the editor to change the user’s quotas.

36
Q

Summarize how Linux’s standard directories are structured.

A

Linux’s directory tree begins with the root ( / ) directory; which holds mostly other directories. Specific directories may hold specific types of information; such as user files in /home and configuration files in /etc . Some of these directories and their subdirectories may be separate partitions; which helps isolate data in the event of filesystem corruption.

37
Q

Describe the major file-location commands in Linux.

A

The find command locates files by brute force; searching through the directory tree for files that match the criteria you specify. The locate (or slocate ) command searches a database of files in publicly accessible directories. The whereis command searches a handful of important directories; and which searches the path. The type command identifies another command as a built-in shell command; a shell alias; or an external command (including the path to that command).

38
Q

Describe how GRUB Legacy is configured and used.

A

GRUB Legacy uses the menu.lst or grub.conf configuration file in /boot/grub . This file contains global and per-image options. Use the grub-install program to install the boot loader. When GRUB boots; it presents a menu of OS options that you select using the keyboard arrow keys.

39
Q

Describe how GRUB 2 is configured and used.

A

GRUB 2 uses the /boot/grub/grub.cfg configuration file; however; system administrators are discouraged from editing it directly. Instead; they should rely on automatic configuration scripts and set system-specific defaults in /etc/defaults/grub and the files in /etc/grub.d . As with GRUB Legacy; you can install GRUB 2 using the grub-install program.

40
Q

Describe the boot process.

A

The CPU runs the firmware; the firmware loads and runs a boot loader; the boot loader loads and runs secondary boot loaders (if needed) and the Linux kernel; the Linux kernel loads and runs the initial system program ( init ); and init starts the rest of the system services via startup scripts that are specific to the startup system (SysV; Upstart; systemd; or something more exotic). BIOS-based computers look for boot loaders in various boot sectors; including the MBR of a hard drive or the boot sector of a disk partition or USB flash drive. EFI-based computers look for boot loaders in files on the ESP

41
Q

Summarize where to look for boot-time log information.

A

The dmesg command prints out logs from the kernel ring buffer; which holds boot-time and other kernel messages. Other useful log information can be found in /var/log/messages and other files in /var/log

42
Q

Summarize the role of /sbin/init

A

The init program is responsible for starting many programs and services on your Linux operating system

43
Q

Explain the SysV init system.

A

The SysV init system uses a default runlevel specified with a line like id:2:initdefault: in the /etc/inittab file. Use commands such as chkconfig ; update-rc.d ; ntsysv ; and systemctl to change which services are started when switching to specific runlevels. Runlevels 0; 1; and 6 are reserved for shutdown; single-user mode; and rebooting; respectively. Runlevels 3; 4; and 5 are the common user runlevels on Red Hat and most other distributions; and runlevel 2 is the usual user runlevel on Debian systems

44
Q

Describe how to change SysV init runlevels

A

The programs init and telinit can be used to change to other runlevels. The shutdown ; halt ; poweroff ; and reboot programs are also useful when shutting down; rebooting; or switching to single-user mode.

45
Q

Explain the systemd init system

A

The systemd init system uses units and targets to control services. The default target is specified by the file /etc/systemd/system/default.target and is a link to a target file in the /lib/systemd/system folder.

46
Q

Describe how to change systemd init targets.

A

You use the systemctl program to start and stop services as well as to change the target level of the system

47
Q

Describe vi’s three editing modes.

A

You enter text using insert mode; which supports text entry and deletion. The command and ex modes are used to perform more complex commands or to run outside programs to operate on the text entered or changed in insert mode.