1 / 7

A Practical Guide to Linux

A Practical Guide to Linux. Slides Prepared by Vickie McCullough. Chapter 1. Linux a product of the internet Developed by Linus Torvalds a Finnish undergraduate student Code was made available over the internet for free Coders world wide took part in developing the OS (Operating System)

Télécharger la présentation

A Practical Guide to Linux

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. A Practical Guide to Linux Slides Prepared by Vickie McCullough

  2. Chapter 1 • Linux a product of the internet • Developed by Linus Torvalds a Finnish undergraduate student • Code was made available over the internet for free • Coders world wide took part in developing the OS (Operating System) • The Heritage of Linux: UNIX • Originally UNIX was used by Universities starting in 1975 • CSRG (Computer Systems Research Group at the University of California at Berkeley) made significant additions and changes becoming the BSD • System V was developed and maintained by At&T and UNIX System Laboratories • What’s so good about Linux? • Includes features from both BSD and System V but differs in several significant ways • The kernel is implemented completely independently of both BSD and System V • Linux is continually being developed by individuals throughout the world • Skilled programmers can submit additions and improvements to the Linux OS to Linux Development Team over the internet • Constant add support for new device drivers and network code • Applications are developed that are both free and commercial • Linux includes a wide variety of tools: graphical, word processing networking, Web Server, Web page creation, and much more • Conforms more closely to POSIX (Portable Operating System Interface for Computer Environments) standards • Enormous support of peripherals • Linux is for Intel based platforms, Power PC, Apples (MkLinux) and DEC Alpha-based, MIPS-based and Motorola 68K-based machines • Multiprocessor compatibility (SMPs) • Supports emulators that allow you to run code intended for other OS’s • The Code is Free • Free means you are free to study it, redistribute it, and modify it • Project GNU(GNUs NOTUNIX) are free applications for Linux, for example gcc the GNU C compiler. • Linux and GNU software are distributed under the terms of the GNU Public License Agreement (GPL)

  3. Chapter 1 continued… • Why is UNIX/Linux so Popular with Manufactures? • Advances in hardware technology created the need for and OS that could take advantage of available hardware power • With the cost of hardware continually dropping, hardware manufactures can no longer afford to develop and support proprietary OSs. • It is a generic OS and takes advantage of the available hardware power • File Structure takes full advantage of large, fast disk drives • Originally designed as a multiuser OS • Runs on many different microprocessors • Same OS on many different machines • Developers can afford to make one version of one product available on many different machines • The Acceptance of Linux • Linux-FT Rev. 1.2 is POSIX.1 certified • The Future of Linux • Microsoft OSs were original written as single user systems • Multiuser and Multitasking benefits offered by UNIX/Linux were of little interest to the PC community • In response Microsoft offered two OSs, Windows NT and Windows 95, in the hope of displacing UNIX/Linux in the workstation market • Linux and other UNIX-like systems on personal computers offer the advantage of supporting much of functionality of Windows NT and Windows 95 in a single OS • Many third party software developers offer software to integrate Windows and UNIX/Linux • Samba • NFS • How can Linux run on so many machines? • A portable OS is one that can run on many different machines. • 95% of Unix is written in C and 5% Assembly calls • The C programming language is portable because it is written in a higher-level, machine independent language

  4. Chapter 1 continued… • The C Programming Language • Ken Thompson originally wrote the UNIX OS in 1969 in PDP-7 assembly language. Assembly language is machine-dependent • To make UNIX portable, Thompson developed the B language , a machine-independent language, from the BCPL language • Dennis Richie developed the C programming language by modifying the B language, and with Thompson, rewrote UNIX in 73’. This made the UNIX OS more easily run on other machines • You can write a compiler or an OS in C • C also has high-level constructs that allow efficient, modular programming • Like Linux, C is popular because it is portable, standard, and powerful. It has high-level features for flexibility and can still be use for systems programming. • ANSI (American National Standards Institute) a standards organization defined a standard version of C in the 1980s that is commonly referred to as ANSI C • The original version of the C language is referred to as Kernighan & Ritchie (or just K&R) C, named for the authors of the book that first described the C language • Bjarne Stroustrup, at Bell labs created an objected-oriented programming language name C++, which is built on the foundation of C • Overview of Linux • With Linux, you can turn your PC into a UNIX workstation. Linux is an ideal platform for many potential users: • Users who want to learn more about the UNIX operating system and the X Window System. • Internet surfers who want a powerful platform for cruising the Internet. • System administrators who want an alternative to expensive UNIX workstations, either in their workplace or at home. • Programmers who want a cheap home or small-business platform for developing software that can be used on other, more powerful UNIX systems. • Linux Has a Kernel Programming Interface • The Programming interface to the Unix System • The system call interface • Provides numerous services to programs that are running • Open a file • Read a file • Start a new program • Allocate a region of memory • Get the current time-of-day • Many of the functions in the standard C library • Linux Can Support Many users at One Time • Linux can support 1 to over 1000 users simultaneously • Linux Can Support Many tasks at One Time • Allows each user to run more than one job at a time • Jobs can be submitted to the background, switching back and forth from background to foreground

  5. Chapter 1 continued… • Linux provides a Hierarchical Filesystem with Built-in Security • The basic user element of a filesystem is a file: a collection of information • A file is stored under directories: like folders or boxes • Each uniquely named directory can hold more directories and files • Directories are arranged under other directories, in a tree-like organization • Users can organize their files by grouping related files into directories under their home directory • Under Linux, there is just one unified directory, with everything beginning at what is called the root directory. The root directory is symbolized by just a forward slash ("/"), with nothing following it. There are many directories hanging off of the root directory, as illustrated in Figure One. Each of those directories has subdirectories, and so on and so on, creating a directory 'tree.' The root directory is the root of that tree. Hence the treelike structure • Linking allows user to access a file by different names. When the user modifies one of the linked files all other files are updated. Essentially there is only one file but by the linking mechanism many other filesnames can be created and accessed by any one of the names. / class etc dev 51223 mart2345 daws3489 newfile myfile

  6. The Shell is a Command Interpreter and a Programming Language… Chapter 1 continued… • The Shell is: • A command interpreter which interfaces between the user and the OS • Each shell has a built-in programming language that is referred to as shell scripting • Popular shells include: • The Bourne Again Shell (/bin/bash) this is an enhanced version of the Bourne Shell (/bin/sh) • The TC Shell (/bin/tcsh) this is an enhanced version of the C Shell (/bin/csh) • The Z Shell (/bin/zsh) which is a conglomerate of a number of shells including the Korn Shell (/bin/ksh) • The Remote Shell (/usr/bin/rsh) which allows you to execute a command on a remote machine without actually logging onto that machine. Beware that on some Unix System V machines, rsh is the name for the restricted shell, in which case you get a remote shell by issuing the rshell or rcmd commands. • FileName Generation (FNG) • In UNIX this feature is also known as file globbing. The shell processes certain special characters, comparing them to the list of files in the current directory. Then the result is passed on to the actual UNIX command. • Some examples can be seen at: http://uwadmnweb.uwyo.edu/itr/documents/1027.html • Device-Independent Input and Output • When executing a command in Linux the user can determine where the output or input will go or come from by using the redirection symbols. The symbols are listed below with an example, the default input and output is the terminal Symbol Meaning Example > Output ls –al > myfiles < Input cat > myfiles >> Append cat myfiles >> mynewfiles

  7. Shell FunctionsChapter 1 continued… • Shell functions can be created so that as they are held in memory • Examples: cls () { clear ; } # clears the screen • list () { ls –al ; } # lists the files in the current directory • Job Control • A feature of the shell that allows users to work on several jobs at once, switching back and forth between them as desired • A user has the ability to bring in job into the foreground (attached to terminal) and send it back to the background. This is very useful when managing multiple jobs that run for long times. The user can monitor the progress of the job or kill the job. • The concept of job control originated with Berkeley Unix, where it appeared in the C shell • A large collection of Useful Utilities • Several 100 utility programs are available in Linux they are called commands • These commands are universal tasks inherit in all operating systems • Some examples are: Task Command • Sorting files sort • Moving files mv • Listing ls • Copying files cp • Deleting files rm • Interprocess Communication • Pipes and filters on command lines are used to send output from one command to another and process a stream of input or output to alter it in some way. • Example: • cat myfile | sort | lp

More Related