ITEC400 Final
Perl scalar ($), array (@), and hash (%) prefixes
$ singular variables prefix (single value, number or string) @ prefix for plural variable (array) % prefix for plural variable (hash)
Shell $#, $$, #, and $!
$# number of positional parameters (count) $@ stores all the arguments entered on command line ("$1", "$2") $! PID of last program shell ran in the background $$ process PID $ provides content variable ($NUMBER) # is the prefix for shell and Perl comments.
Ctrl c
(SIGINT) - is a signal - can wake up a process
Advantages of Multithreaded Processes
-All the threads of a process share its resources such as memory, data, files etc. A single application can have different threads within the same address space using resource sharing. -It is more economical to use threads as they share the process resources. Comparatively, it is more expensive and time consuming to create processes as they require more memory and resources. -Program responsiveness allows a program to run even if part of it is blocked using multithreading. This can also be done if the process is performing a lengthy operation. -In a multiprocessor architecture, each thread can run on a different processor in parallel using multithreading. This increases concurrency of the system. This is in direct contrast to a single processor system, where only one process or thread can run on a processor at a time.
Disadvantages of multithreaded
-Multithreaded processes are quite complicated. Coding for these can only be handled by expert programmers. -It is difficult to handle concurrency in multithreaded processes. This may lead to complications and future problems. -Identification and correction of errors is much more difficult in multithreaded processes as compared to single threaded processes.
Run level numeric values (0-6) and the functionality of each run level
0 - halt (Do NOT set initdefault to this) 1 - Single user mode 2 - Multiuser, without NFS (The same as 3, if you do not have networking) 3 - Full multiuser mode 4 - unused 5 - X11 6 - reboot (Do NOT set initdefault to this)
init login process
1. Init process spawns the getty or minigetty process. 2. The getty process invokes the login process. After the user name has been entered, it is passed to the login process. 3. The login process prompts the user for a user password and verifies it. If authentication is successful, the user's shell is created. Otherwise, a failure causes an error message, ends and then init process will respawn getty or minigetty. 4. The user's preferred shell will be invoked creating a session. 5. Eventually, the user will logout.
/proc filesystem uses
1. Querying statistical information 2. Hardware information 3. Changing runtime parameters 4. Viewing and changing network and host parameters 5. Memory related information
/etc/password file fields and field separators
1. Username 2. Password (x is encrypted) 3. User ID (0 is root, 1-99 predefined, 100-999 admin) 4. Group ID (stored /etc/group) 5. User ID Info (Full name, phone, etc) 6. Home directory path(absolute home path, / does not exist) 7. Default command shell (sysadmin may use nologin)
/etc/shadow file fields and field separators
1. Username, 2. Encrypted password ($id$salt$hashed) 3. Date of last passwd change 4. Minimum (days between change) 5. Maximum (days between change) 6. Warn (# of days in advance about expiration) 7. Inactive (days after expire to disable) 8. Expire (account expiration date)
Every program (apart from, say, a daemon process) is expected to have three file streams
1. for getting input has a file descriptor of "0" (stdin). 2. for writing output has a file descriptor of "1" (stdout). 3. for writing errors has a file descriptor of "2" (stderr).
How many partitions can a hard disk have? What if you wanted two operating systems?
A hard disk can have several partitions. Each partition functions as if it were a separate hard disk. The idea is that if you have one hard disk, and want to have, say, two operating systems on it, you can divide the disk into two partitions. Each operating system uses its partition as it wishes and doesn't touch the other ones. This way the two operating systems can co-exist peacefully on the same hard disk. Without partitions, one would have to buy a hard disk for each operating system.
soft (symbolic) links
A symbolic link, also termed a soft link, is a special kind of file that points to another file, much like a shortcut in Windows or a Macintosh alias. Unlike a hard link, a symbolic link does not contain the data in the target file. It simply points to another entry somewhere in the file system. This difference gives symbolic links certain qualities that hard links do not have, such as the ability to link to directories, or to files on remote computers networked through NFS. Also, when you delete a target file, symbolic links to that file become unusable, whereas hard links preserve the contents of the file.
Inverted tree topology
All of the files in the UNIX file system are organized into a multi-leveled hierarchy called a directory tree. A family tree is an example of a hierarchical structure that represents how the UNIX file system is organized. The UNIX file system might also be envisioned as an inverted tree or the root system of plant. At the very top of the file system is single directory called "root" which is represented by a / (slash). All other files are "descendents" of root. The number of levels is largely arbitrary, although most UNIX systems share some organizational similarities.
Perl @_
All parameters to a function are stored in an array called @_. One side effect of this is that you can find out how many parameters were passed by evaluating @ in a scalar context. Perl lets you pass any number of parameters to a function. The function decides which parameters to use and in what order. The @_ array is used like any other array.
telinit
Change system runlevel on on a UNIX/LINUX/HP UX systems/Solaris.
diff
Compare files line by line.
Package manager components
Components include a database, checksum, package system, dependency, upgrade, and un-initialization.
Crontab Utilization
Cron is the periodic event scheduler of your system. cron enables users to schedule jobs (commands or shell scripts) to run periodically at certain times or dates. It is commonly used to automate system maintenance or administration, though its general-purpose nature means that it can be used for other purposes, such as connecting to the Internet and downloading email.
A dig command is a flexible tool for interrogating
DNS name servers. It performs DNS lookups and displays the answers returned from the name server(s) that were queried. Most DNS administrators use ¬¬¬¬____ to troubleshoot DNS problems because of its flexibility, ease of use and clarity of output. The host DNS lookup tool has less functionality than _______.
Umask variable
Default permissions for a file and a directory are determined by this variable value located in the .profile or .bash_profile.
Super-block entries
Each mounted file system represents an entry.
fork and exec
Each process is started from a previous process using the fork and exec command. If command is specified, it replaces the shell. No new process
UNIX-like operating system security issues
Files and directories, umask, PATH variable, SELinux, iptables, TCP Wrapper, chroot jail, password authentication, UNIX to UNIX commands, One-way function
FreeBSD
Free open source Unix-like operating system developed from Berkeley Software Distribution based on Linux Research. FreeBSD has similarities with Linux, with two major differences in scope and licensing: FreeBSD maintains a complete system, i.e. the project delivers a kernel, device drivers, userland utilities, and documentation, as opposed to Linux only delivering a kernel and drivers, and relying on third-parties for system software;[5] and FreeBSD source code is generally released under a permissive BSD license, as opposed to the copyleft GPL used by Linux.
Why was the shell process created?
From a system architectural perspective, the process was created to keep the size of the kernel small.
Define fsck
Fsck is used to check and optionally repair file systems. If no file systems are specified on the command line, and the -A option is not specified, fsck will default to checking file systems in /etc/fstab serial.
GID
Group ID
Symbolic links compared to physical links
Hard link: cannot span different file systems (local only). Soft link: can span device boundaries
Linux Kernel Modules
Hardware in Linux is handled by kernel drivers, many come from kernel modules. These are standard driver files, which are stored in the /lib/modules directory. Typically, Linux loads the needed modules at boot time.
What is a race condition?
In computer memory or storage, a race condition may occur if commands to read and write a large amount of data or received at almost the same instant and the machine attempts to overwrite some or all of the old data, while the old data is still being read.
Copy-on-Write
It is an optimization strategy for multiple users can give the same pointer for a resource. The primary advantage is that if a caller never makes any modifications, no private copy is needed. This strategy is used in virtual memory operating systems pages in memory that might be modified by either the process or its copy are marked copy-on-write.
Kernel space compared to user space
Kernal space is smaller than user space. You don't want to have to reallocate memory just because your want to enhance the kernel.
less
Less is a program similar to more (1), but which allows back ward movement in the file as well as forward movement.
ls -a
List information about the FILEs (the current directory by default). -a (all) do not ignore entries starting with .
The most common encryption method used by Linux operating systems (denoted by the prefix is $1$)
MD5 encryption
more
More is a filter for paging through text one screenful at a time.
File permissions (rwx------) ---
Numeric value (700)
Daemon processes
Offer services like web pages serving, email transferring, time synchronization, and similar. They usually consume little CPU and memory, and run quietly without user interaction. They mainly communicate with other computer programs, or with other computers via network.
Foreground compared to background processes
Once a Background Process is launched by the terminal, it becomes unattached to the terminal that launched it. The Foreground process remains attached at all times. The ampersand character (&) at the end of a script name tells the terminal to make it an unattached background process. Unix calls both only processes.
@ARGV
Perl array variable containing command line arguments
who
Print information about users who are currently logged in.
head
Print the first 10 lines of each FILE to standard output.
tail
Print the last 10 lines of each FILE to standard output.
PID
Process ID
Nonvolatile memory devices
ROM, flash memory, and NVRAM.
Examples of what Cron does
Regular daily backups, Periodic mail checking, Polling a device(s) for input, Sending regular reports, Sending user email every time a cron function is performed
bg
Resume each suspended job jobspec in the background, as if it had been started with &. If jobspec is not present, the shell's notion of the current job is used. bg jobspec returns 0 unless run when job control is disabled or, when run with job control enabled, any specified jobspec was not found or was started without job control. Continues a stopped job in the background
fg
Resume jobspec in the foreground, and make it the current job. If jobspec is not present, the shell's notion of the current job is used. The return value is that of the command placed into the foreground, or failure if run when job control is disabled or, when run with job control enabled, if jobspec does not specify a valid job or jobspec specifies a job that was started without job control. Continues a stopped job by running it in the foreground, some shells are not able to run this command
Single thread compared to multi-threaded processes
Single threaded processes contain the execution of instructions in a single sequence. In other words, one command is processes at a time. The opposite of single threaded processes are multithreaded processes. These processes allow the execution of multiple parts of a program at the same time. These are lightweight processes available within the process.
T/F Directory data cannot be displayed using cat command
TRUE directory data is stored in binary
Tar
Tar creates one large file called a heap that contains a collection of many files and directories. A tar file occupies a large amount of space for the files and directories, and a bit more. A tar file is not compressed. The extension for a tar file is .tar.
LDAP
The Lightweight Directory Access Protocol (LDAP) is a set of open protocols used to access centrally stored information over a network.
Define the daemon process, xinetd
The Linus xinetd daemon is said, "to be a more secure replacement for the inetd superserver". The xinetd superserver listens for network connections. When a connection is made, it launches a specific daemon and forwards the data from the socket to the daemon's standard input. Basically, the xinetd superserver works on-demand.
Define Solid State Device (SSD)
The SSD actually does not have an actual disk or motors to drive the disks. There are no moving parts inside this device. It is a data storage device that uses integrated circuit assemblies as memory to store data persistently. The SSD technology uses electronic interfaces compatible with traditional block input and output HDD, which permits simple replacement in common applications. A new input and output interface like SATA Express was created to keep pace with the speed advancements in the SSD. When compared to electromechanical disks, SSD are more resistant to physical shock, operates silently, has a lower access time, and has less latency. Since 2012, the price of SSDs has declined.
Two true statements about the fsck utility
The fsck utility does not make corrections to a mounted file system, and inaccurate error messages are likely to be output when a file system is mounted.
Data structure
The fundamental constructs around which you build your programs. Provides a particular way of organizing data so it can be accessed efficiently, depending on your use case. A collection of one or more variables. Different variable grouped together under a single name of storage.
Filter commands
The grep, cut, and awk commands.
Crontab character for all values
The use of the "*" (asterisk) character represents all values.
umask
The user file-creation mask is set to mode. If mode is omitted, the current value of the mask is printed.
Lost+found folder recovery
This folder contains the files with no links and files to be recovered. Any file to be recovered will remain in this folder. Fsck command is used to recover these files.
Lost+found Directory
This is an important directory which is useful for recovering files which are not closed properly due to many reasons such as power failure.
T/F A Perl filehandle name can be different than the original file name
True
During boot-up, the init process executes a series of tasks
Two of these tasks are to determine memory size and designing and initializing paging areas.
System V
Unix System V (pronounced: "System Five") is one of the first commercial versions of the Unix operating system. It was originally developed by AT&T and first released in 1983. Four major versions of System V were released, numbered 1, 2, 3, and 4. System V Release 4 (SVR4) was commercially the most successful version, being the result of an effort, marketed as Unix System Unification, which solicited the collaboration of the major Unix vendors. It was the source of several common commercial Unix features. System V is sometimes abbreviated to SysV.
bzip2 / bunzip2
Used to compress and decompress tar files. File extension .bz2.
UID
User ID
Wait system call
When a child process ends, the kernel sends a SIGCHILD signal to the parent. If the parent responds with this call, the child processes allocated resources reaped from the system call are returned to the operating system.
Bootloader
When a computer with Red Hat Enterprise Linux is turned on, the operating system is loaded into memory by a special program called a boot loader. A boot loader usually exists on the system's primary hard drive (or other media device) and has the sole responsibility of loading the Linux kernel with its required files or (in some cases) other operating systems into memory.
zombie
When a process is terminated or terminates on its own, but only partially exits the system, its presence can be displayed on the system as being in a Z state <defunct>. ps - aux.
Why is single user mode so important for the system administrator?
When a system admin puts the system into single user mode, it is because they do not want to make updates or corrections to the system while the user community is able to do reads and writes at that particular time. This could obviously propose problems!
Samba
Windows interoperability suite of programs for Linux and UNIX that allows the communication between very different operating systems.. Example - when a Linux systems wants to 'talk' with a Windows systems (perhaps to share files), it is done through an interface called ¬¬¬¬¬¬¬¬_________.
Can an array always grow dynamically in Perl?
Yes. In Perl, an array's length does not have to be declared and array can grow dynamically during run time.
BIOS (Basic Input Output System) role
a 64K by 8 bit wide ROM mounted on the motherboard. Tests the system, initialize some I/O devices, recognize the hardware devices (basic power test), and load the operating system. Once, the operating system is loaded, the _______ works with the operating system to enable access to the hardware devices. At this point, the _______ provide basic input/output services to the operating system and applications.
Filehandle
a FileHandle associates a name to an external file, that can be used until the end of the program or until the FileHandle is closed.
Child process inherited attributes are
a child process does not inherit all attributes from the parent. Parent specific attributes are file locks, parent resources, and pending signals.
System Panic
a fatal error you cannot recover from. You have to reboot the machine. usually seen when you are reloading a machine during an update
crontab utility
a file which contains the schedule of entries to be run and at specified times.
SIGTERM
a generic signal used to cause program termination. Unlike SIGKILL, this signal can be blocked, handled, and ignored. It is the normal way to politely ask a program to terminate. The shell command kill generates SIGTERM by default.
Filter program
a program designed to read a stream of input, it may transform the data in some way and then output some new data.
Firmware
a program that is embedded in your hardware device. It can be stored in flash memory or as a binary image file that can be applied/loaded onto existing hardware by the user. ¬¬¬¬¬¬¬¬¬¬¬¬¬_______ is a combination of hardware and software.
Superblock
a record of the characteristics of a filesystem, including its size, the block size, the empty and the filled blocks and their respective counts, the size and location of the inode tables, the disk block map and usage information, and the size of the block groups.
Chroot jail
a security procedure that restricts users and processes from accessing the entire root file system.
Host command
a simple utility for performing DNS lookups. It is normally used to convert names to IP addresses and vice versa. When there are no arguments or options given, ________ command displays a summary of its command line arguments and options.
CMOS
a transistor which is a semiconductor component used in the design and manufacturing of computers. It is one of the most important components in today's computer technology. ________ was first developed back in the 1950s. A ________ is a chip, which consists of a large array of transistors arranged in a series.
The purpose of the /etc/inittab during bootup (Linux)
access the init default run level variable
Wait command
action keyword executed only when a specific run level is reached. Typicall the respond action statement is used with TTY - get process ID.
shutdown initiation
all logged-in users and processes are notified that the system is going down, and no further logins are allowed.
Hard (physical) links reference
allow resources to be referenced by a different filename or an alias. Can reference all attributes of inode (type, size, data blocks, access mode)
telnet
allows log in to remote system. If you are within network there is no security - trusted employees.
EBCDIC
an 8-bit character encoding used by IBM.
Linux Virtual File System
an interface component that bridges the kernel and the file system and is utilized in ext4fs file system. Acts as a mediator - conveying information from the kernel to the user and sending information from the user to the kernel.
Apache Web Server (httpd)
an open source software application
Copy on write (COW)
an optimization strategy for multiple users can give the same pointer for a resource. The primary advantage is that if a caller never makes any modifications, no private copy is needed. This strategy is used in virtual memory operating systems pages in memory that might be modified by either the process or its copy are marked __________.
Foreground processes
attached to the terminal session.
Backingup up superblock
backups that are automatically generated on a regular routine basis. Other methods involve storing the superblock backup offline - so if something happens to the other superblock, it can be replaced.
Be able to recognize the major and minor numbers in an output display
brw-rw---- 1 root disk 8, 1 Aug 14 01:05 sda1---- Major no. 8, minor no. 1 brw-rw---- 1 root disk 8, 2 Aug 14 01:05 sda2 --- Major no. 8, minor no. 2
Edit crontab with
can be edited using the "vi" editor.
Domain name
can be identified with one or more IP addresses
tail -f
can be used to keep the file open in the background, while trying to access it with another process. (example: # tail -f /proc/sleep &)
CGI scripts
can generate HTML dynamically and are located in the default shell
Superuser on a system
can terminate other user processes.
Write a one-liner to extract information from the /etc/passwd file
cat /etc/passwd or grep dani /etc/passwd
umask -S
causes the mask to be printed in symbolic form; the default output is an octal number.
sar -d
command displays Major and Minor Numbers
ps -ef
command is a full listing of all the processes used in operating system.
The tail -f /tmp/u_monitor_csv command
command outputs continuous appended data as a file grows. (The /tmp/u_monitor.csv file was the stdout from the tail.sh script executed in class.)
useradd <name of user>
command to add unique user name to the system
PTS
considered a pseudo-terminal master and slave
A shell process
considered another application.
Software Package
consists of an archive of files along with information about the package like its version, a description, and the like. There is also an API library, permitting advanced developers to manage such transactions from programming languages such as C, Perl or Python.
initrd (Initial RAM desk) daemon
contains a set of hardware drivers that are downloaded during the system initialization. provides the capability to load a RAM disk by the boot loader. This RAM disk can then be mounted as the root file system and programs can be run from it. Afterwards, a new root file system can be mounted from a different device. The previous root (from ¬¬¬¬¬______) is then moved to a directory and can be subsequently unmounted.
Ulimit command
controls the limits on system resources, such as, process data size, process file size and virtual memory.
orphan
created as a result of client/server configuration disconnect) ( re-parenting by the init process. The orphan process will then be assigned a PPID of 1.
Init process creation
created by the kernel using a non-traditional procedure called hand-crafted or spontaneous.
Identify file types (c, b, l, -, d, and hard link)
d: directory, c: character device file, b: block device file, l: symbolic link, -: regular file
Use declaration in Perl
declaration used to input modules into a program/script.
Thread
defines the amount of work performed by a process.
SELinux was developed by
developer by NSA to restrict the kernel's functionality.
/dev
devices directory
The difference between TTY and PTS
difference is the type of connection to the computer. TTY ports are direct connections to the computer such as a keyboard/mouse or a serial connection to the device. PTS connections are SSH connections or telnet connections. All of these connections can connect to a shell which will allow you to issue commands to the computer.
/opt
directory designated for stood good sized optional software. You can always borrow space in this directory if you have a critical storage problem temporarily until a process completes and then you replace it.
cat /proc/pci
display all PCI device on your system
shutdown command
ensure the safest and most reliable way to bring a system down. shutdown [OPTIONS] [TIME] [MESSAGE: appears as broadcast to all users]
A Fully Qualified Domain Name (FQDN) is equivalent to
equivalent to an absolute pathname.
Upstart Boot Service
event driven, so it contains scripts that are activated on demand, which makes the boot process a lot faster. Use by Linux.
The best method for recovering an alternate superblock
execute fsck.
A daemon process
executes on demand making resource utilization better. The system resources that benefit are less CPU and RAM utilization.
Ext2fs, ext3fs, ext4fs
file system levels
$HOME/.profile
file that is automatically executed during the bootup. Execution of the ________ sets up the user environment after a successful login and user authentication.
/tmp
files stored temporarily that are cleared out at boot or shut down
init process
flexible. can be created by either the master boot record or the kernel during a startup bootup.
NFS (Network File System)
for sharing volumes over a network. Once the ________ share gets configured, clients use the mount command to mount the share. Once mounted, the share appears as just another directory on the client system.
Full Back ups
full backups make a complete copy of all the data on your system. Some Linux admins do a full backup by default for smaller folders or data sets that don't eat up a lot of storage space. Because they tend to require a significant amount of space, admins responsible for larger sets of data usually only run full backups periodically. The problem with this approach is that it can create lengthy gaps that put your data at greater risk
/etc/group file fields
groupname:group-password:GID:username-list
Benefits of Ext4fs
has greater storage capacity, journaling, real time transaction recoveries can be faster and more secure if unexpected interrupts occur, such as power failure, lightning or something like that.
Child process
has one parent
Major Number
identifies the device class or group, such as a controller for several terminals. For example, to tell the kernel which device drivers open routine to call. Identifies the driver associated with the device.
Identify an orphan process in an output listing
if the parent is terminated prior to its child process, the child process is left without a parent. This situation results in the child process becoming an orphan and the init process becomes its new parent process. The orphan process will then be assigned a PPID of 1.
MBR (Master Boot Record)
information about how a hard disk is partitioned in its first sector (that is, the first sector of the first track on the first disk surface). The is the sector that the BIOS reads in and starts when the machine is first booted. The ¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬_____________ contains a small program that reads the partition table, checks which partition is active (that is, marked bootable), and reads the first sector of that partition, the partition's boot sector (the __________ is also a boot sector, but it has a special status and therefore a special name). This boot sector contains another small program that reads the first part of the operating system stored on that partition (assuming it is bootable) and then starts it. Organization of the partition table in the master boot record sets the boundaries for maximum addressable storage space on your disk drives and solid state drives.
crond
initiates all timed events recorded in the cron tab every minute. The cron tab becomes active on any system every minute.
The Linux operating system design
is a monolithic design.
Monolithic kernel
is a single large process running entirely in a single address space. It is a single static binary file. All kernel services exist and execute in the kernel address space. The kernel can invoke functions directly. Examples of monolithic kernel based OSs: Unix, Linux.
BIND (Berkley Internet Name Domain)
is an implementation of DNS domain name system protocol. It is the defacto standard as a software product that is a name service that resolves domain names to IP addresses and vice versa. Incoming/outgoing.
A top-level domain (TLD)
is one of the domains at the highest level in the hierarchical Domain Name System of the Internet. The top-level domain names are installed in the root zone of the name space. For all domains in lower levels, it is the last part of the domain name, that is, the last label of a fully qualified domain name (FQDN).
mount
is used to attach a file system to a current file system hierarchy like root
Monolithic design
is where all code is executed in kernel addresses space to increase the performance of the system.
When a zombie's resources get reaped from an operating system
its PID, system resource allocations, and process table is returned to the operating system for re-use
Linux file system superblock
located at the beginning of each partition.
MBR location on disk
location on on Track 0, Sector 1 on a hard disk.
Exportfs command
maintains the current table of exports for the NFS server. The /etc/exports file contains an entry for each directory that can be exported to NFS clients.
Major goal of the Master Boot Record (MBR)
major goal is to load the kernel.
xinetd (eXtended InterNET Daemon) Linux
manages Internet-based connectivity. It offers a more secure extension to inetd because it functions on demand for network connectivity. Runs by demand and it only runs when necessary. Not continuously.
Inodes store
metadata, the most recent file access and modification times. It does not store the name and actual data of the file.
nice command
modifies the scheduling priority of a process. the highest numeric value that can be assigned is -20 and 19 the lowest.
Getopt::Std
module provides two functions, getopt and getopts
File systems must be mounted to
must be mounted to the root file system before they can be used
sudo shutdown
no options means default power off
Orphan process
no parents.
cat /proc/interrupts
number of iterrupts per IQR on architecture
The numeric value for stdin, stdout, and stderr
numerica values are 0, 1, and 2, respectively.
filename
often found in /etc/rc or /etc/inittab - but this location can change based on OS.
Used by Linux to ensure user password?
one-way encryption or one-way function
Perl open statements
open(my $fh, "<", "input.txt") --- reading from a file. Open gets invoked with three arguments: the required FILEHANDLE (usually an empty scalar variable), followed by MODE (usually a literal describing the I/O mode the filehandle will use), and then the filename that the new filehandle will refer to.
Perl modules
packages of re-usable subroutines and variables
File Manager
performs somes text editing functions for the super block
There are 2 different types of permissions in UNIX/Linux
permission class groups (owner, group, other) and permission types (r=4 w=2 x=1)
kill -l
print a list of signal names
cat /proc/mounts
provide list of all mount points in use by the system
Unique PIDs range
range is 2 through 32,768.
Incremental backups
record all data that has changed since performing your last backup - full or incremental. If you perform a full backup on Sunday evening, you can run an incremental backup on Tuesday evening to hit all the files that changed since that first job. Then on Thursday, you run a job that copies all changes made since Tuesday, so on and so forth. In a nutshell, the incremental method creates a chain of backups. These backups are stacked in order from your original starting point.
TTY
refers to the terminal that is running the process
df
report file system disk space usage
The struct_vfs mount data structure represents
represents all mounted Linux file systems.
User's default shell type and home directory path reside
reside in the /etc/passwd file.
The name of a file and the file's inode number reside
reside outside the inode. The file name is a directory entry.
When a runlevel is changed
running processes that not specified for the new level are killed. The unwanted process are first sent a CIGTERM signal and then a CIGKILL signal.
Cock tic
same as a cycle, the smallest unit of time recognized by a device. For personal computers, ___________ refer to the main system clock, which runs at 66 MHz. There are 66 million ___________ (or cycles) per second. Since modern CPs execute up to 3 GHz, the CPU can execute several instructions in a single _________.
Be able to identify major and minor numbers in a display
sar -d 12:00:01 AM DEV 12:05:01 AM dev8-0 (Maj=8, Min=0) 12:05:01 AM dev253-0 (Maj=253, Min=0) 12:05:01 AM dev253-1 (Maj=253, Min=1)
cat /proc/1/cmdline
see command line entry for init #returns init[5]
The umask value of 000
sets the default directory permissions to 777.
The Unix Domain Sockets
socket that allows two-way communications. Unlike a pipe, which is used to communicate in one direction. One of the most common domains sockets communicate over is the Internet, but we won't discuss that here. Sockets are communication points on the same or different computers to exchange data. Sockets are supported by Unix, Windows, Mac, and many other operating systems. Sockets use system calls to the kernel to complete each level of connectivity
Kernel space
space allocated specifically for the kernel. Users are not able to access this area. This area is generally larger than user space. The kernel is never swapped out to disk.
User space
space in memory where all user mode applications execute. Applications executing in this space are subject to being swapped out to disk.
inetd (UNIX)
starts programs that provide Internet services. Runs all the time.
Incremental backup
stores all files that have changed since the last full, differential or _______________. The advantage of an ______________ is that it takes the least time to complete. However, during a restore operation, each ___________ must be processed, which could result in a lengthy restore job.
Kill command permission
super user or root can kill/terminate other user processes on a system, users do not have this permission
Command to Compress / zip
tar -cvzf new_tarname.tar.gz folder-you-want-to-compress
Command to UnCompress / unzip it
tar -xzvf tarname-you-want-to-unzip.tar.gz
sudo shutdown -r
tells the system to reboot
kill
terminate (delete) the process from the process table
A file system ensures
that stored data remains constant
The init process reads which files?
the /etc/inittab and /etc/fstab files.
Red Hat Linux Enterprise Release 6.0 uses
the Upstart boot-up procedure, rather than System V.
Multi-threading
the ability of a program or an OS process to manage its use by more than one user at a time, and even to manage multiple requests by the same user without having to have multiple copies of the program running in the computer.
Kernel
the central component of most operating systems. The kernel is responsible for managing the system's resources and the communications between hardware and software.
If a parent DOES NOT issue a wait system call
the child will not receive any more CPU time, it will become a zombie.
etc/inittab file
the configuration file used by the System V (SysV) initialization system in Linux. This file defines three items for the init process: the default runlevel. what processes to start, monitor, and restart if they terminate (action words - wait, respawn, and initdefault)
The NODEV string in the first column of the file systems means
the file system does not require a block device to be mounted because it is a virtual file system.
Microkernels
the kernel is broken down into separate processes, known as servers. Some of the servers run in kernel space and some run in user-space. All servers are kept separate and run in different address spaces. Servers invoke "services" from each other by sending messages via IPC (Interprocess Communication). This separation has the advantage that if one server fails, other servers can still work efficiently. Examples of microkernel based OSs: Mac OS X and Windows NT.
When the target file (.o) has an older time stamp than a dependency file (.header .c)
the make command will rebuild the entire dependency rule.
During the boot-up procedure instructions loaded into memory from
the non-volatile memory device such as read only memoray RAM, flash memory, NV ram.
Zombie process
the process is already dead.
Parent of root directory
the root directory is the only directory that is its own parent. The . and the .. are the same in root. The parent directory of root is root.
A child process PPID value
the same value as the parent's PID.
Full backup
the starting point for all other types of backup and contains all the data in the folders and files that are selected to be backed up. Because _________ stores all files and folders, frequent _________s result in faster and simpler restore operations. Remember that when you choose other backup types, restore jobs may take longer.
Lost+found is created by
the system at the time of Linux OS installation for each hard drive or partition we create. In other words, we can say the mounted folder contains this lost+found folder i.e. /home/lost+found contains orphaned data from home partition.
init process
the very first process that is created when you start up a Unix-based machine, which means that all other processes can somehow trace ancestry back to this process. The init process is normally started when the Kernel calls a certain PID = 1
cat /proc/stat
track a variety of different stats about the system since it was last restarted
The DNS
translates Internet domain name and host names to IP addresses. DNS automatically converts the names we type in our Web browser address bar to the IP addresses of Web servers hosting those sites.
Minor numbers
typically used to distinguish sub-devices under a controller. Used by the kernel to determine exactly which device is being referred to.
Background processes
unattached to the terminal session.
Perl module utilization
use File::stat
Perl use declaration
use happens at compile-time and use, in addition to loading a module, also imports some functions into the current name-space. Because Perl does not require you to declare a variable before using it, it offers a USE declaration called strict, to ensure a variable is declared before being using. Use is also used for warnings and many other modules.
Perl stat command
used to access thirteen pieces of information about a file through a script.
The dd statement
used to create a new file
who -r
used to display the current run level.
The Second part of the MBR
used to locate the boot loader. It resides on the "Active" partition known as the Boot Sector.
Journaling
used to repair any inconsistencies that occur as the result of an improper shutdown of a computer. Such shutdowns are usually due to an interruption of the power supply or to a software problem that cannot be resolved without a rebooting. Journaling filesystems write metadata (i.e., data about files and directories) into the journal that is flushed to the HDD before each command returns.
/bin
user binaries (programs) that must be present when the system is mounted in single-user mode.
/etc
user-specific configuration files are located in each user's home directory, which can generally be edited by hand in a text editor. Contains /passwd, /shadow, and group file. All three are effected when new user is put on the machine.
Microkernel design
uses system calls to implement minimal OS services such as memory management, multitasking, and inter process communication
gzip
utility -compresses a tar file. The compressed file extension becomes tar.gz.
System requirements
vary because they are platform dependent. Calculations for disk, memory, swap space, database size, and global, User, and routine buffers are required.
ps -aux
view status of all processes
/proc
was originally developed to correspond to active process entries in the kernel process table, and most recently the /proc directory is used to also store info to enable runtime dynamic configuration (memory, devices mounted, hardware config).
SIGCHLD
when a child process ends, this signal is sent to the parent process from the kernel indicating the child has finished its CPU cycles (done receiving CPU).
Inode
where Hard links, file size and file permissions are categorized under mode are metadata there are stored
fsck utility
will go through the system after a power failure or crash and try to recover any corrupt files that it finds. ¬¬¬¬¬_____ may find bits of "orphaned" or corrupted files in the file system. If it does, ______ removes those corrupted bits of data from the file system and places them in the lost+found folder.
Inode data structure
• Inode number • Mode information to discern file type and also for the stat C function • Number of links to the file • UID of the owner • Group ID (GID) of the owner • Size of the file • Actual number of blocks that the file uses • Time last modified • Time last accessed • Time last changed
Five commonly used Unix-like systems tar command options - c, z, f, v, x
• c = create a new tar file • v = verbose , display file to compress or uncompress • f = create the tar file with filename provided as the argument • z = use gzip to zip it • x = extract file