Rookie's way to attack (ii)------Some basic knowledge and tips on Linux

Source: Internet
Author: User
Tags clear screen

First, the advantages of Linux

Strong stability, open source free (except Rhat).

High security, multi-user, multi-process.

Low cost of resources.


Second, the general standard of partition size

/boot 200M

/swap equivalent to virtual memory

/30% of total memory

/data All remaining partitions


Third, the Linux root directory of the meaning and purpose of each folder

/bin common basic commands for storing Linux

/dev directory where the device files are stored, mainly external devices such as mouse, keyboard

Home Directory Hosting

/lost+found lost file retrieve directory when power down

/mnt Temporary Mount Directory

/proc storing stored processes and user information

/sbin Store administrator-used hypervisor

/srv Data Directory After service startup such as www directory

/tmp directory where temporary files are stored

/var stores files that are often modified, such as logs, data files

/boot storage System kernel and boot files

/etc to store a configuration file or sub-directory

/lib storing the necessary runtime libraries

/media directory where media device files are stored

/opt default directory for third-party software Installation

/root Root User's home directory

/sys contains the hardware status and the system kernel sees the device tree

/usr other users apply graphics and command files


Four, switch network card, start networking Services, configure the network

Ifup eth0 Start Network card

Ifdown eth0 turn off the NIC

Service Network Start/restart start networking Services

Service Network stop Shutdown Network Service


V. BASIC commands

cd = Change Directory

ls = List

Du-sh Viewing the directory size

Useradd + user name add user

passwd + user name gives permissions to user

SU switches the user to the root directory

Su-Switch to the user's home directory

Mkdir-p 1/2/3/4 Creating a folder Cascade

Rmdir-p 1/2/3/4 Deleting a folder cascade

RM-RF forced Delete (r: Recursive F: Mandatory)

File View Files Type

Cp-r copying the entire directory

Cat/tac from the back to view/from the back forward

HEAD-10 View Top 10 lines

TAIL-10 View after 10 lines

NL view file and add line number

More press ENTER to view the file in one line

Less press SPACEBAR to view a page of files


Vi. file attributes

ll+ FileName View file properties

The first letter of the property indicates the file type:

s socket file

Catalog D

-Normal file

B-Block device files

L Link File

C Character file


Seven, several common shortcut keys

Ctrl L Clear Screen

Ctrl a jumps to the beginning of the line

Ctrl u Cancel command

CTRL C Interrupt Command


Rookie's way to attack (ii)------Some basic knowledge and tips on Linux

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.