CS41 - Linux Workstation Administration
David Morgan
Santa Monica College
see syllabus for email address



Administrativa

Syllabus

Grade reports

Course outline

SMC dates/deadlines


DETER net testbed
  home
  get/use an account
  FAQ
  tutorial
  news report (pbs)


Information


Linux links

Remote Unix access with telnet

Remote Unix access with ssh

Variations among Unixes

vi - the Visual Editor

Line termination

Using ftp

Fundamental Unix Commands

System calls

File permissions

Filesystem analysis

Cheat sheet - bash shell

Shell script basics

Shell programming:
if and while

Shell programming book

 

SPRING 2019
Section 4098 6:45p - 9:50p Fri Bus 263

This Website (http://homepage.smc.edu/morgan_david) will be used extensively to communicate with you. Announcements, grade reports, and assignments will be posted here. The site can be viewed from an internet-connected browser anywhere. You are responsible for awareness of the information posted here.

Next topic - will be processes, course outline section 8. You should take a look at the reading there. In particular, a series of 3 video links are there under the heading "Videos of optional interest."  They total about an hour running time. They treat the same topic(s) as I will in class. Watching them may help reinforce your understanding. (4/19)

DETER homework
anticipate
- this exercise on comparison among different flavors of UNIX. This is to be done on DETER, remotely. More information will follow but you can examine the assignment now, early. It will be due by the end of the course. (11/3)

Midterm test 4/26 - Will cover commands, permissions, shell and GUI. Please bring a scantron form 882. The test is closed book. (4/19)

Grades - updated, link at left entitled "Grade information." (4/18)

No class April 12 - SMC's spring break is that week. (4/5)

Relevant article I found recently. It talks about exit status, and the use of commands' exit statuses as the basis for "if" branching. It also talks about using the "test" command and its variants to enable "if" to be responsive to numeric and string comparisons, like "if" in most other languages. (4/5)

Next topics - will be the X Window System (gui) in course outline section 6, and processes, course outline section 8. (4/5)

Grades - updated, link at left entitled "Grade information." Includes mock tech support assignment. (4/5)

Homework - 
do the reading and homework in section 7 of the course outline, the 2 scripts due on sputnik end-of-day Tuesday 4/9
(3/29)

Way beyond our level - but worth your attention. The Advanced Bash-Scripting Guide is an extensive and unique collection (few hundred pages) of contributed, clever examples covering seemingly all the scripting features in the "language." Please be aware of it for the future occasions when you may want to find shell script examples of, just about everything. (3/29)

"if" versus "test" in shell scripting - don't get syntaxes confused. Which is the owner of the square brackets? The "condition" expression in an if statement is a command, and standard command syntax includes no such thing as surrounding square brackets for every command! 

(10/13)

Data dump program category - in class you will see me use xxd sometimes, to legibly display the bytes from some source in all their precise binary glory-- maybe a master boot record I obtained from the hard disk using the dd command, or a data stream snatched from the network interface card by Wireshark of tcpdump for example. Another such command is od. Here is some information about od and other data dump utilities. They can be useful. (3/29)

Grades - posted, link at left entitled "Grade information" (3/29)

Homework
read - do the reading about the shell in section 5. Then do the reading about shell scripting in section 7. (We will come back to section 6, about graphical interfaces.)
do - I got a de facto request for tech support for our lab. Your homework is to compose an email response to it, explaining what went wrong and how to make it go right, and send the response to me via email. Please title the email "linux support" and I will use an email filter to capture incoming messages by that name. Please send it dmorgan@dmorgan.us (as opposed to my @smc.edu address). Send it by end-of-day Saturday 3/30 You are the support technician. Here is the request I received:

(3/22)

Topics - tonight's primary topic is how filesystem permissions work; secondary is the vi editor. Thereafter, we launch into a discussion of the shell. (3/15)

What's a "shell?"- it's a program that does something definitive that distinguishes it from programs that aren't shells. Editors, similarly, do something distinctive. Compilers do something distinctive. Browsers do something distinctive. You can tell an editor when you see one; it's clear that it isn't a compiler or a browser, based on what the editor does. Shells are equally well-defined, by their clearly identifiable function and behavior.  A shell is a program that does this:

while true (loop forever)
    ask (prompt) the user, "what software would you like to see run?"

    try to find the software that the user tells you
    if you can't identify it
        tell the user so (error message)
        go back to the top of this loop
    else
        cause that software to run
        wait for it to finish
    endif
endwhile 

If it's a shell, it does this; if it does this, it's a shell. The shell is the thing that handles your commands, so a common synonym for "shell" is "command processor." (3/15)

Role and position of an operating system (3.15)

Homework - due by end-of-day Saturday 3/23, on sputnik in your assignments folder. 
do - next assignment is at the link entitled "permissions" in the homework column of the course outline. The passwords for the accounts involved are all "password.UCLA$" and the server on which to remotely do the assignment is sputnik.smc.edu.
read - the "reading" material in Course outline's first 5 sections.  (3/15)

Apple's launchd - the inspiration for systemd. You can see the strong parallels between this article's description of launchd and our discussion of systemd. (3/15)

FreeBSD startup - I logged in. Note the greeting I got.

This reflects operation of the SysV system initialization method in FreeBSD. FreeBSD has not adopted systemd. It is not expected to do so because systemd uses linux-specific facilities. (3/15)

Take-away from presentation on bootup, initialization, and service management:

 


Man page "section" categorization:

"Each man page should be categorized in a specific section, denoted by a single
character. The most common sections under Linux, and their human readable
names, are...:

1 User commands that may be started by everyone. 
2 System calls, that is, functions provided by the kernel. 
3 Subroutines, that is, library functions. 
4 Devices, that is, special files in the /dev directory. 
5 File format descriptions, e.g. /etc/passwd. 
6 Games, self-explanatory. 
7 Miscellaneous, e.g. macro packages, conventions. 
8 System administration tools that only root can execute. 
9 Another (Linux specific) place for kernel routine documentation."

from the "Linux Man Page Howto." Take a peek into /usr/share/man on Fedora, wherein all the man pages are actually stored. See also the Sobell textbook, pages 94-91, about the man command, the related info command, and the top sources for getting linux doc and information when you need it. (3/8)

Grades - posted, link at left entitled "Grade reports" (3/8)

Demo to highlight role of a bootloader - I will put into the master boot loader some machine code that prints a string. That's all. The code doesn't boot anything, or load anything. But because we call the code (if any) that sits in the master boot record "bootloader," this is therefore a bootloader in name. Even though not in function. I came upon the idea today from a British student's website. I'll demonstrate it, applying his code to a usb flash drive and booting from that drive to see his string, in class tomorrow night. (3/7)

Homework -
read -
- readings in the "Reading" column of section 1 of the Course Outline with the
 exception of the article on secure boot.
- article Linux System Startup about Unix SysV startup procedure
- article Inside the Linux Boot Process IBM
- Sobell ch 5 "The Linux Utilities" - a catalog of important commands. Read it but skip discussion of the following less important commands: hostname, lpr, uniq, diff, mcopy, gzip/gunzip/bzip, apropos, finger, w, write/talk/mesg. Skip vim tutorial. While reading, I suggest you sit before a linux system and try out the commands and his examples hands-on. (2/22)

Nuts and bolts - a few nuggets I find worth more than their weight
 - filename completion 
 - command recall with ctrl-r's incremental reverse search of history
 - "the root directory" versus "the directory root"
 - virtual terminals with ctrl-alt-Fn keystrokes  (2/22)

What SMC's wireless internet access service doesn't do - SMC's web page entitled "Wireless Internet Access at SMC" tells you what their service does not do:

"What network services are available?

"Only web access is allowed (http and https). Campus network ports and the wireless network do not allow access to any non-web services such as telnet, FTP, SMTP, POP, IMAP, etc."

At this early stage in the course do you know what that means? I'm not sure. If you don't, you will soon. But if you try to have the service do anything that it doesn't (clean your socks, chill your beer, connect to a remote machine with ssh...) I hope you won't ask me why it didn't work. (2/21)

Course outline - with approximate weekly topic coverage corresponded to related readings, homework assignments, and in-class slides I will use. 

Accounts will be created for you on the remote server sputnik.smc.edu. See the link near the bottom entitled "Remote Unix system".

Sobell textbook author Mark Sobell has a website

Information sources about linux - see the latter several slides in the presentation at the link "Intro/installation" 

Replacing BIOS - including replacement for the MBR disk scheme. Necessitated to enable support of drives over 2TB. Dubbed "extensible firmware interface." 

Homework -
read -  from Sobell textbook-
Sobell ch 1 "Welcome" - read lightly, as casual background and overview
Sobell ch 2 "Installation Overview" - omit RAID and LVM sections. Omit sections on obtaining and burning source data on CDs.
Sobell ch 3 "Step-by-Step Installation" - read it over, up to section on X Window System; omit that and remainder of chapter. Describes installation steps.
view - this video of Marc Sobell, our textbook author, on a 1985 broadcast panel discussion about Unix. 

Bootable flash drives for you - containing a copy of linux similar to that on our classroom laptops, is available for copying to your USB drive. Optionally, if you are interested, bring an 8GB or bigger flash drive to class and we can copy onto it an image of the USB drive I have prepared. It seems to boot on several computers-- probably therefore yours. It's persistent. It contains the utilities and configuration I think useful for teaching. I have not road tested it on any scale but with you as my guinea pigs, it's an offer. It is not required, and I won't formally support things that may not work. No promises. But if you are interested come to class with a flash drive and I think you will leave with a linux environment in which to play. 

Procedures for using class laptops  

A Remote Unix system will be available for your use (acounts not yet created as of today).  

Using ssh (secure shell). ssh is an important tool you will use for interacting with remote computers. For that you will need an ssh client. There are a number of ssh client alternatives

Running linux at home

 


Eniac - 1946

Milestone in the history of computation

 

Assignments/due

see course outline

In-class exercises

see course outline