A note about the computers in the room: I'm running into an old-terminal problem I'd like to install a newer one, but it's not in the package manager This is solvable in a few ways: snap binary (maybe) check out the source from git and build it The terminal I'd like to run is called "kitty" Warm-up (not really review): Which set of notes was longest? What processors are on systems I can ssh into? Standard Input, Standard Output, and Standard Error Redirection operators on the command line Ok, time to look at the inside By understanding the inside, you will understand the outside too When you get a new car, don't you take it to bits first thing? C brief intro Came before C++ It's the language Linux is written in Standard programming language for *nix I'll assume you know the first 3 chapters of the C++ text Differences from C++: header files end with .h No namespaces No classes (including cin and cout) And string No standard template library Nested functions are ok C++ is nearly a proper superset of C No nested functions, unless you use lambda Struct initialization is more verbose Casting rules produce more warnings C++ has become very popular for *nix programming K desktop environment, for example It's like C, but has more features I'll use actual C for all examples in this class In CS430, you will too, because the kernel is not in C++ You're welcome to use C++ in this class if you like! Less confusing if you're in CS211 at the same time I'll also try to make sure the examples all work in C++ File descriptors, and read/write write system call (what is a system call?) We'll open a file and write to it How about just using 1 as the file descriptor? 0, 1, and 2, and write How about changing the file descriptor a program writes to? >, and file redirection 2> redirects standard error Parallel for standard in: It's file descriptor 0 We can use the read system call to read from it Let's make a program that just passes things through, and then redirect a file into it! Infinite loop, read, then write cat can do this. Maybe do something trivial, like capitalize all letters A very useful program: grep Searches through standard input or files Permissions User, Group, Other All, which is different from other All is used with letters for chmod setuid root for programs Demo, with c program and system sticky bit and /tmp Undo sticky and see what happens!