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
What is nano?
A text editor
26
Who developed C?
Dennis Ritchie
27
C Library Types
Static and Shared
28
Static C Library
Packaged into the executable and included in every instance of the program
29
Shared C Library
Pulls the library into the program at runtime so multiple programs can use it at the same time
30
Linux extension for static libraries
.a (stands for archive)
31
Linux extension for shared libraries
.so (shared object)
32
What is problematic about shared libraries?
When they are updated, any program that cannot run with the new one will break
33
What are Bash programs called?
Bash scripts
34
Notable shells
- 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
What does the ssh provide?
Encryption
36
What port does ssh execute from?
Port 22
37
What do ports allow?
Ports allow multiple services to run on the same network
38
What port does telnet execute from?
Port 23
39
Link types
Hard link and soft link
40
Soft Link
File tells you where another file is
41
Hard link
Alias for a file
42
What kind of links does ln make by default?
Hard links
43
ps
Reports a snapshot of the current processes
44
What does export do for variables?
Export makes env variables available to a child of the original shell
45
What symbols do each type of quote suppress?
" - everything but $, `, \, ! ' - everything
46
Numbers for stdin, stdout, and stderr
stdin - 0 stdout - 1 stderr - 2
47
What folder is the trashcan?
dev/nulll
48
Piping (|)
Takes stdout of one command and redirects it as stdin for the next
49
What does bash & do?
bash & backgrounds the bash process. This allows you to execute commands in the background while continuing to work in the parent shell
50
fg
Puts a process back in the foreground
51
CTRL-d
Indicates the end of a file
52
lpr
Prints files
53
lpstat
Shows printers
53
$SHELL
Tells you where the shell is
54
lprm
Cancels jobs in the the queue
55
$PS1
Prompt statement 1
56
sed
Substitutions in ed
57
grep
Global regular expression print
58
awk
Used in this class for cut awk '{ print $1 }' prints the first column
59
Regex . meaning
Matches any single character
60
Regex * meaning
0 or more of the previous pattern
61
Regex [^] meaning
Negates a range
62
Regex ^ meaning
Anchor to the beginning of a line
63
Regex $ meaning
Anchor to the end of a line
64
Regex {n,m} meaning
A range of min,max
65
Regex + meaning
1 or more of the previous pattern
66
Regex ? meaning
0 or 1 of the previous pattern
67
Regex () meaning
Capture groups
68
$IFS
Internal field separator
69
$0
Name of the script that is executing
70
$#
Number of arguments
71
$$
Process id
72
$@
Space separated list of parameters
73
$(cmd)
Command substitution
74
What value means true in Bash?
0 is true, nonzero is false
75
$?
Return of the previous command
76
Numerical vs. String operators
Numerical uses -gt, -lt, -eq, etc. and strings just use the normal operators
77
set $variable
Sets the list value to the value of $@