Linux editor and Server Installation tips and linux tips

Source: Internet
Author: User
Tags file transfer protocol ssh server sublime editor

Linux editor and Server Installation tips and linux tips

1. Editor, Server

Gedit editor or sublime Editor

Gedit 1.txt

 

Steps for installing software on ubuntu

Under/etc/apt/sources. list

1. Backup

Set/etc/apt/sources. list/etc/apt/sources. list. backup

2. Modify the update source

Gedit/etc/apt/sources. list

3. Change the Administrator

Sudo-s can also be added before the command

4. Make the update source valid

Sduo apt-get update

5. Install software

Sudo apt-get install xxx software name

Delete Software

Sudo apt-get remove xxx

Ftp Server

Ftp is short for file transfer protocol

Uses the c/s architecture as the Client/Server mode.

1. Install the vsftpd Server

Sudo apt-get install vsftpd

2. Configure the vsftpd. conf file

Sudo vi/etc/vsftpd. conf

Ssh

Ssh, short for secure shell, is a security protocol built on the application layer and transport layer.

The ssh service needs to install the ssh client on both ends of the communication.

Install ssh

1. install the ssh server sudo apt-get install openssh-server

2. remotely log on to the ssh username @ ip ifconfig to view the ip address

Connect to the server using ssh

Scp

Remote File copying

1. After openssh-server is installed, use sudo apt-get install openssh-server if it is not installed.

2. Format

Scp-r target username @ Target Host IP Address:/absolute path of the target file/absolute or relative path saved to the Local Machine

Vi/vim Editor

Three modes are available: 1. Command mode 2. text input mode 3. Last line mode

Press esc to Enter command mode. Enter wq or x to save and exit or q! Force save and exit

The cursor moves up, down, and left, corresponding to k, j, h, L

Insert to the right of a cursor insert to the left of I cursor insert

Move by A cursor to the end of the row move by I cursor to the beginning of the row

Insert a row to the beginning of the row with the O cursor in the next row

Insert a row to the beginning of the row with the o cursor in the previous row

Rows + G move to the first line of the row 1G = gg fast move to the first line of the first line

Delete:

D: delete all content after the cursor

Dd: Delete the row where the cursor is located

Nd: Delete row n

3dd: Calculate from the row where the cursor is located and delete the next three rows.

Dw: delete the word at the starting position of the cursor

X: The character after the cursor is deleted. X: The character before the cursor is deleted.

Repeat command: Repeat the command of the previous operation

Text row movement:

>>: Right shift of the text line <: Left shift of the text line

Copy and paste

Yy copy the current row n yy copy the nth row

P opens a new line of paste at the position of the cursor

Replacement command:

In dead-end mode, replace abc with 123

: % S/abc/123/g

In the last line mode, replace abc of line 1-15 with 123

: 1, 15 s/abc/123/g

SEARCH command:

Enter/xxx in command mode to find

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.