2019-10-19 Liangjia Ni Linux command

Linux consolidation

 Introduction to Linux

  Introduction to Linux

   Linux is a UNIX-like computer operating system collectively 

   The name of the Linux operating system kernel is also "Linux"

   Linux is a Finnish university student Linus Torvalds 1991 Nian written

   Linux word itself, said Linux kernel, but in fact it has been used to describe the whole even with Linux Linux kernel, and operability GNUI use a variety of tools and databases

  Linux distributions composition

   Linux kernel

   application

       Some GUN libraries and tools

        Emacs integrated development environment and text editors

        Gcc language editor

        GNOME

      Command line shell

      Graphical desktop environment

         KDECQT (written)

         GNOMECGTK (written)

         Unity

      Some office suite

         Open office

      translater

         gcc

         gtt

      Text editor to scientific tools applications

         we

         gedit

  Linux version

    Release a commercial company to maintain Red hat series

        RHELCRedhat

        Enterprise Linux is the so-called red hat

        A dvance server versions charges

        Community clone version of Centos CRHEL

        Fedora Core desktop version from the original red hat evolved, the free version

     Release of Debian community organizations to maintain

        Debian

        Ubuntu

  Linux Directory Structure

    Root directory structure

        dev device file directory

        etc contains the information about the current operating system, all user configurations

        home current operating system installed on the user's home directory

        Lib library files used by the operating system and associated configuration settings are placed in this directory

        mnt directory manually mount

        media system to automatically mount directory

        usr Unix software package resource management directory, something is stored in the user's current

        Executable under bin Linux operating system-level binary commands

        sbin super users need to use the directory to store some binary command

        boot the system to load the boot files and configuration

        File fragmentation lostt found memory system error is generated to allow users to find and restore

        Why is an interface provided by prd, mainly used to store system statistics     

        root root user's home directory

        Some files need to run storage system running

     Introduction directory path

        Absolute path

           Path from the root directory to start from the beginning is described

        relative path

           Described starting from the position of the current path

           It represents the current directory

 

           It represents the parent directory of the current directory

           Two parts catalog direct handover command: cd -

         Robertohuang @ robertohuang: ~ $

           1. The first robertohuang user currently logged on

           2. @ AT in English means

           3. The second robertohuang hostname

           ~ 4. The position of the current working directory, the home directory

           The $ represents the currently logged on user is a normal user, the superuser #

  Archive manager.

     gz. format

         Compression: gzip command

            Compression process does not retain the original file

            Directory can not be compressed

            It can not be packaged compress multiple files

         Uncompress: gunzip command

     bzz format

         Compression: bzip2 command

            Reserved source k (keep) - parameter

            Directory can not be compressed

            It can not be packaged compress multiple files

         Unzip: bunzip2 command

     zip

         Pack zip -r + file name (dir.zip) after packing + (package directory) dir

        Unpack

         unzip dir.zip

         Parameter -d to extract the specified directory to unzip dir.zip-d / home / robertohuang / test

     takes

         This command can be packaged not only compression

         Be done by adding the compressed file and extract the parameters

           parameter

             z -> with gzip to compress / decompress files

             i -> with bizp2 to compress / decompress files

            c -> creata create a new compressed file as the user wants to back up a file directory and use this

            x -> release of documents from the compressed file

            File Information> detailed report tar processing - v

            f-> only the name of the file compression

         compression

           tar + (parameter) (zcuf) + compressed material name tar.gz +

           tar + (parameter) (jcvf) + Name compressed raw material tar bzz +

         unzip

           the tar + parameters + existing compressed (test.tar.gz)

           the tar + parameters + existing compressed (test.tar.bzz)

           Extract the directory specified parameters added -C (uppercase) · tar zxvf test tar gz-C + extract directory (home / robertohuang)

 Process Management

     who

        Check the current online users

            Login Username

            Terminal equipment (PTS) using

            Log on to the system time

       tty devices

            tyyl -tyy6 means that text interface ctrl + alt + [F1-F6]

            tyy7 graphical interface sub-theme 1 ctrl + alt + F7

  Files and Directories

     tree

         Displays the current command in a tree form

          You need to install the software: sudo yum-yinstall tree (centos under)

     ls view all files and directories in the specified directory

            - a (all) when all the contents of the documents listed in the current directory

             -r (recarsive) also lists all subdirectories layer

           - l In addition to file detailed information rights will also file, the owner and other listed

     cd into the specified directory (cd + path)

           Relative path -> cd./robertohuang/tomacat

            Absolute path -> cd / home / robertohuang / tomacat

             ..-> on a current directory

            -> the current directory

            Into the home directory (home / robertohuang) in three ways

                cd

                cd~

                cd/home/robertohuang

         pwd View current directory (prinf working directory) Abbreviation

         Create / delete directories

            Created: mkdir + directory name

               mkdir word-> word created directory

               Delete: rmdir + directory name

               You can only delete empty directories, high frequency of use

               Delete: rm

         Create / delete files

              Created: touch + filename

         cp

            Copy files cp file1.txt file2.txt-> the contents of file / txt copied to file2.txt

ps

  View the entire process within the system is running like

   Parameters involved

 

   All users of a (all) current system processes

 

  u: view the process owner and other information

 

 x: the display without the controlling terminal - can not interact process [Input, Output] user

 -e: significant

  -f: display UID, PPIP, C and STIME field

 

  Displays the current user all processes p

Filtration of process ps aux display | grep xx 

 

 grep query is a need to take up the process, all results> 2 in order to explain the presence of query results

 If there is a result, not the process represents a query

 Query results indicate the process ID PID

Kill

  To terminate the specified process (terminate a process) running

 Check signal number __Kill-l

 Kill the process __kill -9 89899 [PID process identification number] __ send a signal to the current process No. 9 (SIGKILL)

 env

 View the current production process environment

 Environment Variables

 User system configuration information of the current path

 Key-value pair format: key-value: value

  top

  Text equivalent windows system

You can not flip

Network management

   ifconfig

 Acquire network interface configuration information, you can also modify these configurations

 Acquire network interface information 

ping 

Test target host connectivity Format __ping [parameters] (host name or IP address)

 parameter

 -c number of stops after the specified number of packets transmitted

 

     

Guess you like

Origin www.cnblogs.com/liangjiani/p/11706532.html