In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
A brief introduction to Aix
Aix is one of the versions of the Unix operating system, which is mainly used on IBM RISC 6000 series minicomputers. Other Unix, such as SUN's Solaris, HP Unix, Linux and so on. At present, the versions of Aix system include Aix 4.x Aix5.x and so on. They are just different versions, but the kernels are all the same, and the operation commands are the same on the machine. Higher versions will add some commands, all of which are backward compatible.
Introduction to the use of Aix
For most users, the access to Aix is through the telnet method to log in to RS6000, of course, in a different identity. Use the local machine as a terminal of RS6000 to complete the operation of RS6000. This is actually a major feature of Unix. Unix itself is designed as a multi-task, multi-user concurrent system.
2.1Login (login)
1. Login of RS6000
Many users can use the Unix system at the same time. In order to let the system know who the user is and what resources can be used, the user must identify himself to the system before using it. In addition, U nix believes that users communicate with them through terminals or running policy software on PC. A connection for transmitting information must be established between the Unix system and the user terminal. The process of establishing a communication connection and identifying a user is usually called login.
(1) Boot of RS6000
Press Power directly. RS6000 start, self-test. Including the hardware self-test, system initialization.
(2) Login
By default, the system enters the Xwindows environment, the so-called CDE environment (Common Desktop Environment), that is, the public desktop environment. In this way, after Aix starts, the CDE registration interface will be displayed directly, and after entering the user name and password, you will enter the CDE operating environment. You are usually logged in as r oot (administrator) on the RISC6000 side.
2. Login of the client
The client mainly logs in to the server by executing the telnet command and entering a valid user name and password. For example, if you execute telnet 192.168.0.161 (assuming IP of RS6000) on the client side, the following login prompt will appear:
AIX Version 4
(C) Copyrights by IBM and by others 1982, 1996.
Login:
Then enter your user name, such as long. After you enter, you will be prompted to enter your password:
Long's Password:
3. After successful login
After a successful login, the system displays messages such as the last time the user logged in, a message about system information (called a message of the day), and a message informing the user if there is a mail. Among them, when the hot message is very important, it is one of the ways for the system administrator to communicate with the user, such as the system administrator notifies the user of the next time the system shuts down through the message of the day. As shown in the figure:
AIX Version 4
(C) Copyrights by IBM and by others 1982, 1996.
Login: long
Long's Password:
* * *
*
* Welcome to AIX Version 4.3!
*
*
* Please see the README file in / usr/lpp/bos for information pertinent to
* 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 above message is displayed, a command prompt is displayed. This indicates that the system will wait for user input. The prompt for non-root users is generally $after login, while for root users, the prompt is #. Different command prompts appear related to shell. The prompts for B shell and K shell use $, while in Aix, K shell.
4. User's permissions
If the Unix system can only be used by the user, the user should set up an account for himself in addition to the system administrator account provided by the system. Because you have to be very careful when using the system administrator's account (root), this account has special permissions. Unix has a built-in security mechanism, and ordinary users do not have permission to create new accounts or perform other system management operations. The roo t user uses the system administrator account, also known as the superuser, and has the privileges of the system administrator. But root advocates that careless errors can lead to system failure. Therefore, when users are doing general work, they should enter their own account, because they do not have the authority, it will not bring failure to the system. In a multi-user environment, superusers should be more careful in their work. Because his mistakes will affect not only himself, but also others and the whole system.
Unix also ensures that in a multi-user environment, different users do not interfere with each other, each user has his own work rights, and can choose the access rights of the group or other users to their own work. If access is limited to o wner, then your own data will not be accessible to others. If a user participates in a group and works together on a task, the user can set the access rights to owner and other members of the group. Permissions can be defined as anyone if the user's data is allowed to be viewed by any other user. The section on defining permissions will be discussed when introducing the c homd command.
2.2 logout
After the work is finished, the user needs to log out of the system, which prevents others from accessing his files or using the system through the user's account intentionally or unintentionally. In any shell, the way to exit the system is to use the e-xit command, which exits the shell. When a user exits from login's shell, it automatically exits the system. You can also type the logout command. Logout, or press ctrl + d. If it is a graphical interface, see the online help for exiting the system.
2.3 use basic commands
1. Telnet command
The telnet command is used to log the client into the Aix system on RS6000. The syntax is:
Telnet + ip (ip address of the server). For example: log in to the server with ip address 192.168.0.161 and type telnet 192.168.0.161 at the command prompt of Windows. Of course, if you use other telnet software, just set up ip and log in.
2. Ls command
The ls command is used to display files under the 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 and no other information is included.
The $ls-l + path shows not only the file name, but also the file's properties, creation time, and group to which it belongs.
$ls-a + path, showing implied files.
3. Man command
Is an Aix help command that displays detailed instructions for the use of a command. This command is useful. The syntax is $man + command. For example, to see how the tar command is used, you can use:
$man tar
4. Cd command
Change the current working directory, similar to the cd command in Dos mode. The specific syntax is:
The $cd + path, for example, go to the / home/user directory and use the $cd / home/user command.
Cd is returned to the previous directory. Cd is to return to the directory where the previous step was located.
5. Who command
The who command is used to display users who are currently online. It is very easy to use, just type who at the shell prompt. $who
6. Cp command
Used to copy files, similar to the copy command under Dos. The specific syntax is:
Cp + File name + path if you want to copy a directory, you need to add the parameter-r or-R
For 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, move / home/long/a to the / home/long/b directory, use 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, use the following command: $rm / home/long/manual.tar
If you want 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 write access to the folder.
9. Mkdir command
The specific syntax for creating a directory is mkdir + directory name. For example, to create a directory called test under the / home/long directory, use the following command:
$mkdir / home/long/test
10. Rmdir command
Contrary to the purpose of mkdir, it is used to delete a directory. (note that this refers to an empty directory, where there are no files.) the specific syntax is: rmdir + directory name for example, if you delete the directory you just built, you can use the following command: $rmdir / home/long/test
11. Vi command
The vi command is a common and important command under unix, which can edit one or more files in full-screen mode. If no file is specified when vi is executed, the vi command automatically produces an unnamed, empty working file. If the specified file does not exist, a new file is created with the specified file name. The v I command does not change the contents of the original file if the changes to the file are not saved.
Note: the vi command does not lock home-edited files, so multiple users may be editing a file at the same time, and the last saved version of the file will be retained.
Here are some of the options and implications used by the vi command:
-c sub-command executes the specified command sub-command. C before editing the specified file.
-r filename restores the specified file filename.
-R places the specified file in the editor as read-only, so that any changes to the file are not saved.
-y number sets the size of the editing window to the number line.
Here are three modes for vi editing:
(1) the mode in which the command mode enters vi. In this mode, the user can enter each sub-command pair to operate, such as deleting lines, pasting lines, moving to the next word, moving to different lines, and so on.
(2) the text input mode can modify the content of a line and add a new line in this mode. Type a, I, or c in command mode to enter text input mode, and press Escape to return to command mode.
(3) Command item mode in this mode, you can enter more parameters through subcommands. For example, the w subcommand requires a file name, and the "/" subcommand requires a lookup item. The user uses the Escape key to return to command mode.
The following are self-commands that are executed from command mode and moved on the same line:
H moves the cursor one grid to the left.
Move the cursor one square to the right.
J move the cursor down one grid.
K moves the cursor up one grid.
W move the cursor to the front of the next small print.
W moves the cursor to the front of the next big word.
B move the cursor to the front of the previous small print.
B move the cursor to the front of the previous big word.
E move the cursor after the next small print.
E move the cursor to the back of the previous big word.
Fc moves the cursor to the next c character on the same line.
Fc moves the cursor to the previous c character on the same line.
Tc moves the cursor to the space before the next character c on the same line.
Tc moves the cursor to the space after the character c on the same line.
Number | move the cursor over the passing number column.
Here are the subcommands that move between lines in command mode:
+ or Enter moves the cursor to the first non-white space character on the next line.
-move the cursor to the first non-white space character on the previous line.
0 moves the cursor to the first character of the current line.
Move the cursor to the last character of the current line.
H moves the cursor to the top line of the screen.
L move the cursor to the bottom line of the screen.
M moves the cursor to the middle of the screen.
Here are the subcommands to change the screen display in command mode:
Z-takes the current line as the last line of the screen and redisplays the screen.
z. Take the current line as the middle line of the screen and redisplay the screen.
Ctrl+l redisplays the current contents of the screen.
/ pattern/z- looks for the next location of pattern and sets the line to the last line on the screen.
Here are the subcommands used to display the page in command mode:
Ctrl + f scroll back one page.
Ctrl + d scroll back half a page.
Ctrl + b scroll forward one page.
Ctrl + u scroll forward half a page.
The Ctrl + e screen scrolls down one line.
Scroll one line on the Ctrl + y screen item.
Here are the subcommands used to find strings in command mode:
/ pattern looks back for the specified pattern, and if it encounters the end of the file, it starts from scratch.
? Pattern looks forward for the specified pattern, and if it encounters the header of the file, it starts at the end.
N performs the last defined lookup again in the last specified direction.
N performs the last defined lookup again in the opposite direction of the last specified direction.
/ pattern/+number pauses the cursor over the number line after the line that contains pattern.
/ pattern/-number pauses the cursor over the number in front of the line that contains pattern.
% moved to matching "()" or "{}".
Here are the subcommands used to enter text in text input mode (the user can press Escape to return to command mode at any time):
A start entering text after the cursor.
An enter text at the end of the line.
I start entering text before the cursor.
I enter text before the first non-blank character at the beginning of the line.
O insert a blank line after the line of the cursor.
O insert a blank line before the line where the cursor is located.
Here are the subcommands used to change the text in command mode (the user can press Escape at any time to return to command mode):
Cc or S modifies an entire line.
C the part after changing the cursor position of a line.
Cw changes the word where the cursor is located.
Dd deletes the current line.
D deletes the content behind the cursor on the line where the cursor is located.
Dw deletes the word where the cursor is located.
J adds the next line to the end of the line.
Rc replaces the character of the light character with c.
R overrides the content of this line.
U restores the last modification.
X deletes the character where the cursor is located.
~ change the case of the outgoing character where the cursor is located.
. Repeat the previous operation.
"move the current line to the left.
"move the current line to the right.
The following is the word command for copying text in a file:
P takes the contents of the buffer to the line below the cursor.
P fetches the contents of the buffer to the line above the cursor.
"bd deletes the text to the named buffer b.
"bp posts the contents of the named buffer b.
Yy puts the current line in the buffer.
Y places the current line in the buffer.
Yw places the word where the cursor is located in the buffer.
Here are the subcommands to save the file:
: W write back the modified file.
W filename when filename does not exist, save the modified file as a file filename, and report an error when the file filename exists.
! W filename if the file filename exists, save the modified file as the file filename.
The subcommands used to switch between multiple files edited by vi are listed below:
: n starts editing the next file in the list of files activated by vi.
: n filenames specifies the new list of files to be edited.
The subcommands used to switch between the current file and another file are listed below:
: e filename activates vi using filename (loads another file, filename, in vi).
E! Reload the current file and discard the previous changes if there are any changes in the current file.
E+filename activates vi using filename and edits from the end of the file.
: e+number filename activates vi using filename and starts editing at line number.
: e# starts editing another file.
Here are the subcommands used to add other file code to this file:
R filename reads the filename file and adds its contents to the current file.
: r! Command executes the command file and adds its output to the current file.
Here are the other subcommands in vi:
Ctrl+g gets information about the file being edited.
Sh starts sh and returns available exit or ctrl+d from sh.
:! Command executes the command command.
!! Re-execute the last:! Command subcommand.
: Q exit vi. If the user modifies the edited file, the system will not allow the user to exit using the Q command.
: q! Exit vi regardless of whether or not there are changes to the file.
ZZ or: wq saves changes to the file and exits vi.
Users can be found in a special file. Special vi commands are defined in exrc. When using these commands in vi, you must precede the command with a colon (:).
For the oracle video tutorial, please follow: http://u.youku.com/user_video/id_UMzAzMjkxMjE2.html
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.