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
File Privileges
Read (r): Read/copy a file Write (w): Alter the contents Execute (x): Allows file to execute as a program User, group, and other
25
Directory Privileges
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
26
/etc/passwd
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
27
/etc/group
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)
28
/etc/shadow
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
29
whatis
Prints one-line man page descriptions
30
which
Prints command's executable path
31
whereis
Locate binary, source, and man pages for command
32
/proc/PID/cmdline
Command and arguments used to invoke the process
33
/proc/PID/environ
environment variables
34
/proc/PID/cwd
current working directory of process
35
/proc/PID/exe
executable of process
36
/proc/PID/stat
status info about the process
37
/proc/PID/fd
folder with entries for each file the process has open, named by file descriptor, which links to the actual files
38
/proc/cpuinfo
CPU and system architecture info
39
/proc/meminfo
memory and swap usage
40
/proc/cmdline
options used to start the kernel
41
/proc/filesystems
filesystems supported by the kernel
42
/proc/modules
active kernel modules
43
/proc/mounts
mounted devices
44
/proc/uptime
system uptime (up:idle)
45
/proc/net
network informaiton
46
/proc/version
kernel and linux version info
47
systemd
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
service unit
refered to by systemd to manage service daemons
49
target unit
collection of other units
50
Network File System (NFS)
Internet standard protocol created by Sun in 1984 Allows file sharing by mounting remote directories using Remote Procedure Calls
51
/etc/exports
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
/etc/sysconfig/network-scripts
Contains config files named after each interface Also contains IP, netmask, and gateway settings
53
/etc/resolv.conf
File containing DNS server settings
54
iptables Tables
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
iptables Chains
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
Non-terminating Targets (iptables)
log return goto
57
Terminating Targets (iptables)
accept drop reject
58
/etc/sysconfig/iptables
file used to store firewall rules
59
policy vs target (iptables)
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
/etc/rsyslog.conf
Config file that tells which messages are logged and where they are logged to
61
/var/log
Holds most system logs, by convention, but not by rule
62
/var/log/messages
General system activity log
63
/var/log/dmesg
Info about kernel booting and the devices the kernel has found Viewed with dmesg command
64
/var/log/anaconda.log
Linux installation-related logs
65
/var/log/kern.log
Kernel logs
66
/var/log/maillog
Mail server logs
67
/var/log/secure
Info related to authentication and authorization privileges commands run w/ sudo are logged here
68
/var/log/boot.log
System boot logs
69
/var/log/cups
Printer and printing logs
70
/var/log/yum.log
Log entries related to package installation/removal using yum
71
/var/log/cron
Logs created whenever crond or anacron starts a cron job
72
/var/log/lastlog
Info about the last login for each user Viewed with lastlog command
73
/var/log/btmp
Info about failed login attempts Viewed using lastb command
74
/var/run/utmp
Info about who is currently logged in Viewed using who or w command
75
/var/log/wtmp
Info about all successful logins/logouts (historical utmp) Viewed using last command
76
syslog daemon
uses the /etc/rsyslog.conf file to process system service log events
77
auditd
auditing daemon which processes audit events
78
/var/log/audit/audit.log
file where audit events are logged to
79
/etc/audit/audit.rules
file containing audit rules to be loaded at startup
80
/etc/audit/rules.d/
rules to be compiled by augenrules
81
auditctl
command used to create audit rules on the fly
82
ausearch
command used to search the audit log
83
/etc/logrotate.conf
Configuration file that handles log rotation policy
84
User crontab location
/var/spool/cron/USERNAME
85
system crontab location
/etc/crontab
86
crond
daemon that executes scheduled commands
87
Virtualization
process of creating a software-based version of something rather than a physical one
88
Host OS
OS running the virtual environment in which guest OSs run
89
Guest OS
OS inside a virtual environment
90
Hypervisor
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
Logical resources
representation of physical resources
92
Physical resources
Actual underlying hardware
93
Types of virtualization
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
Advantages of virtualization
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
Advanced RISC Machine (ARM) processor
Processor typically used in smartphones and tablets Three Key attributes: Small implementation size Good performance Very low power consumption
96
Instruction sets for ARM processor
ARM set -- 32-bit instructions Thumb set -- 16-bit instructions Subset of ARM set's functionality Trades reduced performance for improved code density
97
Android OS
Open source OS based on linux Acquired from Danger by Google in 2005
98
Five Android Layers
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
Android Boot Process
Boot ROM Boot Loader Stage 1 Boot Loader Stage 2 Kernel Init Zygote System Servers Home Application Contacts
100
Boot ROM (Android Boot Process)
Performs check of all chip components Detects boot media and locates boot loader Loads boot loader stage 1 into internal RAM
101
Boot Loader Stage 1 (Android Boot Process)
Detects and sets up external RAM Loads Boot Loader Stage 2 into external RAM
102
Boot Loader Stage 2 (Android Boot Process)
Sets up hardware such as networking and additional memory Looks for linux kernel and loads it into memory Passes control to kernel
103
Kernel Stage (Android Boot Process)
Setup memory protections, caches, and scheduling Starts init process
104
Init (Android Boot Process)
Starts system service daemons in separate processes Starts Zygote process Starts Runtime Process, which starts service manager
105
Zygote (Android Boot Process)
Runtime process tells Zygote to start System Server Listens for requests to spawn Dalvik VM instances, and does so
106
System Servers (Android Boot Process)
Starts native system servers Starts Android managed services (those in the Application Framework layer)
107
Home Application (Android Boot Process)
Idle screen After System Server loads all processes, Zygote loads the Home app in a new Dalvik VM Boot Process Complete