DAY02_ operating system, Network and Linux Foundation

Source: Internet
Author: User
Tags clear screen parent directory

I. Operating System Fundamentals
    • Operating system concepts: procedures for coordinating, managing, and controlling computer hardware resources and software resources
      1. The operating system consists of the kernel of the operating system (running in kernel state, managing hardware resources) and system calls (running in the user state, providing the system calling interface for applications written by the application programmer).
    1. Features of the operating system:
      1. Provides a better, simpler, clearer model for invoking hardware resources (System call interface)
      2. Order the application's competing requests for hardware resources
    2. Multiplexing: Requests for multiple (multiple-way) shared (shared-as-reuse) resources initiated by multiple programs
      • Implementation method:
        1. Multiplexing in space
        2. The reuse of time
          The combination of the above two methods is multi-channel technology
    3. processes and Threads : A simple description of the relationship, that is, the thread is part of the process, and all threads share the resources of the process
      (Process and thread relationships need to be understood further)
Two. Network Fundamentals
    1. OSI Layer Five Protocol

      1. Physical Layer
      2. Data Link Layer
        1. Ethernet Protocol
      3. Network layer
        1. IP protocol
        2. ARP protocol
      4. Transport Layer
        1. TCP protocol:
          • Three waves, four handshakes.
        2. UDP protocol
      5. Application Layer
    2. Realization of network communication
      • To achieve network communication, each host needs to have four elements
        1. The IP address of this machine
        2. Subnet mask
        3. IP address of the gateway
        4. IP address of DNS
      • There are two ways of getting these four elements
        1. Static access
        2. Dynamic acquisition
    3. Network communication process
      • This paragraph needs to be further deepened and understood and collated
Three. Linux System basics
  1. UNIX and Linux operating system Overview
    1. UNIX System features: multiuser and multitasking
    2. Linux
      • shutting down Linux systems: init 0
      • Linux Terminal: virtual To operate the system via user input commands
      • virtual Terminal switching method: Ctrl+alt+f[1~6]
      • Normal user and root user login system prompt: $, #
      • Exit command: Exit
  2. linux commands and getting help
    1. linux command format: Command parameter Options (Mastering command format commands, options, parameters)
      2. Common Commands
      • WhoAmI : Get current user name
      • who : Displays all users currently logged on, along with the current date and time
      • Date : Displays the current date and time of the system, sets the time format Date month day year
      • cal : Displays the calendar for a month, in the format Cal month /li>
      • Clear : Clear screen (or ctrl+l)
      • su : switch from the current user to another specified user, such as cut to root user Command: Su–root (where-display last logon time)
      • passwd : Modify user passwords, such as passwd username
      • --stdin : Note This command can be entered as a password via data from the previous pipeline, and does not require validation , such as

      • Man : Get instructions for using a Linux command, such as to view the instructions for using the SU command: Man su
      • --help : The same man command, For example the command to view the LS command Help is: (Do not use the man method) Ls–-help
  3. Browse, manage, and maintain directory files (i)
    1. File system directory
      1. Top-level root directory: Use "/" to represent
      2. Two special directories in the file system
        • . Represents the current directory, which is the working directory where the user resides
        • .. Represents the parent directory, which is the previous level of the current directory
    2. Some important directories in the Linux system
      • bin: Used to store common executable files
      • sbin: The executable file used to store the system
      • home directory : Used to store the user's own files or directories, superuser root home directory is/root, and the normal user's home directory is stored in the/s directory, and use the user name as the last level directory (home directory) name, such as the cat user's home directory is/ Home/cat
      • dev: Device files directory
      • etc: Configuration file directory
      • mount point (directory): Typically removable hardware is mounted under the/media or/mnt directory
    3. Absolute directories and relative paths
      1. Definition of Absolute path: You must start with a forward slash (/) and, in any case, you can find the desired file using an absolute path
      2. Definition of relative path: Do not start with a forward slash (/)
  4. Browse, manage, and maintain directory files (ii)
    1. PWD and CD identify and switch directories
      • pwd: Displays the user's current working directory as an absolute path
      • CD: Toggle the current directory
      • CD.. : Go to the top level directory
      • CD ~: Switch to the user's home directory
      • CD: with CD ~, can also switch to the user's home directory
      • cd–: working directory before switching to user
      • CD directory name : switch to the specified directory
    2. LS lists the contents of the directory
      • Lists the current directory (the default is the current directory) or the contents of the specified directory
      • ls-a: lists all files under the directory, including "." The implied file at the beginning
      • ls–all: With Ls–a
      • ls–l: lists details of each file in a directory, long list mode, and does not show hidden files
      • ls–d: displays only the directory name itself and does not display a list of contents under the directory
    3. CP Copy files and directories
      • Copies a file (which can be multiple) into a file of a specified path or into a directory of a specified path.
      • CP Source File Destination file
      • –r (Recursive, recursive): replicates the directory recursively. When copying a directory, copy all of the contents of that directory, including the entire contents of the subdirectory
      • - F (Force, mandatory): Do not ask for direct force replication when the destination file already exists
    4. MV Move and modify file and directory names
      • You can move files and directories between different directories, or rename files and directories
    5. mkdir Creating a Directory
      • Create a new directory
      • mkdir-p/boot/aaa: First create boot and then create AAA
    6. Touch Create File
      • You can create an empty file, or you can create multiple files at the same time
    7. RM Delete File
      • Permanently delete files or directories in the file system
      • –r (Recursive, recursive): Delete directories recursively
      • -F (Force, mandatory): Thesystem does not ask but force delete
    8. RmDir or rm–r Delete a directory
      • Delete Empty directory (Note: delete a single empty directory without the-R or-f)
    9. Cat browses the contents of the body file
      • Displays the contents of one or more files on the screen, which continuously displays the contents of the entire file in a read-only manner
    10. Head Browse the contents of the file
      • The first 10 lines of a file are displayed by default
      • - N: Change the number of rows displayed, for example head–n 5/etc/passwd View details of the first 5 rows in the/etc/passwd file
    11. Tail Browsing the contents of a file
      • Displays the contents of the last 10 lines of the file by default
      • -N: Displays the n rows from the end of the file
      • tail-f: What's new in dynamic monitoring files
    12. More Browse files
      • Each time a screen (one page) of the file content appears, and at the end of the screen will appear "-more--(n%)" Information, where n% is already showing the percentage of file content
      • More +3 aaa.txt: Show log contents starting from line three
    13. Less browse files
      • Similar to more, but with less you can browse the file at will, and more can only move forward, but can not move backwards, and it will not load the entire file before viewing, press Q to exit
    14. Echo
      • echo qwer >/tmp/aaa.txt: Overwrite the original content with Qwer write file
      • echo qwer >>/tmp/aaa.txt: Write qwer to file in Append mode
      • Echo plus single quote double quote : Single quotation mark does not parse content, double quotes parse content

DAY02_ operating system, Network and Linux Foundation

Related Article

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.