1 / 24

1 Introducing UNIX

1 Introducing UNIX. What is UNIX ? UNIX Kernel UNIX Shell Example Commands UNIX Filestore - next lecture. What is UNIX?. UNIX is an operating system An operating system is the program that controls all the resources of a computer system - both the hardware and the software

apu
Download Presentation

1 Introducing UNIX

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 1 Introducing UNIX • What is UNIX ? • UNIX Kernel • UNIX Shell • Example Commands • UNIX Filestore - next lecture

  2. What is UNIX? • UNIX is an operating system • An operating system is the program that controls all the resources of a computer system - both the hardware and the software • Most importantly, it allows you to make use of the facilities provided by the system. Every computer has an operating system.

  3. Different Flavours of UNIX • Commercial: Sun Solaris, SCO, IRIX • Open source: Linux, FreeBSD, NetBSD • Lots distributions • Cygwin • Not a full OS but an implementation of all the standard tools and system calls of UNIX • MacOS X • Underlying operating system is BSD

  4. Parts of the UNIX System

  5. UNIX Kernel • At the core of each UNIX system (and most operating systems) • Loaded in whenever the system is started up • Manages the entire resources of the system, presenting them to you and every other user as a coherent system • You do not need to know about it in order to use a UNIX system, but very important if you are administering one.

  6. UNIX Kernel (2) • Amongst the functions performed by the kernel are: • managing the machine's memory and allocating it to each process. • scheduling the work done by the CPU so that the work of each user is carried out as efficiently as possible. • organising the transfer of data from one part of the machine to another. • enforcing the access permissions that are set on the file system

  7. UNIX Shell • The UNIX command line interface is called the ‘shell’ • The shell is a program interpreter • There are many different shells, for example csh, bash, sh. • Usually you will run only one type of shell in a login session

  8. What is a Command Line Interface? • In Windows you usually do things by selecting something with the mouse and then clicking (GUI), but there is limited command line support • In UNIX, traditionally, you do things by typing in commands, but GUIs are common nowadays. • The Diving Bell and the Butterfly

  9. Command Line Completion • Very useful although not always available (available in bash!) • Start typing command (or file name) and then press tab • The shell will try to automatically finish the word for you • If more than one choice, press tab again and the shell will list the possibilities

  10. Copying and Pasting • In Windows you cut and paste using items in the Edit menu • In UNIX you can also use your mouse • Left button (click and drag) to highlight the text you want to copy • Middle button (click) to paste the text somewhere else

  11. A Shell Window

  12. Accessing your Linux account • Use NoMachine • For more info, read document by Paul Dempster (see U drive) • It’s a client-server system, with a twist

  13. X-Windows • In a normal client-server system (for example, an email system) the software on the local host is the client and the software on the remote host is the server. • In a X-Windows system this is reversed. • The X-Windows server is on your local machine. It provides the following services: keyboard input, mouse, procedures for drawing on the screen, etc. • The clients are on the remote host. Client processes running on the remote machine use your X Server to get the input from your keyboard and mouse and to display their output on your screen.

  14. Opening and closing the terminal • To open the terminal: • You can close it by typing exit or pressing ^D (Ctrl+D)

  15. Shell vs. GUI • Advantages of command line interfaces vs graphical interfaces: • Easy to automate • History of commands • More productive (once you know what you are doing) • Works well over slow network connections • Disadvantages: • More difficult at first (but you get used to it)

  16. Linux at Home • The University’s Linux server is only accessible from within the campus • You might want to try installing Linux on your own PC, but this might not be trivial • A simpler option is to download a “live” distribution (a bootable CD)

  17. UNIX Commands • Shells perform user requests and they do this by accepting commands • Different types of shell have different commands, although the core commands are common • A command consists of one or more words separated by white space • The first word is the command name • Subsequent words (flags and arguments) give additional information or modify the command • E.g. ls –l /usr

  18. Command Entry • A command is only entered when you press the ENTER (or RETURN) key • Special key strokes include: • DELETE or back space to delete the last character (also ^H) • ^D to delete the next character • ^W to delete the last word • Alt+U to delete the entire line • ^C to kill most commands • ^A and ^E to go to the beginning or end of the line (^X means press the Control key and X at the same time)

  19. Example UNIX Commands • who • date • finger • passwd

  20. Example UNIX commands (2) • The who command displays a list of current users on the system • Information includes usernames, where they are logged in from and when they logged on zlizmj pts/7 Mar 5 10:49 zuczpd pts/8 Mar 5 11:20 zlizmj pts/9 Mar 5 11:20 zliybzd pts/10 Jan 2 09:03 zliybzh4 pts/12 Jan 8 12:32 zliychj2 pts/13 Jan 7 13:50 zliyblj5 pts/19 Jan 26 15:46 zlizjc pts/22 Jan 3 14:45 (unix:1031.0) zuczpd pts/15 Jan 3 12:06 (mb-gx520-030.nottingham.edu.cn)

  21. Example UNIX commands (3) • The date command displays the current date and time: Mon Oct 9 11:27:07 BST 2000 • finger describes the person behind a username, for example, finger gmh@marian gives: Login name: gmh In real life: Graham M Hutton Directory: /staff/gmh Shell: /bin/csh Last login Thu Sep 16, 1999 on pts/2 from marian No unread mail Plan:

  22. Example UNIX Commands -Changing your password • The passwd command changes your password • This is one of the first things that you should do • You are prompted for the old and new passwords (the new one twice) • You cannot change your password from the CS Linux server (passwords are stored on a Windows server)

  23. Other Useful UNIX Commands • man - manual pages • info - more extensive documentation • gpdf - viewer for PDF files • ggv - viewer for postscript files • konqueror - web browser and shared folders browser • bzip2 - compress a file (reverse bunzip2)

  24. Summary • Introduction to UNIX • UNIX Kernel • UNIX Shell • Basic UNIX commands • Next Lecture: UNIX Filestore

More Related