2 - Linux Block Test Flashcards
UNIX
The commercial trademark owned by Bell Labs/AT&T
Unix
The generic name for all UNIX-like OS
Unix-like
Refers to absence of proprietary UNIX source code
Linux
Trademark owned by Linus Torvalds
Examples of Unix OSs
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)
Linux Characteristics
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
Kernel
Core of OS, interacts w/ hardware
User/OS interaction chain
User<->Shell<->Kernel<->Hardware
Shell Functions
Acts as CLI
Performs I/O redirection
Manages the environment
Performs variable and filename substitution
Common Shells
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)
Kernel Functions
Manage creation, scheduling, and termination of processes
Manage memory allocation
Manage filesystem
Perform error handling
Manage I/O
Boot Process Phases
BIOS
GRUB 1
GRUB 2
Kernel
BIOS Phase (Boot Process)
POST
Initial hardware setup/config
Boot device selected and boot loader executed
Grand Unified Bootloader (GRUB) Stage 1 (Boot Process)
Small machine code located on MBR
Sole purpose is to locate and load GRUB stage 2
GRUB Stage 2 (Boot Process)
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
Kernel Stage (Boot Process)
Initialize/configure memory and hardware
Mounts initrd to load necessary drivers and kernel modules
Mounts root filesystem
Executes /sbin/init
cd
Change directory
~ is shortcut for home
/ is root
- is previous directory
Driver Module
Piece of code that can be added to the kernel at runtime
Loadable Kernel Modules
Add and remove functionality to/from the kernel while the system is running (Ex: Printer drivers)
Device Drivers
Allow programs to communicate with the systems hardware and peripheral devices
Almost every system operation eventually maps to hardware
echo
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)
Root Directory
/ is top of directory structure
/root is root user’s home directory
Home directories
Root: /root
Everyone else: /home/USERNAME
Can be referenced in CLI w/ ~
Filenames
Letters, numbers, and certain punctuation
Avoid special characters
Special characters must be escaped with \ or filename must be in quotes