UNIX Flashcards

1
Q

UNIX

A
  • Multi-user, multi-tasking operating system

- architecture-independent operating system (can work on most things)

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

History

A
A&T labs
-Thomson and Ritchie 1970
-academic research operation system
-first “portable” (take from one system to another)
Berkeley standard distribution 
-cheap, first standard network support
-Linux, CentOS7
Android
-intro in 2008
-uses Linux/ UNIX
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Pros and cons of UNIX when made

A

Pros: flexible, extensive (add new pieces), file sharing
Cons: security, robustness, performance

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

Why use UNIX

A

Multiuser

  • remote processing (use in background)
  • stable (safe)
  • highly modular (how we group functionality together and how we use it)
  • some free (open source)
  • large user community
  • “tools are mature” (have become efficient, usable)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Kernel

A
  • the brain of the system, communication with devices
  • is protected core of the OS
  • large and complex
  • memory allocation, file system
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Shell

A
  • responsible for communication between user and hardware
  • job control (scheduling tasks)
  • many shells (sh, bash, ksh)
  • interprets your typed commands in order of what you want
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

File system

A
  • organization of files
  • mapping blocks of data from physical storage onto logical blocks users can manipulate
  • arranged in tree like structures
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

File

A

An abstraction that allows us to understand it but to the computer it’s just data or memory

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

Directories

A
  • just reference where a file is
  • special kind of file and format
  • working directory is where we are currently relative pathnames are worked in relation to working directory
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

File attributes

A
  • every file/directory has attributes

- such as username, file size, file type, permissions

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

Input/ output streams

A
  • has three streams
  • standard input/ stdin: defaults to the console keyboard
  • standard output/ stdout: defaults to the console screen
  • standard error/stderr: defaults to the console screen
  • shell provides a mechanism for overriding this default behaviour (stream redirection)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Stream redirection

A

Mechanism for overriding default streams

-take input from file cmd output to a file

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

Pipes

A
  • are considered by many to be on of innovations
  • route standard output from cmd into input of another cmd
  • symbol: |
  • able to combine efficiently
  • “generator” starts at the head
  • eliminates intermediate files
  • all cmds run at same time but one error all fails
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Command sequencing

A
  • multiple commands can be executed sequentially
  • ex) date;who;pwd
  • you can group commands together and redirect the output
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Quoting

A

Strong: all chars inside single pair of quotes are preserved
Weak: some char($,’) inside (“”) are interpreted by the shell
Back: substitute result of evaluation as a command

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

Shell vars

A
  • built in dictionary of variables
  • some built in some user-defined
  • can add new vars or discard
  • no spaces when assigning vars
17
Q

Path

A
  • helps the shell find the cmds you want to execute

- its value is a list of directories separates by :

18
Q

Enviro variables

A
  • subshell: when executing cmd, launches another shell
  • inherits from parent
  • change vars for short term or long term
19
Q

Shell script

A
  • take all cmds and run as single program
  • not always sensible
  • wrap a repeated task into a cmd
20
Q

Selection

A
  • test involve file operations

- bash tends to think of everything as a string