click below
click below
Normal Size Small Size show me how
Server Admin Exam 1
| Question | Answer |
|---|---|
| What do Linux kernel versions include? | Major number, minor number, and revision number |
| GNU Public License | Source code must be freely available (open source with Linux) |
| When did Linus Torvalds create Linux? | 1991 |
| Two competing desktop environments in Linux | GNOME and KDE |
| Absolute Pathname | The full pathname to a certain file or directory, starting from the root directory |
| Relative Pathname | Pathname of target file ir directory relative to your current working directory |
| Linux filesystem structure part 1 | /var = variable /home = user's home directory /etc = "et-see" host-specific config. /bin = binary /usr = user utilities |
| Linux filesystem structure part 2 | /sbin = system binaries /proc = visual filesystem /lib = essential shared libraries /sys = virtual filesystem /root = admin home directory |
| Command to access your home directory | ~ |
| Displays the directory you are currently in | pwd |
| Changes directories | cd |
| Text files | Contain config info |
| Binary data files | Store info such as common functions and graphics |
| Linked Files | Files that have an association with one another |
| Special device files | Represent different devices on the system |
| Named pipe (|) files | Pass info from one process to another |
| Socket files | Allow a process on another computer to write to a file on the local computer while another process reads from that file |
| Linux filename extensions Part one | .bin = Binary executable program file .html = HTML file .ps = File formatted to print with PostScript .txt = Text files .tar = Tape archived file |
| Linux filename extensions Part two | .gz = Compressed file .conf, .cfg = Config files .tcl = Tool command language program .sh = Shell scripts |
| Display files in current directory | ls |
| Appends a special character at the end of each filename displayed to indicate the type of file | ls -F |
| Provides a long-listing format of each file in a certain directory | ls -l |
| Displays hidden files | ls -a |
| File components when viewing a file with ls -l | File type character: d or - Color of filename: blue (directory) and red (file) Hard link count: Num of files that point to the same file Owner of file Group owner of file File size Most recent modification time |
| Displays the file type of any file | file |
| Can simplify commands specifying more than one filename on the command line | Wildcard Metacharacter (*) |
| Lists all files that begin with "project" | ls project* |
| Matches 0 or more characters in a filename | * |
| Matches 1 character in a filename | ? |
| Matches 1 character in a filename, provided this character is either an a, e, g, or h | [aegh] |
| Matches 1 character in a filename, provided this character is either an a, b, c, d, or e | [a-e] |
| Matches 1 character in a filename, provided this character is NOT an a, e, g, or h | [!a-e] |
| Displays to the screen | cat |
| Displays the line number of each line in the file | cat -n |
| Displays contents of a text file in reverse order | tac |
| Displays the first ten lines of a file | head |
| Displays the last ten lines of a file | tail |
| Displays text files page by page | more |
| Displays text files page by page but can scroll with arrow keys | less |
| Searches for and displays text characters in a binary file | strings |
| Displays contents of a file in octal format | od |
| Set of text wildcards developed to ease search for specific text | Regular expressions (regex) |
| Displays lines of a text file that matches a common regex | grep |
| Displays lines in a text file that match extended regex | egrep |
| Does not interpret any regex and returns results much faster | fgrep |
| Common Linux Editors | Vi (Vim), Nano |
| /dev directory | Contains one file per device for almost all devices on a Linux machine |
| Character devices | Transfer data character-by-character to and from the device |
| Block devices | Transfer chunks or blocks of data using physical memory to buffer the transfer (faster than character devices) |
| What does `ls -l` do when looking at a device? | Shows b or c for block/character file. Shows major and minor number (Ex: 8, 1) for the device |
| mknod command | Recreates a corrupt device file if major/minor numbers are known |
| /proc/devices file | Contains list of devices currently used on the system and their major/minor numbers |
| Common components of all filesystems | Superblock, Inode table, Data blocks |
| Linux filesystem types | Btrfs, exFAT, ext2, ext3, ext4, zfs |
| mount command | Used to mount devices to mount point directories (Makes the device's contents visible) |
| umount command | Used to unmount devices from mount point directories |
| lsusb command | Displays removable devices connected to your PC |
| lsblk command | Used to help verify the device file used to represent the partition on your USB drive |
| mkfs command | Used to make a filesystem on a USB flash drive |
| df -hT command | (Disk free space) Displays a list of currently mounted filesystems |
| fuser command (fuser -u <directory>) | Displays the users using a particular directory |
| eject command | Unmounts the filesystem and force the CD or DVD to physically eject a disc |
| mkisofs | Create a new ISO image from a directory of files |
| SATA and SCSI drive letter format | First: /dev/sda Second: /dev/sdb |
| How many partitions does Linux require at minimum? | Two One mounted to the / directory (root partition) One mounted to the /boot directory |
| Tracks | Concentric circles |
| Sectors | Divide each track into smaller units |
| Blocks of data | Combination of sectors |
| Cylinder | Series consisting of the same concentric track on all the metal platters inside a HDD (think vertical) |
| Partition definitions | Stored in the first readable sector of the hard disk known as the Master Boot Record (MBR) or GUID Partition Table (GPT) |
| Partition device files lettering format | First primary partition: /dev/sda1 Second primary partition: /dev/sda2 |
| Logical drives are named starting with number... | 5 |
| How many partitions can be created? | Up to 128 |
| fdisk /dev/sda command | Creates sda partition after installation (partitions a fixed disk) |
| mkswap /dev/sda4 command | Prepares the swap partition |
| swapon /dev/sda4 command | Activates the swap partition |
| cfdisk command | A GUI to create, manipulate, and delete partitions Note: always reboot after using fdisk and cfdisk. |
| gdisk command | (GPT fdisk) Creates and works with partitions on a GPT hard disk |
| parted command | (GNU parted) Creates and modifies partitions on both MBR and GPT HDs |
| Logical Volume Manager (LVM) | Creates logical volumes that can be mounted to directories within the Linux filesystem hierarchy Alternative to creating and mounting filesystems that reside on standard partitions |
| What does the LVM consist of? | Physical volumes, volume groups, and logical volumes |
| Physical Volumes (PVs) | Unused partitions on hard disk drives that the LVM can use to store information |
| Volume Groups (VGs) | Contains one or more PVs. Represents the pools of storage space that are available to the LVm for creating logical volumes. |
| Logical Volumes (LVs) | Usable volumes that are created by the LVM from the available storage space within a LG |
| pvcreate /dev/sda4 command | Creates PVs of unused partition you want the LVM to use |
| pvdisplay command | Displays detailed info about each PV |
| vgcreate vg00 /dev/sda4 command | Creates a VG named vg00 that uses the dev/sda4 PV |
| Physical extent (PE) | Sets the block size of the VG |
| vgdisplay command | Displays detailed info about each VG |
| lvcreate command | Creates LVs from available space in a VG |
| lvdisplay command | Displays info about each LV |
| pvscan, vgscan, and lvscan commands | Display info about PVs, VGs, and LVs |
| vgextend command | Adds a new PV to an existing VG |
| lvextend command | Increases the size of an LV |
| df -h command | (Disk free) Monitors free space used by mounted filesystems (-h indicates human readable option) |
| du -h /usr | more command | View size of directory and its contents -s to summarize output -h for human readable | more - use with large nums of files -i to view the total num of inodes and free inodes |
| Bad Blocks | Unusable areas of a disk |
| fsck command | Checks the filesystem for errors NOTE: THE FILESYSTEM MUST FIRST BE UNMOUNTED! |
| e2fsck command | Checks an ext2, ext3, and ext4 filesystem for errors -c to check for bad blocks |
| tune2fs command | Used to adjust tunable filesystem parameters |
| Disk Quotas | Set user limits to prevent users from using unnecessary space |
| Soft limits | Disk quotas that the user may briefly exceed for a certain period of time |
| Hard limits | can't exceed the limit |
| Type 1 hypervisor | Interacts with the software directly. Contains a small OS to manage the hypervisor (Proxmox) |
| Type 2 hypervisor | Designed to run on an existing machine's OS |
| Kernel Virtual Machine | Built-in Linux hypervisor functionality |
| Thick vs. Thin Provisioning | Thick has a fixed file size, while thin has a dynamically allocated file size |
| Boxes | Used to configure and manage VMs |
| RAID Level 0 | Disk striping. Stripes data across the drives to improve disk read/write efficiency. Does not provide redundancy. |
| RAID Level 1 | Disk mirroring or disk duplexing. Any data written to disk one is also written to disk two. Provides redundancy. |
| RAID Level 5 | Striping with parity, at least 3 disks. If one fails, the parity disk will reconstruct the data. 66% of the drive is open, the rest is used by parity |
| SCSI configuration | Transfer protocol used between a server and a SAN device |
| iSCSI Initiator | A software component within the OS that connects to the SAN device |
| iSCSI Target | Storage that is made available to iSCSI initiator |
| Fibre channel configuration | Used to transport SCSI data |
| ZFS configuration | Zettabyte file system. A high performance filesystem designed for large-scale Linux systems |
| zpool command | Creates a group of physical disks that ZFS can manage |
| BTRFS configuration | Provides many features similar to ZFS, but not as fast as ZFS. Eventually will replace ext4. |
| BTRFS structure | Data (available blocks), metadata (inodes), and system (superblock) |
| mkfs.btrfs command | Creates a btrfs filesystem |
| btrfs command | Manages the btrfs filesystem |
| Things to know when installing Linux server | Host name and IP of the server, auto updating?, package selection, root password |
| tr command | Replaces characters in a file sent via stdin. |
| tee command | Receives information from stdin and sends that information to a file as well as stdout Ex: ls -l | tee file.txt |
| sed command | Stream Editior. Search for and replace text strings. |
| awk command | Searches for patterns of text and performs a specified action on the text it finds |
| set command | Lists environment variables and current values set | less |
| echo $PS1 | Views the contents of the prompt string one shell prompt |
| history command | Display a list of previously used commands |
| Subshell | Created by the current shell to run shell commands |
| export command | Exports user-defined variables to subshells |
| env command | LISTS all exported env and user-defined variables |
| zsh | A superset of the BASH shell |
| Two most common boot loaders | GRUB and GRUB2 |
| GRUB | GRand Unified Bootloader - supports the booting of several different operating systems |
| GRUB Stage 1.5 | Loads filesystem support and stage 2 |
| GRUB Stage 2 | Performs the actual boot loader functions and displays graphical boot loader screen |
| Which file is used to edit the config of GRUB legacy? | /boot/grub/grub.conf |
| GRUB2 | Most common boot loader used on Modern Linux systems |
| Which file is used to edit the config of GRUB2? | grub.cfg (typically in /boot/grub) |
| What command should be run after modifying the /etc/default/grub file or adding scripts to the /etc/grub.d directory? It will rebuild the cfg file | grub2-mkconfig |
| grub2-install | Replaces a damaged GRUB2 boot loader |
| Linux initialization | Systemd and SysV (older) |
| What does the init daemon categorize the system into to manage several daemons at once? | Runlevels |
| Runlevels | Define the number and type of daemons loaded into memory |
| runlevel command | Displays the current and previous runlevel |
| Runlevel 1 / s | Single User Mode |
| Runlevel 2 | Multiuser Mode |
| Runlevel 5 | Graphical Mode |
| What does Ubuntu use instead of runlevels? | Targets |
| Target 0 | poweroff.target |
| Target 1 | rescue.target |
| Target 2, 3, 4 | multi-user.target (no GUI) |
| Target 5 | graphical.target Default for systems with a GUI installed |
| Target 6 | reboot.target |
| .rc scripts | Prepare the system, start daemons, and bring system into usable state |
| Systemd Unit Files | Typically stored in /etc/systemd/system/ |
| With Systemd, what are OS components called? | Units |
| systemctl command | Used to start and stop daemons Can also be used to change between targets |
| systemctl-analyze command | Used to view info about Systemd units |
| X Windows | Linux GUI components |
| New Version of X Windows | Wayland |
| Two most common Linux desktop environments | GNOME and KDE |
| startx command | Starts X Windows and the window manager |
| Epoch Time | Linux kernel stores time as the number of seconds since Jan 1, 1970 |
| hwclock command | View or modify the time within the BIOS |
| locale command | Displays values for locale variables |
| localectl command | Can be used to view and change locale setting |
| CUPS | Common UNIX Printing System |
| IPP | Internet Printing Protocol. Used by CUPS for network printing. |
| lp command | Sends a print job to a printer |
| lp -d command | Specifies the destination printer name. If omitted, the default printer is assumed. |
| CPUS Daemon (cupsd) | Assigns the print job a unique print job ID (spooling) |
| lpstat -t command | Line printer statistics. Lists all printers and their status. |
| cupsaccept command | Instructs the printing system to accept print jobs to specified destinations |
| cupsreject command | Instructs the printing system to reject print jobs to specified destinations |
| cupsenable command | Starts the named printers |
| cupsdisable command | Stops the named printers |
| cupsenable/disable -r command | Indicates a reason for enabling or disabling a named printer |
| cancel command | Removes print jobs from print queue |
| cancel -u command | Removes all the jobs sent by a specified user |
| lpadmin command | Controls or restricts which users can access specific printers |
| Line Printer Daemon (LPD) | Traditional printing system (this was replaced by CUPS) |
| lpr command | Line printer remote. Sends documents to a print queue |
| lpc command | Line printer control. Displays the status of printers |
| lpq command | Displays print jobs in the print queue |
| lprm command | Removes print jobs |
| CUPS vs LPD | CUPS is used in modern versions of Linux. It is more robust and feature rich. It supports LPD and contains versions of the lpd commands. |
| Which file contains information about each printer installed on the system? | /etc/cups/printers.conf |
| Which file contains the settings for cupsd? | /etc/cups.cupsd.conf |
| What is the address for the CUPS web admin tool? | |
| Printer Classes | CUPS allows you to configure collections of printers that can be used as a single unit (class). A print job is sent to the first available printer. |
| What are the most common logging daemons on Linux systems? | System log daemon (rsyslogd) and Systemd Journal Daemon (journald) |
| Syslogd logging format | facility.priority |
| Facility | Area of the system to listen to |
| Priority | Refers to the importance of the info |
| Systemd Journal Daemon (journald) | Replaces the system log daemon on Linux |
| journalctl command | Used to view events within journald. journald creates a socket at /run/systemd/journal/dev-log |
| logrotate command | Back up and clear log files from entries stored in /etc/logrotate.conf |
| /etc/password | Contains user account information |
| /etc/shadow | Contains encrypted password and expiration info |
| Format of /etc/password | name:password:UID:GID:GECOS:homedirectory:shell |
| Which intervals can passwords be set to for expiration? | Min, max, and warn |
| Min | Indicates the num of days a user must wait before changing their password |
| Max | Indicates the num of days a user can use the same password without changing it |
| Warn | Indicates the num of days a user has to change their password before it expires |
| useradd command | Creates a user account |
| Most new user info comes from which two files? | /etc/login.defs and /etc/default/useradd |
| Skeleton Directory | /etc/skel. Contains files that are copied to all new users' home directories when created |
| usermod command | Modify user account information |
| chage command | Modify password expiration information |
| Usermod -L username command | Locks an account |
| passwd -l username command | Locks an account |
| chsh command | Changes default shell to a non-interactive program (also locking a user account) |
| userdel command | Deletes a user account |
| userdel -r command | Removes the home directory for the user and its contents |
| What happens to files that were previously owned by a user who has been deleted? | The UID stays the same, but any future user that is given the same UID will own the files. |
| groupadd command | Adds groups |
| groupadd -G command | Adds members to a group |
| Which file is used to edit groups for a user? | /etc/group |
| groupmod command | Modifies the group name and GID |
| groupdel command | Removes a group from the system |
| usermod -aG group1 maryj | Adds maryj to group 1 (-aG preserves the members' existing group memberships) |
| id command | Displays a list of GIDs for each group |
| newgrp command | Temporarily changes the primary group to another group |
| Memory Leaking | Processes that enter a state that allows them to continually use more memory and do not release their memory when completed |
| ioping command | Monitors performance of a specific storage device |
| iptop command | Input/output top. Displays processes on the system sorted by most disk I/O usage. |
| vmstat command | Indicates whether more physical memory is required by measuring swap |
| free command | Displays total amounts of physical and swap memory |
| top command | Displays CPU statistics |
| uptime command | Displays system load average values |
| sar command | System activity reporter. Displays various system statistics (more info than other utils) |
| iostat command | Input/output statistics. Measures flow of information to and from disk devices |
| pidstat command | PID Statistics. Displays CPU statistics for each process running on the system. |
| mpstat command | Multiple processor statistics. Displays CPU statistics. |
| sysstat command | System Statistics. Contains a wide range of system monitoring utilities. |
| Jabbering | Failing hardware components that send large amounts of info to CPUs |
| What are some common network-related problems? | Network connectivity (ping), network service access, and network latency (tcpdump or Wireshark) |
| What handles the OoO Killer on Ubuntu? | systemd-oomd |
| Out of Memory (OoM) Killer | Kills low-priority processes when system memory is exhausted |
| Reactive maintenance | Correct problems when they arise. Ex: Document solutions and develop better maintenance methods |
| Proactive maintenance | Minimizes the chance of future problems. Ex: performing regular system backups |
| Monitoring | Examining log files or running performance utilities |
| What are the three troubleshooting tasks? | Monitoring, proactive maintenance, and reactive maintenance |
| Security Enhanced Linux (SELinux) | Enforces security on your system using policies that prevent apps from being used to access resources in insecure ways |
| What is the default firewall for Ubuntu that acts as a front end for the iptables firewall? | UFW (Uncomplicated firewall) |
| What are firewall rules based on? | Source IP, destination IP, protocol, packet status |
| iptables command | Creates rules for each chain |
| What are the three chain types which firewall rules are set for? | INPUT, FORWARD, and OUTPUT |
| netfilter | Configures a firewall |
| This contains a database of known web vulnerabilities identified by a CVE number | Open Web Application Security Project (OWASP) |
| What are most vulnerabilities given (hint: it is unique)? | A Common Vulnerabilities and Exposures (CVE) number for identification |
| TCP wrapper functionality | Not only limited to daemons started by inetd and xinetd |
| nmap command | Network mapper. Reveals what network services are running on your network. |
| Polkit framework | Alternative to sudo. Provides a GRANULAR (more restrictive) way to manage system permissions than sudo |
| Realm Daemon (realmd) | Used to discover and join an AD domain |
| System Security Services Daemon (sssd) | Provides LDAP and Kerberos connectivity |
| Active Directory (AD) | Most common authentication service used within organizations today |
| Lightweight Directory Access Protocol (LDAP) | Database stores user information and authentication requirements |
| PAM (Pluggable Authentication Module) | Within /etc/pam.d, each file corresponds to a specific server or application that uses PAM for authentication, authorization, and session mgmt |
| What are some ways to secure a local computer? | Limit physical access, establish a server closet, limit OS access by establishing user account lockout after multiple failed attempts |