Install VNC on centos

Source: Internet
Author: User
Tags first string

Directly go to the command mode. If it is a server, you can use the putty connection to enter the command line mode.

The VNC in centos is tigervnc. Because it is a server, we only need to install tigervnc-server: Yum install tigervnc-server and then modify the VNC configuration file: CD/VI/etc/sysconfig/vncservers only requires two types of content. One is to define the user, and the other is to define the user logon condition: vncservers = "1: Root 2: river "vncserverargs [1] ="-geometry 800x600-nolisten TCP "vncserverargs [2] ="-geometry 800x600-nolisten TCP "then log on in Command Line Mode root and river users, after logon, set the vncserver password. After logon, perform the following operations: vncpasswdpassword enter the password verify enter the password again to start the VNC service:/sbin/service VNC Server start: Set firewall: iptables-I input-p tcp -- dport 5901: 5902-J accept iptables-I input-P UDP -- dport 5901: 5902-J accept configuration graphical interface: Cd ~ /. Vncvi xstartup: Modify the TWM at the end of the document to gnome-session or startkde. Do not add any characters after this. Otherwise, you will be responsible for the consequences. Haha. Log on to the VNC Viewer: XXX. XX: 1. Check p.s after the colon. If you cannot log on, restart vncserver [/sbin/service vncserver restart]

 

The following are related VI editing commands: Excerpted from http://www.21ds.net/article/23/308?editor is the most common tool in all computer systems. In UNIX, the editors include ex, sed, and VI. Among them, VI is the most widely used, while VI commands are numerous. The Forum does not seem to have a summary of this. The following is a summary, share resources! Eager to correct and supplement!

Access the VI command
VI filename: open or create a file and place the cursor at the beginning of the first line
Vi + N filename: open the file and place the cursor at the beginning of line N
Vi + filename: open the file and place the cursor at the beginning of the last line
Vi +/pattern filename: open the file and place the cursor at the first string matching pattern
VI-r filename: a system crash occurred when VI was being edited last time, restoring filename
VI filename... filename: open multiple files and edit them one by one.

Move cursor command
H: move the cursor one character to the left
L: move the cursor one character to the right
Space: move the cursor one character to the right
Backspace: move the cursor one character to the left
K or Ctrl + P: move the cursor up a row
J or Ctrl + N: move the cursor down a row
Enter: move the cursor down a row
W or W: move one word to the beginning of the word to the right of the cursor.
B or B: move one word left to the beginning of the word
E or E: move one word to the end of the word to the right of the cursor.
): Move the cursor to the end of the sentence.
(: Move the cursor to the beginning of the sentence.
}: Move the cursor to the beginning of the paragraph
{: Move the cursor to the end of the paragraph
NG: move the cursor to the beginning of line N
N +: move the cursor down n rows
N-: Move n rows above the cursor
N $: move the cursor to the end of line N
H: move the cursor to the top line of the screen
M: move the cursor to the middle line of the screen
L: move the cursor to the last line of the screen
0: (Note the number is zero) move the cursor to the beginning of the current row
$: Move the cursor to the end of the current row

Screen tumble command
CTRL + u: half screen at the beginning of the file
CTRL + D: Flip the half screen to the end of the file
CTRL + F: Flip the screen to the end of the file
CTRL + B; open a screen at the beginning of the file
NZ: Rolls row n to the top of the screen. If n is not specified, the current row is rolled to the top of the screen.

Insert text commands
I: Before the cursor
I: at the beginning of the current row
A: After the cursor
A: At the end of the current row
O: open a new row under the current row
O: open a new row above the current row.
R: Replace the current character
R: Replace the current and subsequent characters until you Press ESC.
S: Starting from the current cursor position, replace the specified number of characters with the input text
S: delete a specified number of rows and replace them with the input text
NCW or NCW: modify a specified number of characters
NCC: modifies a specified number of rows.

DELETE command
Ndw or ndw: n-1 characters starting at and following the cursor
Do: Delete to the beginning of a row
D $: Delete to the end of the row
NDD: Delete the current row and the next n-1 row
X or X: delete a character. x deletes the character after the cursor, and X deletes the character before the cursor.
CTRL + u: delete text entered in input mode

Search and replace commands
/Pattern: Search for pattern from the beginning of the cursor to the end of the file
? Pattern: Search for pattern from the beginning of the cursor
N: Repeat the previous search command in the same direction.
N: Repeat the previous search command in the reverse direction.
: S/P1/P2/G: replace all p1 in the current row with P2.
: N1, N2s/P1/P2/G: replace all P1 from line N1 to line N2 with P2.
: G/P1/S // P2/G: replace all P1 files with P2.

Option settings
ALL: lists all options.
Term: Set the terminal type
Ignorance: Case Insensitive in search
List: displays the stop table (CTRL + I) and end mark ($)
Number: displays the row number.
Report: displays the number of changes made by line-oriented commands.
Terse: displays brief warning information
Warn: No write information is displayed if the current file is not saved when it is transferred to another file.
Nomagic: allows you to use special characters without "\" in search mode.
Nowrapscan: Prohibit VI from searching at both ends of the file and starting from the other end.
Mesg: Allows VI to display the information that other users write to their terminal using write.

Last-line command
: N1, N2 Co N3: copy the content from line N1 to line N2 to line N3.
: N1, N2 M N3: Move the content from line N1 to line N2 to line N3
: N1, N2 D: Delete content from line N1 to line N2
: W: Save the current file
: E filename: open the file filename and edit it.
: X: Save the current file and exit.
: Q: Exit VI.
: Q! : Do not save the file and exit vi
:! Command: execute shell command
: N1, N2 W! Command: The content from line N1 to line N2 in the file is used as the command input and executed. If N1 and N2 are not specified, the entire file content is used as the command input.
: R! Command: place the output result of the command to the current line.

Register operation
"? Nyy: Save the content of the current row and Its n rows to the register? , Where? It is a letter, and N is a number.
"? Nyw: Save the current row and Its n characters to the register? , Where? It is a letter, and N is a number.
"? Nyl: Save the current row and Its n characters to the register? , Where? It is a letter, and N is a number.
"? P: retrieve the register? And place it at the cursor position. Here? It can be a letter or a number.
NDD: delete n lines of text from the current row and its bottom, and put the deleted content in the delete Register No. 1.

Install VNC on centos

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.