Excerpted from chinaunix.net netizen WGDZH
SCO Unixware 7.1.1 Comprehensive Learning Information
Author: wgdzh Posted: 2002/05/13 12:46 pm [the postings in the final wgdzh at 2002/06/17 10:11 am edit]
Unixware 7.1.1 Fully Learning Data Volume INTRPUT: System Getting Started and Practical Technology Volume 2: System Management and Application Volume III: System Security and Prevention Volume: System Getting Started and Practical Technology
Part 1: Unixware 7.1 installation
1. Insert the startup disk 1 of UNIXWARE7, turn on the computer power supply;
2. After a period of time, insert the second boot disk according to the system prompt; (Note: You can also start with Unixware 1 # installation disk)
3. Select Zone for Americas, locale as C (English), keyboard type is United States, press
4. Enter the corresponding System license, including License Number, License Code, and License Data, press
5. Select Install HBA Diskette and press Enter after inserting an HBA floppy disk. When you are installing HBA, select Proceed with Installation, press
6. Select Auto Configuration DCU (Device Configuration Utility) Press
7. Enter sysnode name (system name, hostname), press
8. Select Install Method for install from CD-ROM, press
9. Configure a disk configuration, press
10. Select: Use default filesystem size and types Press
11. Decide that the package to be installed, select: license-barac DEFAULTS Press
12. Select: Defer Network Configuration, Continue by
13. In the "Date and Time" window, press
14. Select System Security Level (Choose The Desired Security Level), generally choose Traditional, press
16. Enter root password twice, press
17. Press
18. After installation, press the system prompt to remove the floppy disk and disc, restart the computer, then configure the mouse as required.
The installation is complete!
Summary Precautions: 1. When you encounter the installation process, the prompt cannot be found, check the waves of the optical drive. The optical drive is usually set to Master. 2. When the hard disk partitions, pay attention to the UNIX partition can only be divided into the first 8G. When you need to multi-system, you should first divide the DOS zone, then divide the UNIX zone, pay attention to the starting track of the UNIX zone to be different from the termination track of the DOS main partition, otherwise UNIX may be wrong. 3. There is a write network card in UnixWare, such as common Realteck 8029. Only the NIC is replaced, and the for unixware driver can be found online, only for Open Server 5. 4. During the installation process, the input System Owner Login Name and System Owner Passwd have to remember, it is not a matter with root. When the root password is found, you can use the Owner Name and Owner Passwd, and then change the root password back. 5, when choosing Timezone, be careful not to choose, generally GMT 0800, otherwise it may be wrong when it involves time. Of course, you can also be modified manually after installation. 6, UNIXWARE 7.1.1 Installation discs have a total of 7 CDs. In general, only the first 3 of them are required, and the last four is the relevant process.
Part II: System Operation Getting Started (first lecture) Unix operating system entry is not a difficult thing, it is similar to the common network operating system we have in contact with us, which is aimed at file, directory, authority management and control. . This book can be used as a guide to beginners, as well as a manual that is familiar with UNIX personnel. Ok, we still take care of those beginners. After all, this is a gentle deception, let us go to the UNIX interface first, see what UNIX looks like. (This book is all unixware 7.1.1 as an example)
Login step ========= login: _______ => Enter username password: _______ => Enter a password
Exit step ========% EXIT% CTRL D
Change account password ============% passwd => The following message will appear UX: passwd: info: changing password for xxx old password: ______ => Enter the old password new password: ______ = > Enter a new password (preferably 6-8 words, English letters and digital mix) Retype new password: ______ => Re-enter the password online instruction description ============ Performed format: man command- Name EXAMPLE:% MAN LS
Enter the remote computer system ================ Perform format: rlogin hostname [-1 username] Example:% rlogin Doc Remote login Enters the workstation DOC. % Rlogin doc -l user uses the USER account into the workstation DOC. (Note: Generally, Rlogin is closed, it should be unsafe, recommend Telnet, SSH)
Perform format: Telnet Hostname or Telnet IP Address Example:% Telnet DOC% Telnet 140.109.20.251
(Second)
How, UNIX interface is not very like DOS, boring, and odorless. However, it also has the other side, has not seen it, it also has a Window interface, called xwindow. We will not introduce it here. The real UNIX master is very small to use the graphical interface, which is a character, so you have to get used to it. Ok, this, we will truly use UNIX command to do what we want to do, in order to make memories, we can compare with the DOS command.
File or directory processing ============== List file names in the file or directory Perform format: ls [-tflgr] [name] (Name can be a file name or directory name.)
Example: Ls lists the file names in the current directory. LS -A lists the included. Start hidden files all file names. LS -T lists the file name in accordance with the order of the final modification of the document. LS -F lists the file names and their types of current directory. "/" The end is expressed as a directory name, and "*" is indicated as the execution file, "@" is indicated as Symblic Link. LS -L lists the permissions, owners, file sizes, modifications, and names of all files in the directory. Ls -lg is the same as above, and the owner group name of the file is displayed. Ls -r displays the file name of the directory and all its subdirectory. (Recursive Listing)
The abbreviation of the directory ========== ~ Working Directory when the user login ~ Username Specifies the Working Directory of a certain user. Current Working Directory .. Parent of Working Directory $ Home is consistent with the Parent of Working Directory $ HOME. Comparison with DOS: DIR Tip: 1 ===== Perform format: CD [Name]: Name can be abbreviated for the directory name, path, or directory.
EXAMPLE: CD changes the location of the directory, to the Working Directory (starting directory) when the user login. CD DIR1 changes the directory location to the directory location of DIR1. CD ~ User changes the directory location to the user's Working Directory. CD .. Change the directory location, to the upper layer of the current directory (ie, Parent of Working Directory) CD ../User changes the directory location to the relative path User's directory location. CD /../ .. Change the directory location to the directory location of the absolute path (Full Path). Comparison with DOS: CD Tips: Return to your home directory: CD ~ / CD $ HOME
Establish a new directory ========== Perform format: MKDIR Directory-Name
EXMAPLE: MKDIR DIR1 creates a new directory DIR1. Comparison with DOS: MD focus and difficulties: one to build multiple directory: MKDIR A B C ... (A, B, C are directory)
Delete the directory ======== Perform format: RMDir Directory-Name or RM Directory-Name
EXAMPLE: RMDir Dir1 Deletes Directory Dir1, but there is no file in Dir1, otherwise it cannot be deleted. RM -R / R DIR1 deletes directory DIR1, and all files and subdirectories.
Comparison with DOS: RD Difficulties and Hearts: RMDir -R A and RMDIR -R A / *. (The former even the A itself is also deleted, the contents in the latter A are deleted, but A itself exists.
Copy file ======== Performed format: CP [-r] Source Destination
EXAMPLE: CP file1 file2 Copy file file1 into file2 CP file1 DIR1 Copy file file1 to directory DIR1, file name is still file1. CP / TMP / FILE1. Copy file file1 under directory / TMP to the current directory, and the file name is File1. CP / TMP / FILE1 FILE2 Copy file file1 under directory / TMP into the current directory, file name is file named File2 CP -R / R DIR1 DIR2 (Recursive Copy) Copy the entire directory. If the directory DIR2 exists, copy the directory DIR1, all the files and subdirectories, and copy it to the directory DIR2. If the directory name is Dir1, if the directory DIR2 does not exist, then DIR1, all the files and subdirectories, copy to the directory DIR2 . Comparison with DOS: Copy Key and Difficulty: 1, copy the A directory extreme all files to the B directory (the B directory presented): cp -rab, the result is a. 2, copy a directory extreme all files to B In the directory (the B directory does not exist): cp -rab, the result is the content in B is the same as A. Move or change file, directory name ========================00 =======================================================================================================================================================================================================================
Example: mv file1 file2 will file file1, change the file name to file2. MV file1 Dir1 moves file file1 to the directory DIR1, and the file name is still FILE1. MV DIR1 DIR2 If the directory DIR2 does not exist, the directory DIR1, and all its files and subdirectories are moved to the directory DIR2, and the new directory name is DIR1. If the directory DIR2 does not exist, change DIR1, and all its files and subdirectories, change to the directory DIR2. Compare with DOS: Move key points and difficulties: The properties of the target file are consistent with the properties of the source file.
Delete file ======== Perform format: RM FileName (filename can be file name, or file name abbreviation symbol.)
EXAMPLE: RM File1 Remove the file name with file1. RM file? Delete Five characters in the file name, the first four characters are files. RM f * deletes all files named in F as a file name. Compare with DOS: Del / Deltree Key and Difficulty: Deleting all files in the directory with RM-R / RM -R
The abbreviation symbol of the file name ================? Represents a single-word in the file name. * Represents one of the strings in the file name.
List the current directory location ====================== Performed format: PWDEXAMPLE: PWD
View the content ============ Perform format: Cat FileName
EXAMPLE: CAT file1 View the contents of file name file1 in continuous display.
Page Display File content ================ Perform format: more filename or cat filename | More
Example: more file1 View the contents of file name File1 in paging mode. Cat file1 | more.
View the disk capacity of the directory ====================00: DU [-sk] Directory
DU DIR1 Displays the total capacity of the directory DIR1 and the capacity of their second directory
DU -SK DIR1 Displays the total capacity of the directory DIR1, with k bytes as metering
Key and Difficulty: The directory size display of the DU is in units of block, converted into bytes, multiplied by 512. DU -SK is displayed in KB.
File lookup =================== perform format: Find Dir -Name FileName Command
Find. -name Hello -Print Looking for the current directory and all sub-directory called Hello documents.
Find. -ctime 7 -print identifies the unhappy document within seven days
Find. -size 2000m -print identifies a document that over 2000 bytes
Find / TMP-ISER B1234567 -PRINT document belonging to B1234567 under / TMP
Find. -name '* .c' -exec rm {} deletes all .c file
Find. -name test / * -print Displays the current directory and its subdirectories before 4 file names for TEST
Key and difficulties: 1. Find all files starting with CORE and remove it: find / -name "core. *" -Exec rm {} /; 2, count of files in the current directory: Find. | WC - L3, find 123 files, and write the error information into an error.out file: Find / -Name "123" 2> error.out
The third part of the VI editor VI is a very famous Unix text editor, which is very powerful, but it is also very difficult to talk to beginners. It doesn't matter, though we have introduced a lot, but don't ask everyone to master it, just remember that several commonly used. The VI operates editing status and command status, we want to introduce the status of the command. The so-called editing state means that you can edit the status of the content, and the command status refers to the state that can be operated on the content. Move operation k, the cursor moves up. J, the cursor moves down one character. H, move a character to the left. l, the cursor moves a character to the right. Or four arrow keys. : 0, the first line of the article; $, the last line of the article; Ctrl F, then turn the page. Ctrl b, front page pages. Insert operation I, insert in the current position of the cursor.
I, inserted in the lead.
A. Insert after the current cursor.
A, inserted in the current row.
O, insert it in the current line of the cursor.
O, inserted on the cursor.
R Replace the current cursor character.
R, starting from the cursor.
Delete operation x, delete the cursor character.
DD, delete the current row.
D0, half a row before deleting the cursor.
D $, delete the cursor half a row.
Find operation
/ String looks for strings (from going back)
? String looks string (from the previous)
n Continue to find
N reverse continues to find
% Find corresponding parentheses
u Cancel the last operation
EX command status
: Set Number Display line number
: SET SMD Display Display Status
0 files
: 1,5 COPY 7 pieces copy
: 1, 5 DEL block delete
: 1,5 Move 7 block
: 1. $ S / STRING1 / STRING2 / G Full Document Find String1 and replace String2
: Wq! Save exits
: Q! Exit does not save.
Key points and difficulties: I, insert in the current position of the cursor. I, inserted in the lead. A. Insert after the current cursor. A, inserted in the current row. O, insert it in the current line of the cursor. O, inserted on the cursor. X, delete the cursor character. DD, delete the current row. / String lookup string. ? String looks up string (from the previous). n Continue to find. N reverse continues to find. : Wq! The deployment is exited. : Q! Exit does not save.
Part 4: SHELL introduction
First lecture: What is shell
When we log in to Unix, the first contact is the shell. We must have a bit aware of it.
I. Introduction to Shell.
UNIX system is divided into three important parties
The core shell tool program is quite low-level, the operator is not easy to communicate directly, so there must be a friendly interface that makes it easier to operate, this interface is the shell.
In other words, the Shell is a user interface between the core and operators.
So why call it for shell? The original meaning of shell is "shell"!
That's right, outside the core, cover a layer of housing, used to receive the instruction input by the user, then interpret the instruction into the core to understand, pass to the core, and then return the result back to pre- Set the output periphery. For example: type
LS -L
Shell responded to you:
Focusing the case file size Recent revised class file Right limit owner group (BYTE unit) Date and time file Name DRWXR-XR-X 14 Root root 1024 JUL 21 21:31. Drwxr-xr-x 17 Root root 1024 APR 11 12:01 .. DRWXR-XR-X 8 82 82 1024 Feb 25 19:23 Apache -rw-r - r - 1 root root 1335460 Feb 25 17:45 apache_1_3_4.tar.gz drwxr- XR-x 6 root root 1024 AUG 31 1998 FTP DRWXR-XR-X 5 root root 1024 AUG 31 1998 httpd drwx ------ 2 James James 1024 APR 23 06:47 James DRWXR-XR-X 2 Root Root 12288 AUG 31 1998 Lost Found DRWXR-XR-X 2 MSQL Nobody 1024 DEC 28 1998 MSQL DRWXR-XR-X 28 OLS3 OLS3 2048 JUL 19 21:38 OLS3 DRWXR-XR-X 3 1022 Nobody 1024 Jan 25 23:40 OLS3CGI DRWXRWXR -x 3 perl OLS3 1024 Feb 2 07:11 Perl -rw ------- 1 root root 2097152 jul 21 18:39 quota.g Roup -rw ------- 1 root root 1278656 jul 21 18:39 quota.user drwxrwr-x 2 root nobody 1024 May 11 1998 Samba DRWXR-XR-X 3 Apache Nobody 1024 Feb 25 16:58 Temp DRWXRWR- X 2 Webadm Nobody 1024 Mar 14 16:34 Webadmshell can be divided into two categories: Text base: Text Base: Text Base: TEXT BASE: Text Guide Graph Base: Type Type Bath So-called Read User The input type is different "means: read the keyboard, or read the self-spiral, other Serial INPUT, screen touch, etc.
In this way, shell seems to be just a command-related transpillator ?! Well, this will be fixed by the shell attached to the different OS.
In terms of DOS's Command.com, it is a full command-related translator. In addition to a little bitch file, it is not much. The GUI of the Win platform is a diagram style command transpiler, The interface is very friendly. However, these two OS cannot choose Shell for your freedom to simply choose the shell. (Former DOS has 4DOS optional)
Due to UNIX families, the treatment of Shell is uniquely free, and therefore, the type of shell is quite large, and it is more free to replace (chsh).
The popular shell is:
Bourne Shell: SH c shell: CSH Korn shell: KSH (Business Soft) TCSH (Free) Bourne Again Shell: Bash (GNU) II. Simple history
The first important shell is a Bourne Shell (that is to commemorate the inventors of this shell Steven Bourne), starting using the Bourne Shell when the first popular Unix version 7 is released in 1979.
The Bourne Shell's master name is SH, so in the future, people will be the main identification name of the Bourne Shell.
Although there are many kinds of shells on UNIX, the position of Bourne Shell is still not changed. Many UNIX systems are still used as an important management tool. (It works from booting to shutdown, almost all)
The first SHELL variant is C shell. C shell is mainly attached to the BSD version of the UNIX system. Its author is the Bill Joy. C shell of the University of Berklai is mainly because of its grammar and C language. And thus be named. This makes the UNIX system's programmatist, feel quite convenient when learning C shell.
These two of these two major mainstreams forming shells, and later variant shells have drawn the advantages of these two shells.
For example, Korn, TCSH and Bash.
Bash Shell is one of the important tools for the GNU program, and it is also a standard shell in the GNU operating system. Bash was born in 1988. The original author is Brian Fox, Chet Ramey in 1989, now officially official maintenance is CHET Ramey, His work is to continue to enhance Bash's function. During the 1995 ~ 1996, Bash 2.0 is launched, before this, the version is 1.14.x, which adds many new features, and better compatibility Of course, Bash is completely free, it is a member of Open Source, the original code is all open.
II. BASH function.
BASH has the following features:
Compaminated Bourne Shell (SH) contains the best features in C shell and Korn Shell. With the ability to make a column recuperate (do you remember DOSKEY in DOS?) Operation Control (Job Control) Prospects and background program have the ability of Shell program, allowing you to keep your shell and design, management system. Third. Where is the new version of Bash?
If you want to capture the new version of Bash, you can go to http://www.gnu.org or its Mirror Station.
China Research FTP is also a good choice. Ftp://ftp.sinica.edu.tw or ftp://linux.sinica.edu.tw
Three. Start using Bash
When you login into the Unix host, you will start interacting with BASH, until your EXIT host (or press ^ D).
Bash's prompt symbol is $ (represents a general identity user), when you have root privileges, the prompt symbol changes to #.
Once prompt appears, you can start typing the operation command column.
Command can be divided into two categories:
BASH built-in instructions If it is a BASH built-in instruction, the Bash Shell is responsible for responding; if it is a program, the shell will find the program, then give the control to the core, execute the program, after execution, The control is then returned to the shell.
How do you know that the instructions are built in Bash, those are the program? Usually use "Which Directive", if there is no response, it is a built-in instruction (unless the instruction is wrong, there is no existence, or the program is not in the preset search Within the path), for example:
$ / usr / ucb / which echo [no response, expressed as built-in instruction] / usr / bin / echo $ / usr / ucb / while ls
/ bin / ls
Fourth. The format of the command column.
The command column is usually composed of several strings, with a blank or Tab key. As shown below: Command Options arguments (or parameters) Command Option parameter RM-RF / Home / OLS3
In addition to the blank and tab keys, each part, we call token, such as in the above example, there are three token: RM, -RF, / HOME / OLS3.
When you type this command, the shell first breaks down into individual TOKEN, and then determines that the built-in instruction or the program, then execute it before.
How do you know a command or program, it has those options and parameters? Usually the mana will be obtained. For example:
Man RM
In addition, multi-line instructions can also be written in the same command column, as long as the intermediate is used;
Ls; mkdir test; clear
V. Current catalog and its own directory.
The so-called current directory refers to: The location you are now, also known as a Working Directory.
I want to know why the current directory? Can you get a PWD instruction.
Home Directory means that when root is created for you, a private directory specified for you is also the first place after you log in, the first entry.
For your own directory, you can use the following:
CD (then press ENTER) CD ~ (~ represents your own directory) CAT / etc / passwd | grep your account related skills
Cd ./myway (enter the Myway directory in the current directory) CD .. (return to the last layer directory)
Sixth.
If the parameters of the command are included, the Wildcards can bring a very convenient operation. (However, if you use improper use, it is also the beginning of the nightmare)
If you have experienced experience in DOS, should you still remember the meaning of * and?!
The following is the universal character used in BASH:
? Represents any single-word element * represents any string (note: 0 or more characters, examples: * YES will contain Yes or Yes-OR-NOT) [Volume] in the middle brackets All in line, such as: [AZ] represents all lowercase letters [! By combination] The characters do not in the middle brackets, such as: [! 0-9] represents non-digital characters in line
VI. Input and output and rendering.
When the UNIX system completes the boot, there are three files, which is used as input, output, and display errors.
We call it:
Standard input: Usually the keyboard, the file code is 0 standard output: usually the screen, the archive code is 1 standard error: usually the standard output is the same (that is, the screen), the archive code is 2 although the system has helped you set these three Archives, but we can still change input, output, and errors in different places in a timely manner. This change of the standard output, we call "I / O Re-Guide" (I / O Redirection).
E.g:
Ls -la> myfile is to restrict the results of the query to myfile (originally should appear on the screen)
Cat myfile can see the result of LS -LA.
Cat
> Representative will output the output
Another mechanism that will turn the output into the direction is "Pipes". The so-called pipeline is the input of one program as another program. For example: CAT / etc / passwd | grep OLS3 The above instructions mean that the content display result (ie, output) of the / etc / passwd file (ie, output) is regarded as an input value, and then finds a list of materials containing keyword OLS3 by GREP. Eight. The front desk works in the background. Unix is a multi-user job system, which means that UNIX allows multiple people to use, and can perform many programs at the same time. In general, the instruction you perform will always hold control, until the end of the process, we call this implementation is in the foreground jobs, if, you can still do other times. Things, then we call it in the background. Usually time-consuming work, we will throw it into the background, and we can still continue communication with the shell, and get down to the shell. For example: We want to download all the files in a directory from the FTP server of the Chinese Institute, but don't want to wait for it to perform (because this time time is also very bored), you can reach in the following ways: Ncftp -r ftp://linux.sinica.edu.tw/pub1/redhat/powertools & Where & this symbol is the instruction that throws the command column to the background. If you want to turn off the line, you can continue the system, you can add an NOHUP instruction in front, as follows: Nohup ncftp -r ftp://linux.sinica.edu.tw/pub1/redhat/powertools & NOHUP is NO HANGUP that does not hang up. Eight. Special character and quotation marks. There are many characters, which is special for shell. For detail: Symbolic meaning ~ self-directorial `Command replacement # 解 $ Variable value & background work * Wan Dian (child shell Start) child shell End / Make Special Board Restore Improvement | Pipeline [By Combination Start] Cyclo end { Command block start} Command block ends; command separation number 'single number (without variable replacement function) "Dual quotation mark (with replacement function) Output steering / path separation number? Wanli-use character! Pipeline logic NOT in the sense The fourth part will be renewed. Volume 2: System management and application Part 1: Common System Management and Network Command Part II: System Structure Introduction Part III: System Launch Process Section IV: Network Server Configuration Part 1: Common System Management and Network Command First, Command Login User Login Commands Rlogin Login User Login Command Rlogin Totto Other Computers Telnet Remote Logs Command SU Switch User Command PASSWD Change User Code Command EXIT Exit The current shell command, equivalent CTRL D. Second, the positioning command When the user wants an command, the system first positions the command according to the search path. The search path is a set of directories listed for positioning commands. The default search path when the system is installed is some standard directory, such as / bin, / usr / bin, sbin, / usrsbin, etc. Users can modify the search path according to their own needs. The method is as follows: Modify the PATH statement (K shell and b shell) modified .cshrc or .login file Path = (...) Mell) Which is used to find a specific command. If this command is found, the (USR / UCB) Which command outputs the directory name of the command. Third, the use of the Man command - Summarize the information item related to Keyword in the Manual Keyword Database. -f Command finds detailed information related to Command. When using this option, you must make sure the root user has established a / usr / man / watis file. -m Path Specifies the search path used by the man command. Fourth, manage command install This command is used to install new version or new software for software. -cdirectory loads files into the specified directory, if the file already exists, this operation is invalid. -fdirectory puts the file into the specified directory (even if the command already exists), if the installed command version is more new than the original, the file uses the default permissions. The shutdown shutdown command (only root permissions can be) -h completely stops the execution of the operating system. -i gives the user prompt information during the shutdown process. -m turn the system into maintenance mode (single user). Ulimit In K Shell and B Shell, the ULIMIT command is used to limit the process of the process to a certain type of resource. The limit command is divided into two categories: hard limitations on resources over the system, can only be modified by root users. Soft restrictions on the default restrictions of the new creation process can increase the hard limits within the system. -a Display Soft Restrictions - HA Display Hard Limits - C Size Sets the size of the Core file (block). -f size sets the CPU time (in seconds). -d size Sets the maximum value of the data block (in k byte). -s size Set the maximum value of the stack (unit k byte). -m size Sets the maximum value of memory (unit K byte). Such as: ulimit -t 60 (user wants to limit the CPU time to 60 seconds) Umask sets the default permission value for each user. The files and directory contain three permissions: owners, group members and other users' permissions. The system uses an octal to permissions. Users should be careful when using the umask command, minus the UMASK value with 777 is the default permissions set for files and directory permissions. For example, as umask is set to 022, then the default permission is 777-022 = 755 V. Process related command process can be divided into three categories: interactive process batch process rewards executed on the terminal PS queries are running the process. -A lists the details of the process being running in the system. -e lists all processes outside the core process. -A lists all processes related to the terminal. -f produces a full list. -l produces a long list. -t list Lists details of all processes created by the terminal specified by the List table. Query all processes currently running and list full form: PS-EF / AF Query Terminal PTS002 is running all processes: PS -TF PTS002 The NOHUP command UNIX environment can run in the front desk or run in the background. When the process runs at the front desk, the user must wait at the end of the process to end. If the user wants to use the terminal and does not want to terminate the running program, you can transfer the process to the background running: Ctrl ZBG When the user exits from the current shell or system, the user runs in the front and backstart Will be terminated. In order for the user to exit, the system retains its process to continue running, UNIX provides nohup commands. The NOHUP command redirects the standard output to the file NOHUP.out, which exists in the current directory of the NOHUP command execution. If the script A.SH is executed by the user's background, you can use the following command: nohup ./a.sh & symbols & indicates that the user executes the command in the background. Sleep Command This command will stop between two command execution for a while. If you can use the SLEEP command every 15 minutes to check if some specific files exist. The unit of the SLEP command parameter is second. Waiting for 5 minutes between command execution: SLEEP 300 Kill Command This command can send a signal to a running daemon (otherwise the user cannot use the kill command). The default function of this command is to terminate a process run. -l lists the signal values supported by the system and its name. -Signal Number Specifies the signal value to the process. The user can replace the signal value with the signal name. Such as: Termination Process No. 1060: KILL 1060 or KILL-9 1060 Nice Command This command is used to modify the process priority, only the root user has permission. Negative numbers have higher priority, the priority is generally -20-20. For example: The user uses the find command to search the C file, in order to do other work in finding, reduce the priority of the Find command, can be executed : nice find / -name * .c -print & This process is set to the system default priority, generally 10. If you want to decrease, you can do: Nice 16 Find / -Name * .c -print & six , Communication Command 1, FTP Remote Transport Command (Almost in DOS, the ftp parameters under DOS, not much to say) 2, Talk and all online user session commands. 3, WRITE with the specified user session command. 4, Vacation When a user is vacation, you can use this command to notify users who send mail. The issued content is determined by the Vacation.msg file in the user home directory. If the file does not exist, the system will use the default message. 7. File comparison command 1, CMP compares the difference between the two files and generates comparison results on standard output. (For non-text files) 2, DIFF compares multiple files with multiple identical file names in different directories. (For text files) 3, CommM sort file and compare it. 4, DIRCMP is used to compare the contents of two directories. -d first lists the files existing in one directory, then list the files stored in both directories and whether they are the same. Finally, the outputs of two different files are compared using the DIFF command. -s first lists the files existing in one directory, then lists the simultaneous files existing in two directories, but not the same file. Eight, documentation and directory operation command (讲 讲) 1, Touch2, CHMOD3, Chown4, CHGRP5, RM6, MV7, CP8, CAT9, RCP10, LN11, MKDIR12, RMDIR Nine, File Information Commands 1, LS2, FIND3, FILE T 10, Command 1, more2, less3, tail4, head5, wc6, read7, od8, pg9, tee10, vi Eleven, file content query command 1, EGRP2, FGREP3, GREP4, STRINGS 12, print command 1, Cancel2, LP3, PR4, LPSTAT5, LPSHUT 13, scheduling command 1, AT2, CRONTAB 14, Storage command 1, Compress2 , CPIO3, DD4, PACK5, TAR6, UNCOMPRESS7, UNPACK8, ZCAT Fifteen, Status Commands 1, Date Display, or Change System Date and Time 2, ENV Displays the current environment or sets one or more environment variables. 3, SAR report system information, the SAR command generates the CPU usage information when the SAR command is generated. -A Report The entire system activity Access List -a Report File System Access the Use of Use data. -b Report the usage of the buffer. -c report system call usage. -K reports the kernel. -m reports the amount of semaphors and messages. 4, Uname Displays information on computer systems and operating systems on standard output. -m Displays the ID of the machine. -r Displays the version number released by the operating system .- s Displays the system name. -v Displays the operating system version number. -S name change the system name. -a Displays the machine ID, the version number of the operating system and the system name. 5, uPtime This command displays the following information: The number of users who have been logged in when the current time system has been logged in. The number of jobs executed in the system. 6. Vmstat is used for information on processes, virtual memory, physical volumes, and CPU activities. Second talk about common management orders Second, the common system management command introduction SHARE and MOUNT command This is the two commands commonly used by the system administrator, and the Share command is used to share the directory of the unit so that other UNIX systems can be used; mount commands are used to hook the directory shared by other UNIX systems to this machine's hanging On the contact, resources of other UNIX systems can be used. For example: Enter Machinea # Share -f NFS -O RW / Share-Dir on Machine A Enter Machineb # mount -f nfs machinea: / share-dir / mount-point on machine B The first command shares the shared-dir directory of the machine A and the shared authority is readable; The second command hungs the shared directory of the machine A to the mount-point directory of the machine B. After completing the two commands, the user can operate the Share-Dir directory on the machine A by accessing the mount-point access on machine B. However, sometimes we perform the mount commands on the machine B, it will return "RPC: Program Not Registered" because of the two daemons (Daemon) of MountD and NFSDs on Machine A. When the UNIX system starts, the system will automatically check the / etc / dfs / dfstab file. If there is a resource to share in the file, start the two daemons, but do not start. So if we don't have content in / etc / dfs / dfstab, the system cannot launch two daemons of MountD and NFSD, and the directory shared by the share command cannot be shared by other systems. The way to solve this problem is simple. We can put the directory you want to share in / etc / dfs / dfstab, then you will automatically share this directory when the system starts; in addition, we can also manually launch these two daemons. The method is to first log in with a superuser (root), enter the following command on the command line: Machine_a # /etc/rc3.d/s15nfs.server start Or input: Machine_a # / usr / lib / nfs / mountd machine_a # / usr / lib / nfs / nfsd -a 16 These two daemons can be launched. After the daemon is started, the shared directory is really shared. At this time, in the machine B, you can use the mount command to pick up the machine A to the machine B. 2. ifconfig command The ifconfig command is used to view and change the address and parameters of the network interface. If you want to display the IP address of a UNIX host, we can enter it under the command line: $ ifconfig -a The system displays the name of the network interface, the status of the interface, the IP address of the interface, and the mask and other information. If we want to change the IP address of the network interface, you can enter in Root permission: #ifconfig hme0 down #ifconfig hme0 202.1.2.3 Netmask 255.255.255.0 Up First, use the Down command parameter to temporarily stop the service of the network interface HME0, and then assign the new IP address and mask to the interface with the ifconfig command, and start the network interface service. In this example, the IP address of the HME0 interface is 202.1.2.3, and the mask is 255.255.255.0. We can also change the IP address of the machine by changing the value of the IP address in File / etc / Hosts and restarting the system. When the system is started, the network interface service is automatically activated. We don't need to create a network port service manually, but sometimes we change the network card or increase the network card, the system cannot automatically start the interface service, then we need to manually create Network port service, enter: Under root permission: #ifconfig hme0 plumb You can create a network port service for the interface LE0. Accordingly, the UNPLUMB parameter with IFConfig can stop the service and turn off the network interface. At this time, we will not see the network interface with the ifconfig -a command. 3. fsck command The fsck command is also a common command that is used to check the file system and fix the damaged file system. The syntax of FSCK is as follows: FSCK (-F fSTYPE) (-M) (-M) (-SPECIAL ...) (-V fSTYPE) (-V) (-Y | Y | N | n) (-o fstype options) (Special ...) among them: -F fSTYPE: Description The type -V: Return the completed command line, but not running -y | y: All questions answer yes -n | N: Answer no -m on all questions: The file system is checked, does not repair the file system. If the file system is installed, it is displayed. UFS FSCK: Sanity Check: / dev / rdsk / c0t0d0s0 okay. -o: File system type option, option is separated by commas, Two most common options: P: Squire (PREEN) mode F: forced check mode, this option ignores the file system status flag. After running FSCK, the command will check the file system in 6 phases. These six stages are: Phase 1: Check the size of the block and block 2: Check the path name 3: Check the connection phase 4: Check the reference count phase 5: Check the free block list 6: Remed for the free block list FSck When checking each stage, if an error is found, it will prompt the user to modify it, and some of the frequent mistakes are: (1). Remove a directory entry without related files: At this time, the user can answer Yes or Y to delete the directory entry. (2). Connect a file that has been assigned but cannot be accessed: fsck finds an allocated I node, but it is not accessible (this node is not connected to any directory). At this time, the "Reconnect?" Answer for FSCK YES, that is, connecting the I node to the Lost Found directory, the file name is the I node number, and then the administrator should check the file type, and determine the file application, copy the file to the corresponding directory. (3). Connection adjustment: In the interaction mode, if the FSck finds that the connection is inconsistent, the user will ask the user to take action, this example discovers that the number of node connections in a directory is inconsistent with the real connection of the directory. At this time, the user should answer Yes or Y to correct the number of connections. (4). The free block table is inconsistent: FSCK is inconsistent with the free block table given in the super block. At this time, the user should answer Yes or Y to correct the super block. From the above error information and processing method, it can be found that in most cases of the FSCK query, you can use Yes to answer, so when you actually apply, you can use the "-y" option to perform this command to check and repair the hard disk. . 4. The route command Route command is primarily used to manually configure the static routing table. For example, we have to add a route to one subnet through the gateway, the command is as follows: #ROUTE Add Net Remote_net_ip Gateway_ip 1 where the add representative to add routing, NET means that the route arrives at a network rather than a host, 1 represents the distal end The network needs to arrive through the gateway, not directly connected to it (this parameter is 0) directly from the network interface. You can also use the following command: #ROUTE AddA_IP -NETMASK NETMASK #ROUTE Add -Host Host_ip local_interface_ip -inter Host_ip Local_Interface_ip -Interface where the command is the same task with the commands described above, and the second command represents the establishment of a network interface to reach another The route of the main unit. Of course, we use "delete", "change" command parameters can delete and modify routing information in the routing table. After executing the route command, we can use the "netstat -r" command to view the current routing information. After configuring the routing table by Route, the routing information will always be saved to the next system restart. After the system is restarted, the routing table is reconfigured. You can set some default routes by modifying files / etc / default, which will be added to the routing table each time the system is started, without having to use the route command every time you start, use the route command to configure the routing table. The format of the / etc / default file is as follows: $ CAT / ETC / DefaultRouter 202.77.111.1 There is only one default route in this file, and the IP address is 202.77.111.1, which means that all local packets are sent through the gateway 202.77.111.1. Sometimes the UNIX system installation is complete, there is no defaultrouter file in the / etc directory. At this time, we can manually create the file and edit the default route, then restart. Once the system is started, the configuration is automatically used by configuration. 5. Unix system management common issues and solutions Forget the root password Root users are also known as superusers, it is the highest authority user, once its password is forgot, there will be many difficulties to the system maintenance and management, the following is the processing method when forgetting the root password: First, we need to start the system from the CD-ROM, the command is: #boot cdrom -s After the system is started, we have to connect the hard disk root partition to the / MNT directory of the disc file system, execute: #mount / dev / dsk / c0t0d0s0 / mnt (this example assumes that the root file system is / c0t0d0s0) Edit the Shadow file of the hard disk partition, set the root's password item position to empty. #CD / MNT / ETC #VI Shadow Note that some systems should edit the / etc / passwd file instead of / etc / shadow file. After the file is finished, remove the honic root file system. #umount / mnt Restart the system and set the new root password. 7, the system cannot start The reason why the system cannot start is roughly as follows: 1) Error boot device If you specify the wrong boot device to make the system not booted, we can use "probe-scsi", "probe-scsi-all", and "probe-ipi" commands in the PROM monitoring level to see what device is connected to the system On, and get the Devalias name of the startup device. The way to enter the PROM is when the system starts, simultaneously press the "STOP" button and "A" button, when the system appears OK>, that is, the system is currently in the PROM monitor level. Display the current configuration with Printenv, if the boot device is not correct, you can use Stenv to reset: OK> STENV Boot-Device Devalias Use the reset command to restart the system, or set-defaults to restore the default. 2) Missing important system files, or files are invalid. You can boot the system with the "-a" option, and the system will provide an interactive boot process. If you can't find a file, the system prompts the user to give the appropriate file. name. 3) Lack of critical system files, or file invalid, such as lack of / etc / passwd file, at this time, the system may boot, but no user can register. The repair method is to start with the CD, and the root file system is hung and edit the / etc / passwd file. 4) When you can't mount the remote file system system, the / etc / vfstab file is automatically executed. If there is a remote file system that cannot be mounted in the file, the system will always be waiting and retry, and cannot enter the login interface. The solution is to start, edit the / etc / vfstab file, and delete the wrong hook content. 3. Keyboard failure If the keyboard failure occurs, that is, the user enters information on the keyboard and there is no response on the screen. First check the hardware connection, that is, the connection of the keyboard and the host is intact, the connection wire is broken or damaged. If the hardware connection is no problem, check if you accidentally use the lock screen command. The method is to press the "CTRL Q" button, if the system has a response, the reason is because the user presses the "Ctrl S" key to temporarily locked the screen. The lock-locked screen will not display information input from the keyboard, but the input information is still executable. If the system still does not respond, we have to restart the system, enter the PROM status, enter the printenv command, and view the value of the input device item, if it is not Keyboard, use OK> STENV InputDevice Keyboard To make the keyboard a input device, then restart the system again, then the system will respond to the user's input. 8. CRON or AT commands cannot be performed The UNIX system does not allow any users to use cron to operate job scheduling, with two files for users, they are /etc/cron.d/cron.Allow and /etc/cron.d/cron.deny. If the username is added to the /etc/cron.d/cron.allow file, the user is allowed to use cron, not the user in this file is not allowed, if the user is added to /etc/cron.d / bro.deny, the user cannot use cron, and other users can use cron. Usually we can configure one of the files as needed. If the user is allowed to use cron, you can use commands. $ crontab mycronfile Install your job scheduling control file in the system / var / spool / cron / crontabs directory. AT and CRON are similar, to use AT, need to configure the /etc/cron.d/at.allow or /etc/cron.d/at.deny file. 9. Cannot log in with root when telnet By default, for security reasons, UNIX systems do not allow terminals other than console to log in with root, so sometimes we log in with root with root by telnet: "Not on System Console" Such an error, at this time, we can allow root to log in via Telnet by modifying the / etc / default / login file. The specific method is to edit the login file and find the following line: Console = / dev / console Comment this line, that is, add the "#" character, the store exit in the row, and use Telnet again, root can log in. 10. About access to the directory We all know that each file in the UNIX system has the corresponding access, the system controls the user's access to the file, and the directory in the UNIX system also has the corresponding access, but its definition is somewhat different from the file. Reading rights: The read rights to the directory indicates that the user can view the contents of the directory, that is, the directory can use the "LS" command. Write permissions: The write permission to the directory indicates that the user can create a new file in this directory or delete it, regardless of whether the user has write permissions. Execution Permissions: Execution Right Indeted that the user can search for files in this directory, which can use files with corresponding access rights in this directory. Summary: All of the above commands are commonly used system management commands, and partial parameters are common parameters. I hope UNIX learners can learn from this year, refer to other UNIX data. In this section, it is inevitable, I hope everyone will correct it. Part II: System Structure Introduction Unix does not use drive names such as C: D: wait to mark a hard disk or partition, on the entire system, no matter how many hard drives, the partition is, only one root directory called root tag For any subdirectory below, it can be a hard disk or a partition, and it can be changed at any time. For example, today you can set up / TMP for a partition on the hard disk, tomorrow you can set him for a new hard drive for your newly installed hard drive If you need to know more about this, you have to look at this professional book in this area. Now I want you to know what is usually in the usual situation, what is the file below all the standard catalogs below, so that you will enter the system of people, but even the homepage of people can not find it, below We talk about the path organization structure of the UNIX file system. The path organization structure of various UNIX type operating systems is basically the same, but there are always some small differences. However, it is generally almost almost. / Root file system, used to store system kernel, launch management, and load points for other file systems. Some universal executables required when the / bin system starts. / CDROM disc load point. / Compat is related to system compatibility, such as system simulation. / DEV equipment entry point. On the UNIX system, each device is viewed as a file, which is placed in all devices / etc, which can be used in all systems / etc. Very important directory, all profiles (you can see as a Windows registry) includes a load point where the user password document is stored here / MNT floppy disk. / PROC process file system, store pseudo files that point to virtual memory of the current active process. / Root root user's work directory. / SBIN system executable. STANSTALL is in this directory. Use the / usr second file system when installing the system. Basically, a directory that is independent of the system core but is part of the operating system, most applications, as well as private information of each user stores in this subsystem / usr / bin and system launch-independent standard application. Some system management programs that do not need to be used when the / usr / sbin system starts. / Usr / games game. / Usr / home user directory. Store your own files, if your user name is abcd, then / usr / home / abcd is your directory, in general, any file below can be dominated, you can create, delete files and directories / usr The header file required for the / include program. The library file required for / usr / lib program. / USR / libexec some executors that are not directly running directly by the user. Such as FTPD Telnetd services / USR / Man Help file / usr / x11r6 x-windows system / usr / x11r6 / bIN executable X-Windows program / usr / x11r6 / include x-windows program header file. / Usr / x11r6 / lib x-windows program library file. / USR / X11R6 / Man X-Windows program help file. / USR / Share's various shared read-only files, most of which are some system information, documentation. / USR / LOCAL third subfinite system, other programs that are not part of FreeBSD. If you install other programs, such as Apache MySQL, such as Apache MySQL, etc., it will be placed here, which is also available under these directory / var storage frequent files, such as email. , Log, etc.. / VAR / log system log. / Var / mail sent to the user's letters. / Var / spool buffer data, such as print data, etc. / VAR / TMP temporary file. Understanding this path structure will provide users with a wide range of UNIX systems. At the same time, we have also seen that the UNIX system's documentation structure is so clear, what is convenient, and looks very easy. Summary: Let's focus on several important directories, no matter if / or / usr or / usr / local, even / usr / home / username, there will be Bin Sbin ETC MAN these directory, usually an application The ordinary executable will be placed in BIN, and the executable related to the system maintenance is placed in the SBIN. The configuration file is placed in the ETC. The help file is placed in Man, and the library file that needs to be used to / usr / lib. To find the header file to / usr / include, find it, I believe that you have something more about something on a UNIX system, but these things are existing, but it is not what you want to see, think Oh, Unix has a set of rules to specify what can do, can't do anything, this document can see who can't see, who can use noble, or who can only see, this is our previous Describe the settings for users and file privileges. Part III: System Launch Procedure 1. Learn from UnixWare 7.1.1 System Boot file SCO UnixWare 7.1.1 boot file Similar to our familiar DOS / Windows system files: IO.SYS, MSDOS.sys with Command.com. In the / standard directory, the name and function of each file are explained below: 1, boot, including the defined boot parameters. 2, UNIX, when the boot program is booted, the program will be searched and loaded to memory, then call boottab, the inittab file (/ etc / initTab), the init process runs, we will say that the system enters the daemon. 3, UNIX.OLD, when the new kernel is scheduled, the file will save the old system boot table boottab. 4, bootmsgs, which contains the system started text information. 5, logo.img, this file is a graphical interface when boot. 6, help.txt, the file contains all the help information after boot:? "After"? ". 7, resmgr, this file is a backup of the ResOSouse Manager database. 8, resmgr.sav, this file is a backup of an old system's ResOSouse Manager database. 9, *. BLM, all BLM files are booted, load modules. Second, understand UnixWare 7.1.1 System Boot Process Unixware 7.1.1 Similar to other UNIX system boot processes: the start of the entire system is divided into two phases, the first phase is the system bootstrap, the second phase is starting UNIX. Since UNIX resides in the media, the entire system startup phase is not exactly the same. Take the boot system from the hard disk as an example. The system bootstrap stage is mainly divided into three steps: 1. The Master Boot block of 0 0 sectors of the hard disk is guided by Rombios; 2. Boot block of the 0th sector of the hard disk activity partition is guided by the Master Boot block; 3. The boot block will boot and run the contents of the sector. Starting the UNIX phase is mainly by booting the UNIX core program by the boot program, that is, boot / stand / UNIX. When the UNIX system is booted, a process called init is initiated, which will start the process listed in the / etc / initTab file and boot the system into a particular run level. Part IV: Introduction to the web server 1. FTP installation and configuration II, DHCP installation and configuration 3, DNS installation and configuration 4. SENDMAIL installation and configuration 5, Apache installation and configuration 6, BBS installation and configuration 7. Installation and configuration of SAMBA Eight, SSH installation and configuration 1. FTP installation and configuration PROFTPD Details When my colleague transmits files to Solaris 8's FTP Server, those before 2002 can always be seen in the window, these files are seen in LS -L in the Solaris system. With the year, and those 2002 documents have no 2002 year. Therefore, the problem is here, we need to update the date of the file with the touch command every time, it is very inconvenient. So, I have identified as a problem with FTP Server. Immediately, I decided to use the familiar Wu-ftpd, but surprisingly, after using this version of FTP Server, I can't display the directory, even the whole directory can not be listed. Thinking of the previous article introduced Proftpd, I decided to try this software. I feel very good, specially write this article, I hope to share with you. PrOFTPD is also an open source software, which is released in GPL license. Proftpd can be said to be an alternative to Wu-ftpd, and it has great improvements in security, scalability. Especially for those who are familiar with Apache, its configuration is very similar to Apache, so it will definitely be able to have a hand. Main features: a single and apache httpd.conf similar configuration files. FtpAccess files in each directory (similar to Apache. Htaccess) are easy to configure, multiple virtual FTP servers, and anonymous FTP services can be run separately It is possible to start an anonymous FTP from inetd / xinetd, which does not require special directory structural systems, and other system files, without site exec commands, in separate mode of operation, reducing the attack risk log, UTMP / WTMP support Shadow Password Support As of this paper, the latest version of PrOFTPD is V1.2.4, in order to ensure system security, it is recommended that you update the software to the latest version. Wget ftp://ftp.proftpd.org/distrib/source/proftpd-1.2.4.tar.gz ./configure --prefix = / usr / local --enable-shadow make (if it is a dual CPU recommended Make -j3) make install Then you can find ProftPD installed under / usr / local, "ProftPD" can be found in / usr / local / sbin / directory, the configuration file proFd.conf is located in: / usr / local / etc /. If you are familiar with the configuration of Apache's httpd.conf, the configuration of PrOFTPD.conf is very simple. DefaultRoot ~ users,! Staff ServerIdent On "FreeLAMP FTP Server" ServerName "" ServerType standalone ServerAdmin webmaster@freelamp.com Bind 192.168.0.1 ExtendedLog / var / log / proftpd read, write, auth ScoreboardPath / usr / local / var / proftpd RequireValidShell We can start under the OFF User Proftpd Group Proftpd. / usr / local / sbin / proftpd & The above configuration method is very simple, and will not be described again. Below we look at the way to restrict anonymous user login: #Maxclients 1 "Maximum Users Reached - Try Again Later" #maxclients 1 "Sorry, Max% M Users - try Again Later" MaxClients None "Sorry, this system does not support anonymous login" Bandwidth control: RateReadbps 81920 RateReadFreebytes 5120 RateReadhardbps on Such a user's bandwidth uses a formula: "RateReadbps x MaxClients = Total Bandwidth Allocation." Is limited, but for each virtual domain, each user, and global restrictions have not been implemented. Only a global variable is affected throughout the server in the 1.2.x series: BANDWIDTH 81920 In addition, you can also use the "MOD_QUOTA" and "MOD_RATIO" modules to control the user's disk limit. Second, DHCP installation and configuration download: ftp://ftp.isc.org/isc/DHCP/DHCP-3.0p1.tar.gz to be continued ... Since I have learned Oracle recently, I can't complete the configuration of other services in time. I am sorry to I recommend a good website. You can go to refer to .http://www.fanqiang.com/ Soon, I will regularly explain the standard UNIXWARE system management and network management, this is, I spent 998 oceans bought, will let everyone share with me.