2 - Linux Block Test Flashcards

1
Q

UNIX

A

The commercial trademark owned by Bell Labs/AT&T

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

Unix

A

The generic name for all UNIX-like OS

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

Unix-like

A

Refers to absence of proprietary UNIX source code

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

Linux

A

Trademark owned by Linus Torvalds

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

Examples of Unix OSs

A

Mac OS X (Apple)
Solaris (Sun, Oracle)
AIX (IBM)
UX (HP)
Theater Battle Management Core Systems (TBMCS, USAF)
Global Command and Control Systems (GCCS, USAF)

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

Linux Characteristics

A

Flexibility - Many commands and multiple ways to do things

Multitasking - Perform tasks in parallel (ex: Email and DNS server)

Multi-user - Multiple users can log in at same time

Portable - Runs on many different types of hardware

Case Sensitive

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

Kernel

A

Core of OS, interacts w/ hardware

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

User/OS interaction chain

A

User<->Shell<->Kernel<->Hardware

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

Shell Functions

A

Acts as CLI

Performs I/O redirection

Manages the environment

Performs variable and filename substitution

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

Common Shells

A

Bourne Shell (sh) (rewrite of OG UNIX shell)

Bourne Again Shell (bash)

Korn Shell (ksh)

C Shell (csh)

Almquist Shell (ash) (Used in resource-constrained environments)

Z Shell (zsh) (modern, themeable, bash improvement)

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

Kernel Functions

A

Manage creation, scheduling, and termination of processes

Manage memory allocation

Manage filesystem

Perform error handling

Manage I/O

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

Boot Process Phases

A

BIOS
GRUB 1
GRUB 2
Kernel

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

BIOS Phase (Boot Process)

A

POST

Initial hardware setup/config

Boot device selected and boot loader executed

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

Grand Unified Bootloader (GRUB) Stage 1 (Boot Process)

A

Small machine code located on MBR

Sole purpose is to locate and load GRUB stage 2

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

GRUB Stage 2 (Boot Process)

A

Kernel selection menu is presented

Loads initial RAM disk to memory (initrd) (Mounted as pseudo filesystem) (Used by kernel to load drivers for boot)

Loads kernel from the disk into memory

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

Kernel Stage (Boot Process)

A

Initialize/configure memory and hardware

Mounts initrd to load necessary drivers and kernel modules

Mounts root filesystem

Executes /sbin/init

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

cd

A

Change directory

~ is shortcut for home
/ is root
- is previous directory

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

Driver Module

A

Piece of code that can be added to the kernel at runtime

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

Loadable Kernel Modules

A

Add and remove functionality to/from the kernel while the system is running (Ex: Printer drivers)

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

Device Drivers

A

Allow programs to communicate with the systems hardware and peripheral devices

Almost every system operation eventually maps to hardware

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

echo

A

Display arg(s) to STDOUT followed by newline
-n – Omit trailing newline
-e – Enable escape sequences (characters such as \t need to be in quotes)

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

Root Directory

A

/ is top of directory structure

/root is root user’s home directory

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

Home directories

A

Root: /root
Everyone else: /home/USERNAME

Can be referenced in CLI w/ ~

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

Filenames

A

Letters, numbers, and certain punctuation

Avoid special characters

Special characters must be escaped with \ or filename must be in quotes

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

File Privileges

A

Read (r): Read/copy a file
Write (w): Alter the contents
Execute (x): Allows file to execute as a program

User, group, and other

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

Directory Privileges

A

Read (r): See what’s inside directory. ls will return nothing without read permission
Write (w): Alter contents of directory. Required to add or remove files/subdirectories. Execute permission must also be set for this to work.
Execute (x): Required to cd into a directory

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

/etc/passwd

A

Stores user account info
Field 1– Username
Field 2 – Password placeholder
Field 3 – User ID (UID)
Field 4 – Group ID (GID)
Field 5 – Note (Display Name)
Field 6 – Home Folder
Field 7 – Primary login shell

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

/etc/group

A

Stores supplementary group info

Field 1 – Group name
Field 2 – Password placeholder
Field 3 – Group ID (GID)
Field 4 – Users in the group (SUPPLEMENTARY ONLY. Does not show primary group membership)

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

/etc/shadow

A

Stores user account password info
Field 1 – User name
Field 2 – Password field
Subfield 1 – Hash method
Subfield 2 – Password salt
Subfield 3 – Hashed PW
Field 3-8 – PW metadata

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

whatis

A

Prints one-line man page descriptions

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

which

A

Prints command’s executable path

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

whereis

A

Locate binary, source, and man pages for command

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

/proc/PID/cmdline

A

Command and arguments used to invoke the process

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

/proc/PID/environ

A

environment variables

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

/proc/PID/cwd

A

current working directory of process

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

/proc/PID/exe

A

executable of process

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

/proc/PID/stat

A

status info about the process

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

/proc/PID/fd

A

folder with entries for each file the process has open, named by file descriptor, which links to the actual files

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

/proc/cpuinfo

A

CPU and system architecture info

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

/proc/meminfo

A

memory and swap usage

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

/proc/cmdline

A

options used to start the kernel

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

/proc/filesystems

A

filesystems supported by the kernel

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

/proc/modules

A

active kernel modules

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

/proc/mounts

A

mounted devices

44
Q

/proc/uptime

A

system uptime (up:idle)

45
Q

/proc/net

A

network informaiton

46
Q

/proc/version

A

kernel and linux version info

47
Q

systemd

A

first process started by the kernel
has a PID of 1
initializes components that need to be started after kernel is booted
handles service management

48
Q

service unit

A

refered to by systemd to manage service daemons

49
Q

target unit

A

collection of other units

50
Q

Network File System (NFS)

A

Internet standard protocol created by Sun in 1984
Allows file sharing by mounting remote directories using Remote Procedure Calls

51
Q

/etc/exports

A

Where network shares are set up
Field 1 – Share folder location (absolute path)
Field 2 – Who is allowed to access
Field 3 – Options (ro, rw, squash_root, all_squash, sync)
Field 4 – Comments

52
Q

/etc/sysconfig/network-scripts

A

Contains config files named after each interface
Also contains IP, netmask, and gateway settings

53
Q

/etc/resolv.conf

A

File containing DNS server settings

54
Q

iptables Tables

A

Filter – Default table, allows or disallows packets
Mangle – Alter packet headers such as changing TTL values
NAT – Route packets to different hosts on NAT network
Raw – Work with packets before the kernel starts tracking state

55
Q

iptables Chains

A

prerouting – just as packets arrive on network interface

Input – just before packets are given to local process

output – just after packets have been produced by a process

forward – any packets being routed through host (not sent to a process)

postrouting – just as packets leave the network interface

56
Q

Non-terminating Targets (iptables)

A

log
return
goto

57
Q

Terminating Targets (iptables)

A

accept
drop
reject

58
Q

/etc/sysconfig/iptables

A

file used to store firewall rules

59
Q

policy vs target (iptables)

A

Target – What happens to a packet if it matches a rule in a chain
Policy – Default action that happens to a packet if it does not match any rule in a chain. Essentially the default rule

60
Q

/etc/rsyslog.conf

A

Config file that tells which messages are logged and where they are logged to

61
Q

/var/log

A

Holds most system logs, by convention, but not by rule

62
Q

/var/log/messages

A

General system activity log

63
Q

/var/log/dmesg

A

Info about kernel booting and the devices the kernel has found
Viewed with dmesg command

64
Q

/var/log/anaconda.log

A

Linux installation-related logs

65
Q

/var/log/kern.log

A

Kernel logs

66
Q

/var/log/maillog

A

Mail server logs

67
Q

/var/log/secure

A

Info related to authentication and authorization privileges
commands run w/ sudo are logged here

68
Q

/var/log/boot.log

A

System boot logs

69
Q

/var/log/cups

A

Printer and printing logs

70
Q

/var/log/yum.log

A

Log entries related to package installation/removal using yum

71
Q

/var/log/cron

A

Logs created whenever crond or anacron starts a cron job

72
Q

/var/log/lastlog

A

Info about the last login for each user
Viewed with lastlog command

73
Q

/var/log/btmp

A

Info about failed login attempts
Viewed using lastb command

74
Q

/var/run/utmp

A

Info about who is currently logged in
Viewed using who or w command

75
Q

/var/log/wtmp

A

Info about all successful logins/logouts (historical utmp)
Viewed using last command

76
Q

syslog daemon

A

uses the /etc/rsyslog.conf file to process system service log events

77
Q

auditd

A

auditing daemon which processes audit events

78
Q

/var/log/audit/audit.log

A

file where audit events are logged to

79
Q

/etc/audit/audit.rules

A

file containing audit rules to be loaded at startup

80
Q

/etc/audit/rules.d/

A

rules to be compiled by augenrules

81
Q

auditctl

A

command used to create audit rules on the fly

82
Q

ausearch

A

command used to search the audit log

83
Q

/etc/logrotate.conf

A

Configuration file that handles log rotation policy

84
Q

User crontab location

A

/var/spool/cron/USERNAME

85
Q

system crontab location

A

/etc/crontab

86
Q

crond

A

daemon that executes scheduled commands

87
Q

Virtualization

A

process of creating a software-based version of something rather than a physical one

88
Q

Host OS

A

OS running the virtual environment in which guest OSs run

89
Q

Guest OS

A

OS inside a virtual environment

90
Q

Hypervisor

A

Separates the OS from the hardware

Software that allows you to run multiple virtual machines on the same hardware

Two types
Type 1: Bare-metal – Hypervisor runs directly on the hardware and is the host OS itself
Type 2: Hypervisor runs as an application on the host OS

91
Q

Logical resources

A

representation of physical resources

92
Q

Physical resources

A

Actual underlying hardware

93
Q

Types of virtualization

A

Server – One physical machine divided into many virtual servers. Utilizes a hypervisor

Application – VMs in which an application executes, such as java or python VMs. Stream apps from a central location

Network – Combination of multiple networks (VPNs). Logically segment physical network with virtual network devices

Containerization – Contains everything needed to run a piece of software (code, libraries, etc.) but do not virtualize hardware. Shares kernel with other containers.

94
Q

Advantages of virtualization

A

Consolidation of hardware resources allowing multiple instances to run on one machine

Reduced Costs (generally)

OS is tied to hypervisor, not the hardware, making migration/cloning easier

Easier testing with snapshots and lab environments

95
Q

Advanced RISC Machine (ARM) processor

A

Processor typically used in smartphones and tablets

Three Key attributes:
Small implementation size
Good performance
Very low power consumption

96
Q

Instruction sets for ARM processor

A

ARM set – 32-bit instructions
Thumb set – 16-bit instructions
Subset of ARM set’s functionality
Trades reduced performance for improved code density

97
Q

Android OS

A

Open source OS based on linux

Acquired from Danger by Google in 2005

98
Q

Five Android Layers

A

Linux kernel – Lowest level, built on Linux kernel, but Android is NOT Linux

Libraries – Native libraries, low level functionality, etc.

Android Runtime – Dalvik VM, Core Android Libraries

Application Framework – Java libraries used to build apps

Applications – All the apps on the system

99
Q

Android Boot Process

A

Boot ROM
Boot Loader Stage 1
Boot Loader Stage 2
Kernel
Init
Zygote
System Servers
Home Application
Contacts

100
Q

Boot ROM (Android Boot Process)

A

Performs check of all chip components
Detects boot media and locates boot loader
Loads boot loader stage 1 into internal RAM

101
Q

Boot Loader Stage 1 (Android Boot Process)

A

Detects and sets up external RAM
Loads Boot Loader Stage 2 into external RAM

102
Q

Boot Loader Stage 2 (Android Boot Process)

A

Sets up hardware such as networking and additional memory
Looks for linux kernel and loads it into memory
Passes control to kernel

103
Q

Kernel Stage (Android Boot Process)

A

Setup memory protections, caches, and scheduling

Starts init process

104
Q

Init (Android Boot Process)

A

Starts system service daemons in separate processes
Starts Zygote process
Starts Runtime Process, which starts service manager

105
Q

Zygote (Android Boot Process)

A

Runtime process tells Zygote to start System Server
Listens for requests to spawn Dalvik VM instances, and does so

106
Q

System Servers (Android Boot Process)

A

Starts native system servers
Starts Android managed services (those in the Application Framework layer)

107
Q

Home Application (Android Boot Process)

A

Idle screen
After System Server loads all processes, Zygote loads the Home app in a new Dalvik VM
Boot Process Complete