#+title: Lesson 05 | Command line Environment #+HTML_HEAD: #+HTML_HEAD: #+HTML_HEAD: #+OPTIONS: H:6 * Links #+attr_html: :class links - [[../toc.org][TOC | Missing Semester]] - [[https://www.youtube.com/playlist?list=PLyzOVJj3bHQuloKGG59rS43e29ro7I57J][Playlist: Missing Semester]] - [[https://www.youtube.com/redirect?event=video_description&redir_token=QUFFLUhqbVVJc2RzZ25nMmlrVW5zVGRsTS1fX2ladmRPQXxBQ3Jtc0ttWjQ5Ujcyd19TekNncTZGNEp1eDc3RWhzTzhvMW9oSTFoUl9JbGt1Mi0yU3FLc00wVUx1UXNJdFQxTjBjMWphdUZxNnU1WUYzTmFqd3RRemNLUDBJMlZkV3B0SnB4RVhpaUhvWWtnc1RISW1WVzdYWQ&q=https%3A%2F%2Fmissing.csail.mit.edu%2F2020%2Fcommand-line%2F&v=e8BO_dYxk5c][class notes]] - Curr: https://youtu.be/e8BO_dYxk5c?si=G0txrxbY4pmEy04y&t=510 *** timestamps :PROPERTIES: :CUSTOM_ID: timestamp :END: #+attr_html: :class playlist + [[https://youtu.be/e8BO_dYxk5c?si=A-imhHunQCtp_-Oz][00:00 - introduction]] + [[https://www.youtube.com/watch?v=e8BO_dYxk5c&t=138s][02:18 - Job Control]] + [[https://www.youtube.com/watch?v=e8BO_dYxk5c&t=227s][03:47 - Signal Interrupts]] + [[https://www.youtube.com/watch?v=e8BO_dYxk5c&t=360s][06:00 - Python Program]] + [[https://www.youtube.com/watch?v=e8BO_dYxk5c&t=672s][11:12 - The Kill Command]] + [[https://www.youtube.com/watch?v=e8BO_dYxk5c&t=881s][14:41 - Terminal Multiplexer]] + [[https://www.youtube.com/watch?v=e8BO_dYxk5c&t=1112s][18:32 - The Key Bindings]] + [[https://www.youtube.com/watch?v=e8BO_dYxk5c&t=1536s][25:00 - Dot Files]] + [[https://www.youtube.com/watch?v=e8BO_dYxk5c&t=1799s][29:59 - Context Based Configuration File]] + [[https://www.youtube.com/watch?v=e8BO_dYxk5c&t=2004s][33:24 - Terminal Emulator]] + [[https://www.youtube.com/watch?v=e8BO_dYxk5c&t=2196s][36:36 - Aliases]] + [[https://www.youtube.com/watch?v=e8BO_dYxk5c&t=2286s][38:06 - Common Folder Structure]] + [[https://www.youtube.com/watch?v=e8BO_dYxk5c&t=2344s][39:04 - Symlinks]] + [[https://www.youtube.com/watch?v=e8BO_dYxk5c&t=2552s][42:32 - ssh]] + [[https://www.youtube.com/watch?v=e8BO_dYxk5c&t=2715s][45:15 - ssh keys]] + [[https://www.youtube.com/watch?v=e8BO_dYxk5c&t=3057s][50:57 - ssh config]] + [[https://www.youtube.com/watch?v=e8BO_dYxk5c&t=3231s][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 #+BEGIN_SRC python import signal def handler(signum, frame): printf("signal received") signal.signal(signal.SIGINT, handler) #+END_SRC - 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