ITR3 lecture 7: more introduction to UNIX - PowerPoint PPT Presentation

About This Presentation
Title:

ITR3 lecture 7: more introduction to UNIX

Description:

Title: ITR 3 Introduction Author: krichel Last modified by: krichel Created Date: 9/3/2002 6:21:51 PM Document presentation format: On-screen Show Company – PowerPoint PPT presentation

Number of Views:63
Avg rating:3.0/5.0
Slides: 19
Provided by: kric2
Learn more at: https://openlib.org
Category:

less

Transcript and Presenter's Notes

Title: ITR3 lecture 7: more introduction to UNIX


1
ITR3 lecture 7more introduction to UNIX
  • Thomas Krichel
  • 2002-11-05

2
ze olde UNIX Philosophy
  • Make each program do one thing well.
  • These programs are sometimes called tools.
  • Expect the output of every program to be the
    input to another yet unknown program.
  • Simple tools can be connected to accomplish a
    complex task
  • Do not hesitate to build new tools
  • The UNIX tool library keeps growing

3
Layers in the UNIX System
User Interface
Users
Library Interface
Standard Utility Programs (shell, editors,
compilers, etc.)
System Interface calls
User Mode
Standard Library (open, close read, write, etc.)
UNIX Operating System (process management, memory
management, the file system, I/O, etc.)
Kernel Mode
Hardware (cpu, memory, disks, terminals, etc.)
4
UNIX Structure
  • The kernel is the core of the UNIX system,
    controlling the system hardware and performing
    various low-level functions. The other parts of
    the UNIX system, as well as user programs, call
    on the kernel to perform services for them.
  • The shell is the command interpreter for the UNIX
    system. The shell accepts user commands and is
    responsible for seeing that they are carried out.

5
Famous shells
  • The Bourne shell /bin/sh (default)
  • The Korn shell /bin/ksh
  • The C shell /bin/csh
  • The Bourne Again Shell /bin/bash
  • The Z shell /bin/zsh
  • In linux, /bin/sh is usually /bin/bash

6
stdin, stdout, stderr
  • Stand for standard input, output and error,
  • Normally keyboard, screen, screen
  • Can redirect
  • gt file redirect output to a file
  • gtgt file redirect output to append a file
  • lt file use input from file
  • 2gt file redirect error to a file
  • 2gtgt file redirect error to append a file

7
pipe
  • The vertical bar takes the output and makes it
    the input of another program.
  • Example how many files do I have?
  • ls grep c
  • What is the most recent files?
  • ls t tail -1

8
Machine access
  • Console access
  • Network access
  • Need to know the IP number
  • That number may be changed by the LIU network.
  • Run a scheduled job to report the number to
    wotan, which itself has a static number and name.

9
cron
  • cron is a daemon that runs scheduled jobs.
  • crontab file set a file file to be the schedule.
    Changing the file does not change the crontab.
  • The schedule file has a list of times and a list
    of command that are being executed.
  • crontab l lists the crontab
  • crontab r removes it.

10
Contab structure
  • Minute hour day of month month day of
    the week
  • Day of the week goes 0 to 6, 0 is Sunday.
  • means any
  • Followed by the command, for example
  • 46 5 rsync --delete -qa /home/krichel
    krichel_at_wotan.liu.edursync/arcano/home gt
    /dev/null 2gt /dev/null

11
Internet configuration
  • You request an IP address using dhcp from your
    provider with dhclient. There are many ways in
    which the client can be configured.
  • You get a report of the configuration of the
    Internet access with /sbin/ifconfig.
  • You need to put this in a file
  • /sbin/ifconfig gt host.if
  • where host is your host name
  • Copy this file to wotan account
  • scp host.if _at_wotan.liu.edu
  • Put this is the crontab, every hour, say.

12
UNIX Structure
  • Hundreds of applications are supplied with the
    UNIX system. They support a variety of tasks
  • copying files
  • editing text
  • performing calculations
  • developing software
  • Serving web pages etc

13
naming
  • DNS attaches names to machines on the Internet.
    This allows us to keep names
  • Names are used in collections called domains.
    Domains must be registered.
  • Thomas has a DNS server for the domain
    openlib.org
  • Thomas can write an application that will take
    the different .if files, and collect them on
    fafner, and create a file will provide with a
    zone that will name in the itr3.openlib.org
    domain, as host.itr3.openlib.org

14
Name calling
  • Not officially allowed. The University only wants
    .liu.edu names for machines in the University
    network. And of course they own the domain and
    operate the server.
  • Nevertheless, I could demonstrate how this could
    work.
  • Probably next week .

15
dselect
  • Is the main tool to add and remove software.
  • You have to do this as root.
  • Set the distribution to be the testing.
  • Set the apt method for getting package files.
  • You can also add non-official sources
  • http//www.braincells.com/debian sid/ for pine
    for example

16
Package conflicts
  • When you install packages that require others
    that are not there yet, or when you remove
    packages that others depend on, the system will
    prompt you.
  • Typing R at this stage will get you back.
  • It pays to look at the keystrokes that you can do
    in dselect and learn the most important ones
  • / search \ repeat search select - deselect

17
Dselect
  • Update updates the package list, gets you the
    latest version of all packages.
  • Install does the installation
  • Configure seems no longer being used
  • Remove seems no longer being used, removals are
    done by Install

18
http//openlib.org/home/krichel
  • Thank you for your attention!
Write a Comment
User Comments (0)
About PowerShow.com