1 / 79

Introduction to UNIX

Introduction to UNIX. Eric Paules. Outline. History of UNIX Features, components and capabilities Accessing a system (logging in) System configuration files Useful commands User Accounts Passwords. History of UNIX.

Télécharger la présentation

Introduction to 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. Introduction to UNIX Eric Paules

  2. Outline • History of UNIX • Features, components and capabilities • Accessing a system (logging in) • System configuration files • Useful commands • User Accounts • Passwords

  3. History of UNIX • The UNIX operating system was originally developed at AT&T Bell Labs in 1969. • Source code distributed to universities. • As a result, several versions of UNIX developed over time.

  4. History of UNIX • In 1979, AT&T announced they wanted to charge for Unix licenses. Their version known as System V. • University of California at Berkeley created its own variant, BSD Unix. • Many early commercial versions (like SunOS) were based on BSD.

  5. History of UNIX • In 1987, Sun and AT&T began work on creating a type of industry standard for UNIX. • Effort to combine the best features of AT&T’s System V and BSD’s Release 4. • Enabled software to be developed for UNIX without concern as to version.

  6. History of UNIX • In 1990, System V Release 4 (SVR4) was released. • Became the basis for • Sun Microsystems’ Solaris • AT&T UNIX • IBM's AIX • Hewlett-Packard's HP-UX

  7. History of UNIX • Linux • Linus Torvalds began developing the Linux kernel in 1991. • Version 1.0 released 1994. • Since then Linux development has escalated due to its open source nature. • Distributions: Red Hat, Caldera, SUSE, etc.

  8. Linux Screenshot

  9. History of UNIX • Several BSD variants still popular • FreeBSD • OpenBSD • NetBSD • Latest arrivals to the UNIX world • BeOS • Apple Mac OS X

  10. Popular Uses of UNIX • Servers • Web, Application, Database, File/FTP • DNS (Domain Name System) • E-mail (sendmail), Directories (NIS, LDAP) • Workstations • Scientific, engineering, simulation, financial, graphics and imaging applications

  11. Popular Uses Example • UNIX as a Web Server Platform • UNIX/Apache is the platform behind 62% of Internet web servers. • Microsoft OSs behind 22% of web servers. • Other 16% (which includes some other web servers, such as iPlanet, on UNIX) • Source: www.netcraft.com

  12. Why? • UNIX is a very mature operating system • Over 30 years of development and improvement • Considered to be very stable • Not uncommon to find a UNIX system running for several months w/out reboot • Performance • Efficient, can do more with less hardware

  13. UNIX Operating System Features • Multitasking • Multi-user • Protected Memory • Distributed Processing • Scalable • Portable • Security

  14. Multitasking • Enables more than one tool or application to be used at one time. • Enables the kernel to track several processes simultaneously.

  15. Multi-user • Enables more than one user to interactively access the same system resources. • This is different from multiple users accessing a document on a central file server; that type of use is considered passive (local system is doing the processing, not the server).

  16. Protected Memory • Each process runs in its own exclusive memory space. • If one process crashes, it is unlikely to impact other running processes.

  17. Distributed Processing • Enables the use of resources across a network. • Multiple UNIX systems can cooperate on processing a job.

  18. Scalable • UNIX can accommodate more than one CPU. • Maximum number varies by distribution. • Symmetric multiprocessing (SMP) distributes processes across different CPUs.

  19. Portable • Versions of UNIX can be compiled to run on different types of CPUs. • Intel/AMD/Cyrix • Sun Sparc • IBM/Motorola PowerPC • DEC Alpha

  20. Security • UNIX contains a number of security features. • Account and password required to access a system. • Owner and group permissions on files and directories. • Users restricted from modifying system parameters.

  21. Operating System • A set of programs that manages all computer operations and provides a link between the user and system resources. • Converts requests that come from the mouse and/or keyboard into computer operations.

  22. Components of theUNIX Operating System • Kernel • Shell • File System

  23. Kernel • Master program (core) of the UNIX operating system. • Manages devices, memory, swap space (virtual memory), user processes and daemons (system processes). • Also controls the functions between the system programs and the system hardware.

  24. Shell • Interface between the user and the kernel. • Acts as an interpreter or translator. • Accepts commands issued by the user, interprets what the user types, and requests execution of the programs specified. • Execution is performed by the kernel.

  25. Shell • Three common shells can be found in a UNIX environment • Bourne shell (indicated by the $ prompt) Often the default shell; no aliasing or history capabilities. • Korn shell (indicated by the $ prompt) A superset of Bourne with aliasing and history. • C shell (indicated by the % prompt) Also has aliasing and history; C-like syntax.

  26. File System • A hierarchy of directories, subdirectories, and files that are usually organized or grouped together for a specific purpose. • UNIX uses UFS, the Unix File System. • Sun developed NFS, the Network File System, for systems to access data stored on other systems.

  27. Relationship of Components

  28. User Interfaces • Primary: Command Line • Various shells • Secondary: GUI, X-Windows protocol • OpenWindows • CDE (Common Desktop Environment) • KDE (open source version of CDE) • Gnome

  29. File Structure • A hierarchy of directories, subdirectories, and files that are usually organized or grouped together for a specific purpose. • Data are organized in the file system's hierarchical structure of directories in a way similar to how information is stored in a file cabinet.

  30. File Structure

  31. Directory Terminology • Root directory • The topmost directory in the file system hierarchy. • Required for the operating system to function and contains critical system files (such as the kernel).

  32. Directory Terminology • Subdirectory • Any directory below another directory. • Parent Directory • The directory immediately above a subdirectory. Each subdirectory has only one parent, although a parent directory can have many subdirectories.

  33. Directory Terminology • Pathname – uniquely identifies a particular file or directory by specifying its location. • Pathnames in UNIX use forward slashes (/) as the delimiter between object names. • Example: /home/jsmith/file.txt

  34. Directory Terminology • Root / • Top level of the file system. • Current Directory . • The directory you are in. • Parent Directory .. • The directory above the one you are in. • Home Directory ~ • User’s default login directory (ksh and csh).

  35. Directory Terminology • Absolute Pathname • Path to a file or directory starting from root • Example: /home/jsmith/mail • Relative Pathname • Path to a file or directory relative to the starting point • Example: ./mail

  36. Directory Terminology

  37. Accessing a UNIX system • Logging in identifies you to the system. • You must have a user account on the system to log in. • Systems Administrators are responsible for creating and maintaining user accounts.

  38. Logging In • You will be presented with a prompt similar to the following: SunOS 5.7   Login: Password:

  39. Logging In • Type your username (login ID) at the prompt and press Enter. • Then type your password at the prompt, and press Enter. • Note that your password will not appear as you type it for security reasons. • UNIX is CaSe-SeNsItIvE… however, most objects are lowercase for ease of typing. • If your login is successful, you will be greeted with a shell prompt ($).

  40. UNIX network configuration files • /etc/hosts • Lists IP address and hostname of the system • Can include IPs and names of other systems • First is the loopback (localhost) address • Next is the real IP address of the system 127.0.0.1 localhost 192.168.5.6 cocoa 192.168.5.45 coffee

  41. UNIX network configuration files • /etc/resolv.conf • Lists Domain Name Service (DNS) resolution information • First is the domain the system is in • Next are the nameservers it users domain psu.edu server 128.118.25.3 server 128.118.141.32

  42. UNIX network configuration files • /etc/defaultrouter • Lists the default network gateway for the system 192.168.5.1 • /etc/netmasks • Lists the network and subnet mask 192.168.0.0 255.255.255.0

  43. UNIX network information • ifconfig –a command • Shows information about the system’s Ethernet interface(s) lo0: flags=849<UP,LOOPBACK,RUNNING> mtu 8232 inet 127.0.0.1 netmask ff000000 hme0: flags=843<UP,BROADCAST,RUNNING> mtu 1500 inet 192.168.5.6 netmask ffffff00 broadcast 192.168.5.255

  44. Working with Directories • Determine what directory you’re in: pwd (print working directory) Example: $ pwd /home/jsmith

  45. Working with Directories • Change to another directory: cd Example: $ cd /home/jsmith/mail

  46. Working with Directories • cd command with an absolute pathname $ cd /home/jdoe/mail • cd command with a relative pathname (if already in /home/jdoe) $ cd mail • Change to the parent directory $ cd ..

  47. Displaying Files and Directories • List files and directories. $ ls dir1 file1.txt file2 pong • List all files and directories, including hidden files (files beginning with a ‘ . ‘ ) $ ls –a .kshrc dir1 file1.txt file2 pong

  48. Displaying Files and Directories • Displaying file types. $ ls -F dir1/ file1.txt file2@ pong* • / indicates a directory. • * indicates an executable. • @ indicates a symbolic link to another file. • No symbol is a regular file, which could be plain or ASCII text.

  49. Displaying Files and Directories • Displaying detailed information. $ ls -l drwx------ 2 jsmith users 512 Feb 28 19:28 dir1 -rw-rw-r-- 1 jsmith users 27 Feb 28 19:29 file1.txt lrwxrwxrwx 1 jsmith users 9 Feb 28 19:29 file2 -> file1.txt -rwx------ 1 jsmith users 23 Feb 28 19:29 pong

  50. Displaying Files and Directories • File types and permissions • Number of hard links to other files • Owner • Group • Size of file in bytes • Last modification time • Filename

More Related