20145234 Huangfei "Basic design of Information security system" week seventh (Linux command Review)

Source: Internet
Author: User
Tags unzip extract

By the November, half of the semester, and the "Information Security system Design Fundamentals" This course also to the midterm. So, I'm here, on the first half semester of the most basic knowledge, do a review

Review plan is divided into two steps, this time for the Linux command, the next plan to review the GIT and vim related instructions

Study in another blog this week 20145234 Huangfei the seventh week of Information Security study summary

Linux commands 1. Common Tips

Tab completion command, completion directory, completion command parameters

CTRL + C terminates the currently running program, but does not end the terminal

Ctrl+d end input or exit terminal

Ctrl+s suspend the current program, any key recovery

CTRL + Z put the current program in the background (command FG to restore the foreground)

CTRL + A moves the cursor to the input wardrobe (equivalent to home)

Ctrl+e moves the cursor to the end of the input line (equivalent to end)

Ctrl+k Delete all characters from the cursor position to the end of the line

Alt+backspace Delete a word forward

Shift+pgup moving the terminal display up

SHIFT+PGDN moving the terminal display up

Direction key "On" History input instruction

Wildcard: Used to replace unknown characters, find a file (ls *.txt) or create multiple files (Touch {1..10}.txt), etc.

* Match 0 or more characters

? Match any one character

[ABC] matches any single character in ABC

[!ABC] matches any single character except ABC

[N1-N2] matches any single character in N1 to N2

[String1,string2,...] Match sring1 or string2 (or more) one string

[N1. N2] matches all characters from N1 to N2

Man help command

2. User Management commands

who+

Am I view the user name of the current terminal =-M

-A print all that can be printed

-Q Print The current number of logged in users and user name

-U print current logged in user login information

sudo adduser ABC to create a user named ABC

SU-L ABC switch to user ABC

Groups ABC displays user groups where the user ABC resides

sudo deluser ABC--remove-home Delete user abc

3. File Permissions command

ls+ displaying files for the current folder

-L Displays the details of the files in the current folder

-A also shows hidden files

Touch ABC creates a file called "abc"

sudo chown nnn ABC changes the owner of the "ABC" file to user nnn

4. Directory structure and file Basic Operation command

Cd+ Entering the catalogue

.. Go to the top level directory

~ Go to home directory

PWD Gets the current path

Touch Create a blank file

mkdir Creating a blank directory

Mkdir-p Creating a multilevel directory

CP ABC A/B/C Copy the ABC file to the a/b/c directory cp-r copy Directory

RM Delete File

Rm-f Force Delete

Rm-r Deleting a directory

MV ABC a/b/c move file ABC (cut) to a/b/c folder

MV ABC def renames the file ABC to def

Cat Display file Cat-n Displays the line number when the file is displayed

More ABC read file ABC

File Display Type

5. File Lookup and environment variables

Declare ABC to create a variable called ABC

= assigned value

echo $ABC Read variable ABC

environment variable PATH

VIM ABC. Create a C program

Gcc-o ABC abc.c Generate executable file

./ABC.C Execution procedure

Path= $PATH + absolute path Add custom path to environment variable

Find Files

Whereis Find binary file (-B), man Help file (-m), source code file (-s)

Locate count only (-c), ignoring case lookup (-i)

Find

6. File Packaging compression

Zip compression All content (-R) Quiet mode (-Q) Indicates output file (-o+ output filename) encryption (-e)

Du viewing the size of a packaged file

Unzip extract view-only content (-L)

More commonly used packaging tools tar

7. Program Installation

sudo apt-get install ABC installation of a software called ABC

Apt-get Common Commands

install+ Software Name installation software

Update updates the list of packages for update

Upgrade upgrading software that can be upgraded

Remove uninstall Software

Common parameters

-Y automatically responds if the package is installed

-S analog Installation

-Q Install does not display the installation condition

-D only download does not install

--reinstall Re-installation

20145234 Huangfei "Basic design of Information security system" week seventh (Linux command Review)

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.