Information Security system design basics first week study summary

Source: Internet
Author: User

I. INTRODUCTION of Linux

What is 1.Linux:

Our Linux is the system call and the two layers of the kernel, of course, the intuitive view, we use the operating system also contains some of the applications running on it, such as text editor, browser, e-mail.

The difference between 2.Linux and Windows:

(1) Linux free or small fee, windows expensive

(2) Software and support

(3) Security

(4) Usage habits

(5) Customizable

(6) Scope of application

(7) What Windows does not have

Ii. Basic Concepts and operation

1.Linux Desktop Environment Introduction:

Linux does not have a graphical interface compared to today's Windows systems. The graphical interface we see is actually just a set of software that runs on top of a Linux system.

You can choose to install a different desktop environment on Linux, or even customize your own desktop.

2.Linux Terminal

The user communicates with the Linux system through the Shell (Command resolver). Under the graphical interface, Linux uses the Terminal emulator Program (Terminal) to accept user input and display output.

Note that there is a difference between the terminal (Terminal) and the console console (console).

The shell refers to the software that is provided to the user to use the interface, which is the program that can accept the command.

3 Command-line operations

(1) Important shortcut keys:

tab: For hints, can complete the command, directory, command parameters;

CTRL + C key to forcibly terminate the current program (but does not cause the terminal to exit), used to stop an unknown program or restore the program to receive the information normally function;

Use the arrow keys on your keyboard to restore the commands you have entered previously.

The "Up" key restores previously entered commands.

(2) wildcard characters

There are mainly asterisks (*) and question marks (?). )。 Used for fuzzy matching of strings (such as file names, parameter names).

(3) Get Help on the command line

Mans <command_name>

For example: Man Mans

Mans 3 printf

Job: After installing with the given command, enter banner 20135204:

Then change the font:

Third, user and file Rights management

1.Linux User Management

The user's files may be put together, but due to user management and permissions mechanism, different users can not easily view, modify each other's files.

(1) View users:

Who commands common parameters

(2) Create User:

Why does authentication fail?

(3) User group

To delete a user:

sudo deluser lilei--remove-home

2. Linux file permissions

(1) View file permissions:

Query all files: ls command, if followed by-A, is to show hidden files

Create user--Login--Create file--view owner

(2) Change file owner

(3) Modify file permissions

3. Operation:

Iv. Linux directory structure and file basic operation

1.Linux directory Structure

(1) FHS standard

Two-tier specification: What to put in the first layer/below the data file The second layer is defined for subdirectories of the/USR and/var directories.

(2) directory path

Go to the upper level: CD.

Go to your home directory: cd~

Get the current path using PWD

Basic operations for 2.Linux files:

(1) Touch Create blank file

mkdir new Empty Directory-P Create parent Directory

(2) copy (CP)

To replicate successfully, you need to add the-R or-R

(3) Delete (RM)

Ignore prompt to delete directly:-F

(4) Move file and file rename

Mobile: MV Rename: MV Batch rename: rename

(5) View files

Cat TAC NL Plus-n Displays line numbers

More or less paging view files

Head and tail view file only one line-n followed by the number of rows

(6) To view file types: Files

(7) Edit file: Emacs Vim Nano

3. Work: Summon a pair of eyes

V. Environment variables and file search

1. Environment variables:

Set ENV Export

2. Find

Whereis can only search binaries (-B), man Help Files (-m), and source code files (-s). You can use the Locate command if you want to get a more comprehensive search result.

The locate command can be found in the current folder and its subfolders, and can look for files that resemble all JPG types such as/*.jpg.

Typically, which is used to determine whether a specified software is installed because it searches for commands only from the path specified by the PATH environment variable.

The path to the Find command is the first parameter, and the basic command format is find [path] [option] [action].

3. Operation:

Digital Rain

Vi. file Packaging and compression

1. Common compressed Package file format: Zip rar tar

(1) Zip file Packaging: the-r parameter indicates that the recursive package contains all the contents of subdirectories, the-Q parameter is expressed as quiet mode, that is, not to the screen output information,-O, the output file, the compression level-[1-9],1 represents the fastest compression but the volume is large, 9 represents the smallest but the longest time. The output file name needs to be packaged immediately thereafter. Later, use the du command to view the size of the file after packaging.

Zip parameter file. zip file absolute Path

(2) Use the-e parameter to create an encrypted compressed package.

(3) Unzip the zip file using the unzip command

(4) If you do not want to unzip just want to view the contents of the compressed package you can use the unzip plus the-l parameter.

(5) RAR is also a commonly used in Windows compressed file format, on Linux can use RAR and Unrar tools to create and decompress RAR compression package.

(6) RAR command parameters do not-if added will be an error. D: Deletes a file from the specified compressed package file. L: View the unresolved file.

(7) Tar packaging and decompression:

Create a tar package: TAR-CF Shiyanlou.tar ~

Unpack a file (-x parameter) to the existing directory of the specified path (-c parameter):

$ mkdir Tardir

$ TAR-XF shiyanlou.tar-c Tardir

2. Job

Vii. file system operations and Disk Management

DF View disk capacity du View directory capacity

Simple Disk Management:

DD for converting and copying files, creating virtual image files

MKSF Formatting a disk

Mount mount disk to directory tree

Umount Uninstalling mounted Disks

FDISK is a disk partition

Command execution sequence control and piping

1. Control of command execution order

2. Piping

(1) pipeline is divided into anonymous pipe and named pipe

What we often use when using some filtering programs is the anonymous pipeline, which is delimited by the | delimiter in the command line. A named pipe is simply a named pipe, usually a named pipe in the source program.

(2) Cut prints a field for each line.

(3) The Grep-r parameter represents a recursive search for a file in a subdirectory,-n indicates a print match line number, and-I means that the binary file is ignored.

(4) Sort is to sort the input in a certain way and then output

Nine, simple text processing

1. Text Processing commands

TR can be used to remove some text from a piece of textual information, or to convert it.

Col can change tab to equal number of spaces, or reverse the operation

A join is used to merge the rows that contain the same content in two files.

Paste this command is similar to the join command, where it is simple to merge multiple files together and tab-separated without comparing the data.

2. Job

X. Data Flow Redirection

1. Simple redirection

2. Standard error redirection

3. Use the tee command to redirect to multiple files at the same time

4. Permanent Redirection

5. Close the file descriptor

As we opened the 3rd file descriptor above, you can close it using the following actions:

$ exec 3>&-
$ CD/DEV/FD;LS-AL;CD-

6. Output of the fully shielded command: set/dev/null

7. Using Xargs to split the parameter list

8. Homework:

Xi. the basis of regular expressions

1. A regular expression that uses a single string to describe and match a series of strings that conform to a certain syntactic rule

2. Basic syntax: a regular expression is often referred to as a pattern, which is used to describe or match a series of strings that conform to a certain syntactic rule

(1) Select:

| Vertical delimiter indicates selection, e.g. "Boy|girl" can Match "boy" or "Girl"

(2) Quantity limit:

The number is limited in addition to our examples of *, there are + Plus,? Question marks,. The dot number, if the number qualifier is not added to a pattern, it appears once and only once

(3) Scope and priority:

() parentheses can be used to define the scope and precedence of a pattern string, which can be easily understood as whether to enclose the pattern strings in parentheses as a whole

3. grep Pattern Matching command

The grep command is used to print matching pattern strings in the output text, which uses regular expressions as criteria for pattern matching

4. Sed Flow Editor

The SED tool is the flow editor for filtering and converting text

5. Awk is an excellent text-processing tool

12. Software Installation under Linux

1. There are typically three ways to install software on Linux:

Online installation disk Install the Deb package from the binary package installation from the source code to compile the installation

To install the Deb package from a local disk using dpkg:

First use the Apt-get plus-d parameter only download not installed, download the Emacs Editor's Deb package, after the download is complete,

We can view the contents of the/var/cache/apt/archives/directory, we will copy the first deb to the home directory and use dpkg to install

To view the installation directory for installed packages:

Using Dpkg-l to view the Deb package directory information

To install from a binary package:

All we need to do is unzip the binary package downloaded from the network and put it in the appropriate directory, then add the directory containing the executable's main program file into the PATH environment variable.

Installation of Linux is complete:

Information Security system design basics first week study summary

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.