Lecture Notes Flashcards

1
Q

scp

A

Secure copy from one computer to another

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

ssh

A

Secure shell

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

OS Structure

A

Linux, Mac, and Windows have m-nary tree file structures

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

Bin folder

A

Binaries – compiled code

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

sudo

A

Super user do, used to execute a command as an admin of the system

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

~

A

Tilde expansion

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

Characters in filename expansion

A
    • 0 or more characters
      ? - 1 character
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

When/where was Unix developed?

A

At Bell Labs in the 1970s’

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

Who is credited with developing Unix?

A

Alexander Graham Bell

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

What language was codeveloped with Unix?

A

C

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

Notable C developers

A

Dennis Ritchie, Ken Thompson, Brian Kernighan, Joe Ossanna

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

Kernighan

A

C Bible, written by Ken Thompson and Brian Kernighan

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

Principles of Unix

A
  • KISS
  • Focus – high product cohesion
  • Filter – handle info between objects to limit coupling
  • Flexibility – allow users to do what they want
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Who created Linux?

A

Linux Torvalds

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

What was Linux written for?

A

The 80x86 processor

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

GNU Definition

A

GNU’s not Unix

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

What was intended to be the standard shell for the GNU system?

A

Bash

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

What does the Kernel do?

A
  • Protect and manage resources
  • Sends messages to the hardware
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What does a shell do?

A

Interact with the Kernel

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

Notable Shell Distros

A

Redhat, Fedora, Ubuntu, Bash

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

What is a distrubution

A

An OS that includes the Linux kernel and a package management system

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

What does the $PATH variable provide?

A

A list of directories to search whenever we try to execute a command

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

opt

A

Optional

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

which

A

Tells you the path to the executable you are trying to execute

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

What is nano?

A

A text editor

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

Who developed C?

A

Dennis Ritchie

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

C Library Types

A

Static and Shared

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

Static C Library

A

Packaged into the executable and included in every instance of the program

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

Shared C Library

A

Pulls the library into the program at runtime so multiple programs can use it at the same time

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

Linux extension for static libraries

A

.a (stands for archive)

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

Linux extension for shared libraries

A

.so (shared object)

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

What is problematic about shared libraries?

A

When they are updated, any program that cannot run with the new one will break

33
Q

What are Bash programs called?

A

Bash scripts

34
Q

Notable shells

A
  • sh (Bourne)
  • bash (Bourne again shell)
  • csh (c shell)
  • ksh (Korn shell, created by David Korn)
  • zsh (derivative of the csh)
  • ssh (secure shell)
35
Q

What does the ssh provide?

A

Encryption

36
Q

What port does ssh execute from?

A

Port 22

37
Q

What do ports allow?

A

Ports allow multiple services to run on the same network

38
Q

What port does telnet execute from?

A

Port 23

39
Q

Link types

A

Hard link and soft link

40
Q

Soft Link

A

File tells you where another file is

41
Q

Hard link

A

Alias for a file

42
Q

What kind of links does ln make by default?

A

Hard links

43
Q

ps

A

Reports a snapshot of the current processes

44
Q

What does export do for variables?

A

Export makes env variables available to a child of the original shell

45
Q

What symbols do each type of quote suppress?

A

” - everything but $, `, \, !
‘ - everything

46
Q

Numbers for stdin, stdout, and stderr

A

stdin - 0
stdout - 1
stderr - 2

47
Q

What folder is the trashcan?

A

dev/nulll

48
Q

Piping (|)

A

Takes stdout of one command and redirects it as stdin for the next

49
Q

What does bash & do?

A

bash & backgrounds the bash process. This allows you to execute commands in the background while continuing to work in the parent shell

50
Q

fg

A

Puts a process back in the foreground

51
Q

CTRL-d

A

Indicates the end of a file

52
Q

lpr

A

Prints files

53
Q

lpstat

A

Shows printers

53
Q

$SHELL

A

Tells you where the shell is

54
Q

lprm

A

Cancels jobs in the the queue

55
Q

$PS1

A

Prompt statement 1

56
Q

sed

A

Substitutions in ed

57
Q

grep

A

Global regular expression print

58
Q

awk

A

Used in this class for cut
awk ‘{ print $1 }’ prints the first column

59
Q

Regex . meaning

A

Matches any single character

60
Q

Regex * meaning

A

0 or more of the previous pattern

61
Q

Regex [^] meaning

A

Negates a range

62
Q

Regex ^ meaning

A

Anchor to the beginning of a line

63
Q

Regex $ meaning

A

Anchor to the end of a line

64
Q

Regex {n,m} meaning

A

A range of min,max

65
Q

Regex + meaning

A

1 or more of the previous pattern

66
Q

Regex ? meaning

A

0 or 1 of the previous pattern

67
Q

Regex () meaning

A

Capture groups

68
Q

$IFS

A

Internal field separator

69
Q

$0

A

Name of the script that is executing

70
Q

$#

A

Number of arguments

71
Q

$$

A

Process id

72
Q

$@

A

Space separated list of parameters

73
Q

$(cmd)

A

Command substitution

74
Q

What value means true in Bash?

A

0 is true, nonzero is false

75
Q

$?

A

Return of the previous command

76
Q

Numerical vs. String operators

A

Numerical uses -gt, -lt, -eq, etc. and strings just use the normal operators

77
Q

set $variable

A

Sets the list value to the value of $@