3.3 KiB
3.3 KiB
Lesson 05 | Command line Environment
Links
- TOC | Missing Semester
- Playlist: Missing Semester
- class notes
- Curr: https://youtu.be/e8BO_dYxk5c?si=G0txrxbY4pmEy04y&t=510
timestamps
- 00:00 - introduction
- 02:18 - Job Control
- 03:47 - Signal Interrupts
- 06:00 - Python Program
- 11:12 - The Kill Command
- 14:41 - Terminal Multiplexer
- 18:32 - The Key Bindings
- 25:00 - Dot Files
- 29:59 - Context Based Configuration File
- 33:24 - Terminal Emulator
- 36:36 - Aliases
- 38:06 - Common Folder Structure
- 39:04 - Symlinks
- 42:32 - ssh
- 45:15 - ssh keys
- 50:57 - ssh config
- 53:51 - changing the prefix
notes
topics
- job control
- terminal multiplexers
- dot files / how to configure
- work with remote machines
job control
sleep
- puts process to sleep for a specified amount of time
- exit by typing Ctrl-C
Ctrl-C
- sends SIGINT - signal interrupt
- man signal will show the list of signals
signals
- SIGQUIT
- signal sent when we want to quit
- SIGTERM
- similar to quit but not in term
- SIGHUP
- when we have processes running but still want to close
pausing
- SIGSTOP
- pause execution of program
- SIGCONT
- continue program
python library
- use import signal
import signal
def handler(signum, frame):
printf("signal received")
signal.signal(signal.SIGINT, handler)
- the above would catch a Ctrl-C and run it through handler
- you use this by catching a Ctrl-C and running any saves or cleanup before exiting