Summary of basic AIX knowledge (1)

Source: Internet
Author: User

I. Introduction to Aix

Aix is one of the versions of Unix operating systems. It is mainly used on the IBM Xeon 6000 series computers. Other Unix systems, such as SUN's Solaris, HP Unix, and Linux. Currently, the Aix system versions include Aix 4.x Aix5.x. They only have different versions, but the kernel is the same, and the operating command machine is also the same. Some new commands are added when the version is high, which are backward compatible.

Ii. Getting started with Aix

For most users, access to Aix is via telnet to log on to RS6000, of course, with different identities. Use the local machine as a terminal of RS6000 to perform operations on the R S6000. This is actually a major feature of Unix. Unix itself is designed as a multi-task, multi-user concurrency system.

2.1 log on to login)

1. RS6000 Logon

Many users can use Unix systems at the same time. In order to let the system know who the users are and what resources they can use, users must indicate their identities to the system before using them. In addition, Unix considers that users communicate with them through terminals or running the policy software on the PC. A connection must be established between a Unix system and a user terminal to transmit information. The process of establishing a communication connection and indicating a user's identity is usually called login ).

1) RS6000 boot

Press the Power key directly. RS6000 start and self-check. Including hardware self-check and system initialization.

2) log on

By default, the system will enter the Xwindows Environment, that is, the so-called CDE Environment Common Desktop Environment), that is, the public Desktop Environment. After Aix is started, the CDE registration interface is displayed. Enter the user name and password to enter the CDE operation environment. Generally, the RISC6000 client is logged on as the Administrator as the r oot.


2. Client Logon

The client logs on to the server by executing the telnet command and entering the valid user name and password. For example, if you execute telnet 192.168.0.161 on the client and assume the IP address is RS6000, the following logon prompt will appear:

AIX Version 4

C) Copyrights by IBM and by others 1982,199 6.

Login:

Enter the user name, such as long. After you press enter, a prompt is displayed for entering the password:

Long's Password:


3. After Successful Logon

After a successful logon, the system displays some messages, such as the previous user logon time and the message about the system information, that is, the current day message. When a hot message is very important, it is one of the methods for the system administrator to communicate with the user. For example, the system administrator notifies the user of the next system shutdown time through the message on the same day.

AIX Version 4

C) Copyrights by IBM and by others 1982,199 6.

Login: long

Long's Password:

**************************************** *****************

*

* Welcome to AIX Version 4.3!

*

*

* Please see the README file in/usr/lpp/bos for information pertinent

* This release of the AIX Operating System.

*

*

**************************************** *****************

Last unsuccessful login: Fri Dec 28 14:59:34 BEIST 2001 on/dev/pts/0 from 192.3

Last login: Sat Dec 29 10:13:50 BEIST 2001 on/dev/pts/6 from 192.168.0.133

[You have new mail]

$

After the preceding message is displayed, a command prompt is displayed. This indicates that the system will wait for user input. After a non-root user logs on, the prompt is usually $. After the root user logs on, the prompt is #. different command prompts are related to shell. B shell and K shell are used in the prompt $, and K shell is used in Aix.


4. User Permissions

If the Unix system is only used by the user, in addition to the system administrator account provided by the system, the user must create an account for himself. Because you must be very careful when using the system administrator account root, this account has special permissions. Unix has an embedded security mechanism. Generally, users do not have the permission to create new accounts or perform other system management operations. Roo t users use system administrator accounts, also known as Super Users, and have system administrator permissions. However, accidental root support errors may cause system faults. Therefore, the user should enter his/her account for general work. Because he/she has no permissions, the system will not be faulty. In a multi-user environment, superuser's work should be more careful. Because his mistakes will not only affect him, but also affect others and the entire system.

Unix also ensures that different users do not interfere with each other in a multi-user environment. each user has his/her own permissions and can select the group or other users to access his/her work. If you restrict access to o wner, other users cannot access their own data. If a user participates in a group and performs a task together, the user can set the access permission as the owner and other members in the group. If the user data allows any other user to view, the permission can be defined as anyone. For the definition of permissions, we will discuss it when introducing the c homd command.



2.2 logout

After the work is completed, the user needs to exit the system, which prevents others from intentionally or unintentionally accessing his files or using the system through the user's account. In any shell, you can use the e xit command to exit the system. When a user exits from the login shell, the system automatically exits. You can also enter the logout command. $ Logout, or press ctrl + d. For details about how to exit the system, see online help.



2.3 use basic commands

1. telnet command

The telnet command is used to log on to the Aix System on RS6000. Syntax:

Telnet + ip server ip address ). For example, if you log on to a server whose ip address is 192.168.0.161 and type telnet 192.168.0.161 at a Windows command prompt, you only need to set the ip address if you use other telnet software, then you can log on.


2. ls command

The ls command is used to display files in a specified path. The specific format is:

Ls + path. For example, to display files under/home, use $ ls/home. In this way, only the file name is displayed, without other information.

$ Ls-l + path: in addition to the file name, it also displays the attributes, Creation Time, and Group of the file.

$ Ls-a + path to display hidden files.


3. man command

Is the HELP command of Aix. It can display detailed instructions for using a command. This command is useful. The specific syntax is $ man +. For example, to view the usage of the tar command, you can:

$ Man tar


4. cd command

Change the current working directory, similar to the cd command in Dos mode. The specific syntax is:

$ Cd + path: Enter the/home/user directory and run the $ cd/home/user command.

Cd is returned to the upper-level directory. Cd is to return to the directory where the previous step is located.


5. who command

The who command is used to display the current online users. It is very easy to use. Simply enter who at the shell prompt. $ Who


6. cp command

Used to copy files, similar to the copy command in Dos. The specific syntax is:

Cp + file name + path if you want to copy the directory, you need to add the parameter-r or-R

Example: $ cp/home/a.tar/home/demo

$ Cp-r/home/aaa/home/bbb where aaa and bbb are directories.


7. mv command

Used to move files or folders. The specific syntax is:

Mv + file name + path

For example, to move/home/long/a to the/home/long/B directory, run the following command:

$ Mv/home/long/a/home/long/B


8. rm command

Used to delete files or folders. The specific syntax is rm + path + file name. For example, to delete the/home/long/manual.tar file, run the following command: $ rm/home/long/manual.tar.

To delete a directory, use rm-r + path + directory name. For example, to delete the/home/manual directory, use $ rm-r/home/manual

Note: To delete a file or folder, you must first have the write permission on the folder.


9. mkdir command

The specific syntax for creating a directory is mkdir + directory name. For example, to create a directory named test under the/home/long directory, run the following command:

$ Mkdir/home/long/test


10. rmdir command

Unlike mkdir, it is used to delete a directory. Note: this refers to an empty directory with no files in it.) The specific syntax is: rmdir + directory name. For example, to delete the directory just created, you can use the following command: $ rmdir/home/long/test


11. vi commands

Vi commands are commonly used and important commands in unix. You can edit one or more files in full screen mode. If no file is specified during vi Execution, the vi command will automatically generate an unknown and empty working file. If the specified file does not exist, create a new file based on the specified file name. If the modification to the file is not saved, the v I command does not change the content of the original file.

Note: The vi command does not lock the edited object. Therefore, multiple users may edit an object at the same time, and the last saved file version will be retained.

The following are some options and meanings used by the vi command:

-C sub-command: Before editing a specified file, run the specified sub-command.

-R filename: Restore the specified filename.

-R puts the specified file in the editor in read-only mode, so that no modifications to the file will be saved.

-Y number: set the size of the editing window to number.


The following are three modes of vi Editing:

1) the mode in which the command mode enters vi. In this mode, you can enter various sub-commands to perform operations, such as deleting, pasting, moving to the next word, and moving to different lines.

2) In text input mode, you can modify the content of a row and add new lines. In command mode, enter the, I, or c key to enter the text input mode. Press the Escape key to return to the command mode.

3) command item mode in this mode, you can enter more parameters through sub-commands. For example, the w sub-Command requires entering a file name, and the "/" sub-Command requires entering a search item. The user uses the Escape key to return to the command mode.


The following is the self-Command executed in self-command mode and moved on the same line:

H. move the cursor to the left.

L move the cursor to the right.

J. move the cursor down one cell.

K moves the cursor up a grid.

W move the cursor to the front of the next small word.

W move the cursor to the front of the next large word.

B. move the cursor to the front of the previous small character.

B. move the cursor to the front of the previous character.

E move the cursor behind the next small word.

E. move the cursor behind the previous big word.

Fc moves the cursor to the next c character in the same row.

Fc moves the cursor to the first c character in the same row.

Tc moves the cursor to the first grid of the next character c in the same row.

Tc moves the cursor to the next cell of the first character c in the same row.

Number | move the cursor to the number column.

The following is a sub-command to move between lines in command mode:

+ Or Enter to move the cursor to the first non-blank character in the next line.

-Move the cursor to the first non-blank character in the previous line.

0 move the cursor to the first character of the current row.

$ Move the cursor to the last character of the current row.

H move the cursor to the top row of the screen.

L move the cursor to the bottom of the screen.

M moves the cursor to the center of the screen.


The following is a sub-command to change the screen display in command mode:

Z-use the current row as the last line of the screen and display the screen again.

Z. Use the current row as the middle line of the screen and display the screen again.

Ctrl + l re-display the current content of the screen.

/Pattern/z-find the next position of pattern and set the row as the last line of the screen.


The following sub-commands are used to display the page in command mode:

Ctrl + f roll back one page.

Ctrl + d roll back half page.

Ctrl + B roll forward one page.

Ctrl + u roll forward half page.

Ctrl + e scroll down a line.

Ctrl + y roll up a row.


The following sub-commands are used to search for strings in command mode:

/Pattern: Search for the specified pattern. If the end of the file is reached, start from the beginning.

? Pattern looks forward to the specified pattern. If a file header is encountered, it starts from the end.

N re-executes the last defined search in the specified direction.

N re-executes the last defined search in the opposite direction of the last specified direction.

/Pattern/+ number: place the cursor on the number line behind the row containing pattern.

/Pattern/-number: place the cursor on the number line before the row containing pattern.

% Moved to the matched ")" or.


The following is a subcommand used to input text in text input mode. You can return to the command mode by Escape at any time ):

A starts to input text after the cursor.

A. Enter text at the end of the row.

I start to input text before the cursor.

I. Enter text before the first non-blank character in the row.

O insert an empty row behind the row where the cursor is located.

O insert an empty row before the row where the cursor is located.


The following is a subcommand used to change the text in command mode. you can press the Escape key to return to command mode at any time ):

Cc or S.

C. The part after the cursor position of a row.

Cw changes the word where the cursor is located.

Dd deletes the current row.

D. Delete the content behind the cursor in the row.

Dw deletes the word where the cursor is located.

J. Add the content of the next row to the end of the row.

Rc replaces the character of the optical character with c.

R covers the content of the bank.

U resumes the last modification.

X deletes the character of the cursor.

~ Change the case sensitivity of the output character of the cursor.

. Repeat the previous operation.

Move the current row to the left.

Move the current row to the right.


The following command is used to copy text in an object:

P retrieves the content of the buffer to the bottom line of the row where the cursor is located.

P retrieves the buffer content from the top row of the row where the cursor is located.

"Bd deletes the text to the famous Buffer Zone B.

"Bp posts the content in the famous Buffer Zone B.

Yy puts the current row into the buffer.

Y puts the current row into the buffer.

Yw puts the word with the cursor in the buffer zone.


The following sub-commands are used to save files:

: W: Write back the modified file.

: W filename: If filename does not exist, save the modified file as filename. If filename exists, an error is returned.

! W filename if the filename file exists, save the modified file as filename.


The subcommands used to switch between multiple files edited by vi are listed below:

: N start to edit the next file in the vi activated file list.

: N filenames: Specifies the list of new files to be edited.


The subcommands used to switch between the current file and another file are listed below:

: E filename: Use filename to activate vi and install another file filename in vi ).

E! Reload the current file. If there are changes to the current file, the previous changes will be discarded.

: E + filename use filename to activate vi and edit it from the end of the file.

: E + number filename use filename to activate vi and edit it in row number.

: E # start editing another file.


The following sub-commands are used to add other file codes to this file:

: R filename reads the filename file and adds its content to the current file.

: R! Command to execute the command file and add its output to the current file.


The following are other sub-commands in vi:

Ctrl + g to obtain information about the file being edited.

: Sh start sh, return available exit or ctrl + d from sh.

:! Command to execute command.

!! Re-execute the last :! Command subcommand.

: Q exits vi. If the user modifies the edited file, the system does not allow the user to exit using the q command.

: Q! Exit vi, regardless of whether the file is changed.

ZZ or: wq Save the changes to the file and exit vi.

Users can access a special file. Exrc defines special vi commands. When using these commands in vi, you must add a colon Before the command :).


Oracle video tutorial follow: http://u.youku.com/user_video/id_UMzAzMjkxMjE2.html


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.