20210712-python01-23-introduction to linux and virtual machine, basic commands of linux

  1. **Linux: * * safe, stable, free, high occupancy, only one kernel, no drive letter concept
    Common releases are as follows:
    Ubuntu (No. 1)
    Redhat
    Fedora
    openSUSE
    Linux Mint
    Debian
    Manjaro
    Mageia
    CentOS
    Arch
    **Windows Server: * * paid, low occupancy
  2. Virtual Machine refers to a complete computer system with complete hardware system functions simulated by software and running in a completely isolated environment
    The virtual system has exactly the same functions as the real operating system by generating a new virtual image of the existing operating system
    After entering the virtual system, all operations are carried out in this new independent virtual system. You can install and run software independently, save data, and have your own independent desktop, which will not have any impact on the real system
    And it can flexibly switch between the existing system and the virtual image
  3. Linux terminal command format
command [-options] [parameter]

explain:
Command: command name, English word or abbreviation of corresponding function
[- options]: options, which can be used to control commands or omitted
Parameter: the parameter passed to the command, which can be zero, one or more

[] stands for optional

View command help information -- help

command --help

Displays help information for the command
man

man command

Refer to the command manual
man is the abbreviation of manual. It is a manual provided by Linux and contains detailed instructions for most commands and functions

Operation keys when using man:

| Operation key | function |
| --- | --- |
| Space bar | Displays the next screen of the man page |
| Enter key | Scroll one line of the man page at a time |
| b | Rollback one screen |
| f | Scroll forward one screen |
| q | sign out |
| /word | search **word** character string |
  1. Basic use of common Linux commands
| Serial number | command | Corresponding English | effect |
| --- | --- | --- | --- |
| 01 | ls | list | View the contents of the current folder |
| 02 | pwd | print work directory | View current folder  |
| 03 | cd [Directory name] | change directory | Switch folders |
| 04 | touch [file name] | touch | If the file does not exist, create a new file |
| 05 | mkdir [Directory name] | make directory | Create directory |
| 06 | rm [file name] | remove | Deletes the specified file name |
| 07 | clear | clear | Clear screen |

antic

ctrl + shift + = enlarge the font display of the terminal window
ctrl + - reduce the font display of the terminal window

Automatic completion
After typing out the first few letters of the file / directory / command, press the tab key
*If there is no ambiguity in the input, the system will complete it automatically
*If there are other files / directories / commands, click tab again, and the system will prompt for possible commands

antic
Press the up / down cursor keys to switch back and forth between previously used commands
If you want to exit the selection and do not want to execute the currently selected command, you can press ctrl + c

summary

  1. Representation of file size in computer (Popular Science)
| Company | english | meaning |
| --- | --- | --- |
| byte | B(Byte) | As a digital unit in a computer, it is generally an 8-bit binary number |
| thousand | K(Kibibyte) | 1 KB = 1024 B,Kilobytes (1024) = 2 ** 10) |
| Omen | M(Mebibyte) | 1 MB = 1024 KB,Megabytes | 
| GIGA | G(Gigabyte) | 1 GB = 1024 MB,Gigabytes | 
| too | T(Terabyte) | 1 TB = 1024 GB,Terabytes |
| beat | P(Petabyte) | 1 PB = 1024 TB,Billions of bytes | 
| AI | E(Exabyte) | 1 EB = 1024 PB,Ten billion bytes |
| Ze | Z(Zettabyte) | 1 ZB = 1024 EB,100 billion bytes | 
| Yao | Y(Yottabyte) | 1 YB = 1024 ZB,100 million bytes, Yao bytes | 
  1. Use of wildcards
| wildcard | meaning |
| --- | --- |
| * | Represents any number of characters |
| ? | Represents any character, at least 1 |
| [] | Indicates that any one of the character groups can be matched |
| [abc] | matching a,b,c Any one of |
| [a-f] | Match from a reach f Any character in the range |

Keywords: Python Linux Ubuntu

Added by rockroka on Wed, 19 Jan 2022 04:09:32 +0200