Linux user foundation
User Basic Linux Teaching Target
Familiar with the LINUX system operating environment
Master the use of orders in Linux
Master the relevant content of Linux system management
File system management, user management, process management,
Software installation management, TCP / IP network configuration management
Master Shell and use
Master VI Editor
Configure networks and network services
Master the configuration of the proxy server
Linux user foundation
Chapter One
Linux system overview
This chapter points
Introduction to UNIX and Linux
LINUX composition and function
Linux's kernel version and distribution suite
The status quo of Linux and the future
Basic concept related to Linux
What is Linux? Linux is a powerful operating system
At the same time it is a free software, free, source code open
The purpose of preparing it is to establish unix compatible products that are free from any commercial software rights.
Unix History Introduction
In the 1970s, Bell Laboratory has developed UNIX
Two series of AT & T System V and Berkley BSD
The current common Unix version is: Sun Solaris SCO UNIX HP-OS AIX Note: Linux is compatible with both System V and BSD two UNIX systems POSIX - Portable Operating System Interface
Various manufacturers develop their UNIX -> Unix systems are not compatible!
In 1988, NTST / CSL organized all UNIX manufacturers, organizations and users to develop POSIX, portable operating system standard interface (IEEE 1003.1)
RESULTS: Just follow the software in a UNIX environment, just do a little modification, you can compile success in other UNIX environments. Introduction to Linux History, Finnish college students Linus Torvalds use the Minix operating system as a development platform from the end of 1990 to the development platform, and have repeatedly prepared several procedures for his own operating system courses and later Internet access.
1991.10.5 published an article in the Internet's COMP.S.MINIX discussion, indicating that he is developing an operating system to go beyond Minix, which announced the birth of Linux. In 1993, Linux 1.0 came out
1999, Linux Kernel 2.2.x came out
In 2001, Linux Kernel 2.4.x The open source (Open Source) allows anyone to freely disseminate program code for copying and modifying software, not
Source 1983.9, founders of Richard M. Stallman (RMS), FSF (Free Software Foundation), currently for project host for GNU Project
Product Category - Kernel - Editor - Shell GNU & GPL GNU - GNU's Not Unix is a group named GNU in the FSF (Free Software Foundation), currently 400 people.
The source program of GPL - General Public License software is free to circulate, and software companies should not refuse source programs, or have a profit of software, software companies should earn, should be the cost of system integration and service.
All programmers can exchange their experiences and ensure that the software quality GNU and Linux Linus I think: "Let Linux become a GPL member is the most beautiful thing I have made in my life."
GNU's development process: first develop GCC and other powerful tools, and finally develop GNU KERNEL (HURD)? The best operating system GNU's Not unixlow appearance? Linux Kernel GNU Software? Debian / Linux? Pouncing the vacuum status before HURD Linux Features open system Multi-user multitasking system has excellent stability and speed performance with reliable system security provides a rich network function standard compatibility and portability provides a good user interface why Linux Linux is A free operating system with Unix all features
Linux not only provides users with powerful operating system features, but also provides a wealth of application software.
Linux provides a chance to learn and use the UNIX operating system at home.
Linux can coexist with existing operating systems
With the joining of major companies, there is reason to believe that Linux will develop more rapidly, and eventually become a multi-platform, high market share, extremely excellent network operating system. Linux system constituting Linux kernel Linux shell Linux file system
Linux utility
The kernel, shell and file system form a basic operating system structure KERNEL (kernel) and version KERNEL implementation of the basic function of the operating system: control hardware device, memory management, hardware interface, basic I / O software: management file system , To allocate memory and CPU time, etc.
There are three numbers of version numbers: r.x.y r: The currently released kernel version x: even: stable version, odd number: development in the version Y: Error Patch
Example: 2.0.38; 2.2.16 Description: 2.1 Fixed 132 kernels of the 2.2 version of the operating system after the MICROKERNEL Nuclear core providing the core function of the operating system. The microennote is a streamlined version of the kernel. It is designed to increase portability in a small memory space, providing modular design to use different interfaces, such as UNIX, DOS, Windows, Workplace OS, Workp1ace Unix, etc. Linux issuance Suite Linux Distribution: Take various applications and tools with Linux kernel. There are currently more than 200 kinds of Linux Distribution, common Linux Distribution --------
Western / International Edition Redhat Linux Mandrake Linux Debian GNU / Linux Slackware Linux SUSE Linux Turbo Linux Chinese XTEAM Linux Red Flag Linux Turbo Linux Chinese BluePoint Linux
Linux shell
Shell is a user interface of the system, providing an interface (command interpreter) for interacting user with kernel
It receives the command entered by the user and send it into the kernel.
There are currently the following versions of the shell: Bourne Shell: It is developed by Bell Lab. Bash: It is a GNU's Bourne Again Shell, which is the default shell on the GNU operating system. Korn Shell: It is the development of Bourne Shell and is compatible with Bourne Shell on most of the content. C shell: is the BSD version of Sun's shell. Linux file system file system is an organizational method on a file stored in a disk or other storage device.
Mainly reflected in the organization of documents and catalogs.
Linux can use the unified tree structure file system. Switch the directory, access the file set directory and file permission settings file Sharing Linux supports multiple types of file systems. LINUX Applications Linux Applications LINUX Server Embedded Linux System Desktop Market Typical Applications Titanic: Effects -> 350 SGI and 160 Dec Alpha Workstations, Running Red Hat 4.1 Linux Super Computer: Los Alamos National Laboratory takes 70 DEC Alpha 533MHz , 128M memory, 3G hard disk computer, running Red Hat 5.0, cost $ 150,000, calculation speed Similar to SGI Origin 2000 (cost 1.8 million US dollars) Chapter 2 Operating system function and installation 1, processor management 2, device management 3, File Management 4, Job Management 5, Memory Management Processor Management 1, CPU Management (Process Management) A program is executed on a data collection is called a "process" process: 1), process control: Create a process , The state transition 2 of the process control process 2), process synchronization: Coordinating the process of concurrent execution 3), process communication: management between the processes of mutual cooperation 4), process scheduling: When a process gives up the CPU Other processes are running. Device Management 1), Buffer Management: Use buffers to buffer the contradiction between speed mismatch between the CPU and I / O devices. 2) Space management: 2), directory management 3), read or write files 4), file protection 5), provide interface for programming use job management 1), job scheduling: Select job to enter memory, let the process gain competition Qualifications. 2), job control: Offline control mode and online control mode memory management 1), memory allocation and recycle 2), main memory sharing and protection 3), address mapping 4), virtual storage technology to learn Linux before Mastering Concept Disk and Partition Understanding Linux File System Standard Mastering Linux Underline Device Understanding LILO and GRUB Purpose Ordinary User and Super User Compare Characters Working Methods and Graphics Working Way Hard Disk Structure and Disk Partition
Win2kp (2.93GB FA State is good) (D:) 3.91GBFA State Good 800MB State Good 2.93GB State Good 1.95GB State Good 204MB State Good 3.26GB FA State Good Win2KS (3.19GB NT State Good) primary partition logical partition logical partition logic Partition logical partition logical partition logical partition logical partition
Expand partition
Whole hard disk
Linux common partition type Linux native primary partition: used to store file system common type: EXT2, EXT3
SWAP: Temporary storage of data exchange partitions, make up for insufficient memory, generally two times the physical memory. Hard disk / optical drive comparison table
Master / SLAVE HDB / DEV / SLAVE HD / DEV / SCSIS / DEV / SDB Hard Disk / DEV / SCD0 / DEV / SCD1 First, Second SCSI CDH
Linux file system standard structure
no
Linux partition function
/ Boot system process
Note: If you want to boot the Red? Hat? Linux system with LILO, the / boot partition must be completely below the cylindrical surface 1023. In addition, since the 8GB data LILO cannot be read, the Red? Hat? Linux is installed within the 8GB area.
/ USR partition, local storage software local / home partition, is where the user's Home directory is located.
/ var / log partition, is the system log record partition
Linux partition function
/ DEV partition, store device files. ?
/ OPT partition, store optional installed software. ?
/ SBIN partition, store standard system management files.
/ TMP partition, used to store temporary files
/ bin partition, store standard system utilities. ?
/ etc directory, storage system configuration files LILO & GRUB Introduction LILO is a total name for Linux Loader GRUB is a Grand Unified Boot Loader
It is a small program in the hard disk boot sector to boot the most common way to guide the Linux system kernel. You can use multiple operating systems to support multiple different system kernel images simultaneously. Password protection is provided for each system kernel image. Supports boot sectors, image files, and startup images located in different disks and partitions. Installing multi-system sequence 1, windows98 2, windows2000 3, windowsxp 4, Linux restore Linux boot record 1, install LILO in non-MBR during installation, clear the main boot record 3 with fdisk / MBR, activate Linux with fdisk The partition of the Boot partition is a common user and superuser Linux is a multi-user operating system, and multiple users can use the system at the same time. Users can be roughly divided into two categories, namely ordinary users and superusers.
Ordinary users can use system resources within their permission license, but superusers (username root) not only use all resources in the system and can manage system resources.
In addition to the user's concept, there are groups of groups in Linux. The group is a number of logical collections of several users. LINUX running mode Character operation mode Local virtual terminal Using Telnet remote login Using SSH remote login
Graphics mode Local use KDE / GNOME Integrated Environment Run X Server Remote Using Graphic Environment Linux Installing this section Point Get and Installation How to Install Preparation Work System Using Preparation Ways and Installation How to Download Method Download Publish Purchase Publish Version Installation Install local CD Mount Local Drive Install Remote Network Installing FTP NFS HTTP Install Linux Prequest For Linux Supported Hardware CD Startup installation No need to prepare local hard drive installation and network installation Need to make boot disk boot.img bootnet.img boothd.img The production of the boot disk "There is a program in the dosutils directory in the Redflag4.0 disc: Rawrite.exe, under DOS (or command mode in Windows) Run Rawrite, press Tips to select some of the images in the disc. Image file and floppy drive. Second, use: dd if = boot.img of = / dev / fd0 bs = 1440k f (facility) device, tool system virtual console and its switching system provide multiple virtual console (Virtual console) (add) in / etc / inittab file)
Switch Each Virtual Console Character Interface ALT F1-F7 Graphical Interface -Linux System Runtime 0 - System Downtable Status 1 - Single User Operating Status 2 - Multi-User Status (No NFS) 3 - Multi-User Status (NFS) Character Way default run level 4 - system unused, left to users 5 - X11 Console (XDM, GDM, or KDM) 6 - System Normally Off and Restart - File Type Ormonic Files Text File Binary Document Executable Program, Sound, Image file
Catalog file
Link file hard link soft link
Special file - special file equipment file / dev / ttys1: standard terminal / dev / hda: first IDE hard disk pipe file example: When users use LP print a file, LP creates a print process and send information to a pipeline - Third lesson Install and graphical interface Use your own hands to install and use the graphical interface (and the Windows system very similar) -Shell shell is a user interface of the system, providing a user with the kernel interacts an interface (command interpreter)
It receives the command input command and feed it into the kernel. There are currently the following versions of the shell: Bourne Shell: It is developed by Bell Lab. Bash: It is a GNU's Bourne Again Shell, which is the default shell on the GNU operating system. Korn Shell: It is the development of Bourne Shell and is compatible with Bourne Shell on most of the content. C shell: is the BSD version of Sun's shell. -Shell's Important Features Command Line Interpretation Interactive Mode Background Run (Run Commands In the Background)
Commands Multiple Perform Sequence Commands Replace (`) I / O Redirection (PIPES) | Wild-Card Characters System Environment Maintenance Shell Script - Command Interpretation Process No - Command Rule, Path And file command rules command verbs [parameter] [Operation object]
Path absolute path relative path
File Naming Rules - File Wildcard * Match Multiple characters? Match a single character [ABC] Match any of the characters in ABC [! ABC] Match any of the characters other than ABC - Login, Login, Shutdown System Login, and Login Logout Login (Logout or Exit) Note: Any user in the system can use
System Shutdown and Restarting Method (HALT) Note: Only Super User Free Use -Linux Common Command 1 File Directory Operation Command LS Touch CP MV RM CD Ln Cat More Less Head Tail PWD Mkdir RMDir Find Grep Tar Gzip Compress Sort Paste WC - LS Usage: LS Parameters: -a: Display all files, including hidden files (with. - out files) -l: Display -f: in a long format: attach one character after each file name to explain the The type of file, "*" represents the active file; "/" represents the directory; "@" represents the symbolic link; "|" means FIFOS; "=" indicates sockets. -ls -d: The directory icon file is displayed, not the file under which it is displayed - T: The display directory and subtacity structure -m:? transverse output file name, and " "Piente. -S:? Sort by file size. Example: LS -A LS -ALR LS -F - Different files in color - Directory Green: Directory Red: Compressed File Light Blue: Link File Gray: Other Files - Touch: Generate an empty file or modification Time Example of File: Touch *: Modify all file time in the current directory to the current system Touch -D 20010602 Test: Change the file Test to 20010602 Test2: If ABC exists, modify it to the current system time, if not Presented, generate an empty file for the current time - CP - CPY File Usage: cp -afpx source target -a: keep the file structure and properties - P: Keep the original file date -f: If the target file already exists, Overwrite it - I: Tips to overwrite the existing normal target file -R: contain subdirectories: CP ls.txt mydir1 cp -a mydir1 mydir2 cp /etc/syslog.conf ./ cp -a / etc / sound / / home / so / -mv - Move File Usage: MV -B Source Target -b: Create a Backup Example to the overwritten file: MV ABC BCD MV ABC MYDIR / MV -B ABC MYDIR /-RM - Remove RM-IRF Document or Directory i: Interactive Mode R: Delete Directory and All Content F: Forced Delete Note: Root Users should be special careful when deleting files