You need to know basic programming linux (b)

  1. Archive management

    1. gzip bzip2
      does not retain the source file (gzip file name) after compressed gzip .gz compressed format
      after bzip2 .bz2 compressed archive format can keep the source file (bzip2 -k file name)
      both compression tool can not compress directory

    2. tar rar zip

      1. tar (without using z / j parameter, the command can only be packaged on a file or directory)
        1. Parameters:
          c create a compressed
          x release decompress
          c display a message compression and decompression can omit the
          name of the file f specify the compression
          mode z use gzip compressed file suffix .gz
          J bizp2 use compressed file name suffix .bz2
        2. Compressed
          tar zcvf generate archive name (xxx.tar.gz) to compress a file or directory
          tar jcvf generate archive name (xxx.tar.bz2) to compress a file or directory
        3. Unzip
          tar jxvf archive name (extract to the current directory)
          tar jxvf compressed package names -C (c capital) to extract it to a directory
      2. rar (must install the software)
        1. Parameters:
          Compression: a
          decompression: x
        2. Compression:
          RAR A (-r) the name of the compressed file generated (automatically add the suffix) compressed files or directories
        3. Unzip:
          name of the file (unzipped) rar x compression
      3. zip
        1. Parameters:
          -r recursive parameter
        2. Compression:
          ZIP compressed archive file name or directory
        3. Decompression:
          the unzip compressed package name (decompression in the current directory)
          the unzip archive decompression specified directory name -d

      Summary: in common
      tar / rar / zip compressed file name parameter generated compressed file or directory - Syntax compression when the
      tar / rar / unzip the archive parameter name parameter (rar no parameters) unzipped directory - decompression grammar

  2. Process Management

    1. who

      1. See users currently online situation
        i. Login user name
        ii. The terminal equipment used (PTS)
        III. Login to the system time
      2. Tty device
        i. Tty1-tty6 represents text interface + Alt + Ctrl (F1-F6)
        II. Tty7 graphical interface ctrl + alt + f7
    2. Ps (command to see the process)

      1. Parameters (aux)
        1. a view the current operating system for all users
        2. u show some of the user's own information
        3. x Check the application does not Terminal

      The file filter to use the pipeline, the pipeline is redirected
      to view the operating system processes all the bash in a terminal: ps aux | grep "bash"

    3. kill (kill the process)

      1. kill -l signal View
      2. kill -sigkill (or -9) process ID (pid) --------- kill the process
    4. env (see the current process environment variables)
      format environment variables under Linux: Key-value
      env | grep the PATH - path path environment variable print

    5. Top (see the Task Manager)

  3. Network-related commands

    1. View network ip: ifconfig
      eth0: I want to be in the computer's network card
      io: loopback address
    2. Testing whether a communication between two hosts: ping + ip address
      parameters: -c 4: return of information ends 4

    Know the domain name corresponding ip: nslookup + domain

  4. User Management:

    1. Create a user
      1. sudo adduser + username
      2. the useradd -s the sudo / bin / itcast the bash -g -d / Home / itcast -m itcast
        I. -s shell type specified when a new user logs
        ii. -g specified belongs to the group must already exist
        iii. -d user home directory
        iv. -m when the user's home directory does not exist, it is automatically created
    2. Set User Group (sudo groupadd + User Group)
    3. delete users
      1. sudo deluser + user name (the home directory is not deleted, the need to manually delete)
      2. -r sudo userdel -r itcast action is to delete the user's home directory together
    4. Switch user (su + username)
      switching at ubuntu to root (su -, su, sudo su )
    5. Modify the user's password (sudo passwd + user name)
    6. Modify the current user's password (passwd)
    7. Exit users currently logged in (exit)
    8. delete users
      1. sudo deluser + user name (home directory need to manually delete)
      2. sudo userdel -r + -r username action is to delete the user's home directory together
    9. Check the presence of the current user linux system
      / etc / passwd
  5. build (vsftpd) ftp server
    role: responsible for uploading and downloading files

    1. Server:
      modifying directory: /etc/vsftpd.conf
      1. Modify the configuration file
        Here Insert Picture Description
      2. Restart Services (sudo service vsftpd restart)
    2. Client
      1. Real-name user login
        i + the FTP IP (Server).
        Ii Enter the user name.
        Iii password.
        Iv file upload:. Put + filename
        v download the file:. Get + filename
        . Vi not allow the operator directory (if you want to upload directory, to file compression)
      2. Anonymous user login
        i + ServerIP the FTP.
        Ii Username: Anonymous
        iii Password: None (direct Enter)
        iv does not allow anonymous users to switch directly from any directory.
        V can only work within a range specified directory.
        Vi needs. create an anonymous ftp server on the user's directory - the anonymous user's root directory
      3. From the ftp server
        I. BYE
        II. Quite
        III. Exit
      4. lftp ftp server client access
        1. lftp a client tool
        2. Software installation sudo apt-get install lftp
        3. Login server
          1. Anonymous
            a) lftp server ip
            b) the Login
          2. Branded
            a) lftp [email protected] carriage
            b) entering the server password
        4. operating
          1. put upload files
          2. mput to upload multiple files
          3. get download file
          4. mget download multiple files
          5. mirror download the entire directory and its subdirectories
          6. mirror -R upload an entire directory and its subdirectories
  6. nfs (net file system ----- >>>>>>> Network File System) servers set up
    between computers on the network resources allow the TCP / Ip network share
    installation: sudo apt-get install nfs- kernek-server

    1. Service-Terminal:
      1. Create a shared directory
        Create a directory: mkdir (directory to be shared)
      2. Modify the configuration file
        1. Directory modify the configuration file: / etc / exports
        2. Modify the contents of / home / username / share directory * (ro / rw, sync)
          1. (* Means Ip network segment)
          2. rw is a read-write means
          3. ro which means read only
          4. real-time synchronization sync
      3. Restart service
        sudo service nfs-kernel-server restart
    2. Client
      a shared directory server mounted.
      I Mount the sudo + + server ip +. ":" + "Shared directory" + mount positions
      example: sudo mount 192.168.32.75:/home/itcast/ / mnt
  7. ssh server

    1. Service-Terminal:
      1. Installing SSH
        . I sudo APT-GET-install OpenSSH Server
        . Ii see SSH is installed: sudo aptitude show openssh-server
    2. Client
      1. Telnet
        ssh username @IP confirmation when the connection must write yes / no
      2. Logout
        logout
  8. scp (super copy) command (copies)

    1. This command is a prerequisite for
      the target host has been successfully installed openssh-server
    2. Use the format
      scp -r user @ target target host Ip address: / Absolute path of the target file / save to a local absolute (relative) path in subsequent prompts for yes, to enter yes
      scp -r [email protected] : / home / itcast / QQ_dir / ./mytest/360

The following is the author of the micro-channel public number, welcome attention, will continue to update c ++, python, tensorflow, machine learning, deep learning, computer vision and other articles
Here Insert Picture Description
if you are interested in JAVA aspects, can focus on the following JAVAERS public number, accompany you learn and grow together, sharing poetry and distant JAVA road together. In which public numbers are JAVA friend of this world, the public will have number-technical articles every day, by dry surface, but also the advanced architecture of e-books, such as Spring combat, SpringBoot practical, high-performance MySQL, in-depth understanding of JVM, RabbitMQ combat , Redis design and implementation of a number of high-quality books and so on, you can receive public attention No. Oh.
Here Insert Picture Description

Published 39 original articles · won praise 52 · views 7552

Guess you like

Origin blog.csdn.net/Xiao_Jie123/article/details/105147687