1 Basic computer knowledge
1.1 Definition
A computer is a machine that can be programmed to carry out sequences of arithmetic or logical operations automatically.
Functions that can be achieved:
- Numerical calculation.
- Logical calculation.
- Storage and memory function
It is a modern intelligent electronic device that can run according to the program and process data automatically and at a high speed.
1.2 Composition
A computer includes:
- Hardware
- Operating System (main software)
- Peripheral equipment used for operation
Computer hardware includes the physical parts of a computer, such as the case, central processing unit (CPU), monitor, mouse, keyboard, computer data storage, graphics card, sound card, speakers and motherboard.
An operating system (OS) is system software that manages computer hardware, software resources, and provides common services for computer programs.
Software is a collection of instructions and data that tell a computer how to work.
1.3 Interactive logic
2 Command
2.1 Dos command
Complete List of MS-DOS Commands
DOS commands are the commands available in MS-DOS that are used to interact with the operating system and other command line based software.
Unlike in Windows, DOS commands are the primary way in which you use the operating system. Windows and other modern OSs use a graphics-based system designed for touch or a mouse.This means that users can operate according to the image without having to face a monotonous and threshold command window.
Note: If you use Windows (like Windows 10, 8, 7, etc.), then you have no need for DOS commands because you don’t have MS-DOS.
2.2 Windows commands
2.2.1 What is Windows?
Microsoft Windows, commonly referred to as Windows, is a group of several proprietary graphical operating system families, all of which are developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. Active Microsoft Windows families include Windows NT and Windows IoT; these may encompass subfamilies, (e.g. Windows Server or Windows Embedded Compact) (Windows CE). Defunct Microsoft Windows families include Windows 9x, Windows Mobile, and Windows Phone.
2.2.2 Interactive mode
Types of interaction
- TUI: Text-based User Interface
- GUI: Graphical User Interface
2.2.3 How to open the text interaction mode
①Win + r
②Enter “cmd” in the input box.
③Click “OK”.
2.2.3 Command line structure
- Microsoft Windows [Version 10.0.19041.868] →Version
- © 2020 Microsoft Corporation. All rights reserved. →Copyright notice
- C:\Users\WDAGUtilityAccount →Disk path, current folder path
- > > > →Command prompt, you can enter commands directly later.
2.2.4 Windows commands
Common Windows commands(The more important commands have been bold in the table. Each keyword has been linked to the corresponding page of the official website document.)
Command | Annotation |
---|---|
cd | Displays the name of the current directory or changes the current directory. If used with only a drive letter (for example, cd C:), cd displays the names of the current directory in the specified drive. If used without parameters, cd displays the current drive and directory. |
cls | Clears the Command Prompt window. |
color | Changes the foreground and background colors in the Command Prompt window for the current session. If used without parameters, color restores the default Command Prompt window foreground and background colors. |
del | Deletes one or more files. This command performs the same actions as the erase command.The del command can also run from the Windows Recovery Console, using different parameters. |
delete | Deletes a partition or a volume. It also deletes a dynamic disk from the list of disks.Please use it carefully |
dir | Displays a list of a directory’s files and subdirectories. If used without parameters, this command displays the disk’s volume label and serial number, followed by a list of directories and files on the disk (including their names and the date and time each was last modified). For files, this command displays the name extension and the size in bytes. This command also displays the total number of files and directories listed, their cumulative size, and the free space (in bytes) remaining on the disk.The dir command can also run from the Windows Recovery Console, using different parameters. |
exit | Exits the command interpreter or the current batch script. |
ftp | Transfers files to and from a computer running a File Transfer Protocol (ftp) server service. This command can be used interactively or in batch mode by processing ASCII text files. |
help | Displays a list of the available commands or detailed help information on a specified command. If used without parameters, help lists and briefly describes every system command. |
mkdir | Creates a directory or subdirectory. Command extensions, which are enabled by default, allow you to use a single mkdir command to create intermediate directories in a specified path. |
move | Moves one or more files from one directory to another directory. |
openfiles | Enables an administrator to query, display, or disconnect files and directories that have been opened on a system. This command also enables or disables the system Maintain Objects List global flag. |
path | Sets the command path in the PATH environment variable, specifying the set of directories used to search for executable (.exe) files. If used without parameters, this command displays the current command path. |
ping | ①Verifies IP-level connectivity to another TCP/IP computer by sending Internet Control Message Protocol (ICMP) echo Request messages. The receipt of corresponding echo Reply messages are displayed, along with round-trip times. ping is the primary TCP/IP command used to troubleshoot connectivity, reachability, and name resolution. Used without parameters, this command displays Help content.②You can also use this command to test both the computer name and the IP address of the computer. If pinging the IP address is successful, but pinging the computer name isn’t, you might have a name resolution problem. In this case, make sure the computer name you are specifying can be resolved through the local Hosts file, by using Domain Name System (DNS) queries, or through NetBIOS name resolution techniques. |
PowerShell | Windows PowerShell is a task-based command-line shell and scripting language designed especially for system administration. Built on the .NET Framework, Windows PowerShell helps IT professionals and power users control and automate the administration of the Windows operating system and applications that run on Windows. |
rmdir | Deletes a directory.The rmdir command can also run from the Windows Recovery Console, using different parameters. |
shutdown | Enables you to shut down or restart local or remote computers, one at a time. |
start | Starts a separate Command Prompt window to run a specified program or command. |
where | Displays the location of files that match the given search pattern. |
2.3 Linux commands
2.3.1 What is Linux?
Linux (/ˈlinʊks/ (About this soundlisten) LEEN-uuks or /ˈlɪnʊks/ LIN-uuks) is a family of open-source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically packaged in a Linux distribution.
2.3.2 Linux command
Linux Command Guide(Click here to jump.)
3 Programming languages
3.1 Classification
There are thousands of different programming languages—some intended for general purpose, others useful only for highly specialized applications.
Lists of programming languages | Examples |
---|---|
Assembly languages | ARM, MIPS, x86 |
High-level programming languages | Ada, BASIC, C, C++, C#, COBOL, Fortran, PL/I, REXX, Java, Lisp, Pascal, Object Pascal |
Scripting languages | Bourne script, JavaScript, Python, Ruby, PHP, Perl |
There are two more important concepts:
①Compiled language: is a programming language whose implementations are typically compilers (translators that generate machine code from source code), and not interpreters (step-by-step executors of source code, where no pre-runtime translation takes place).
- For low-level programming languages, there are more one-to-one correspondences between the programmed code and the hardware operations performed by machine code, making it easier for programmers to control the use of central processing unit (CPU) and memory in fine detail.
②Scripting language(or script language): is a programming language for a runtime system that automates the execution of tasks that would otherwise be performed individually by a human operator. Scripting languages are usually interpreted at runtime rather than compiled.
- A scripting language is usually interpreted from source code or bytecode. By contrast, the software environment (interpreter) the scripts are written for is typically written in a compiled language and distributed in machine code form.
- Typical scripting languages are intended to be very fast to learn and write in, either as short source code files or interactively in a read–eval–print loop (REPL, language shell).
3.2 Running speed
Why is Python slower than other languages?.
Python is a scripting language while C is a compiled language. C/C++ is relatively fast as compared to Python because when you run the Python script, its interpreter will interpret the script line by line and generate output but in C, the compiler will first compile it and generate an output which is optimized with respect to the hardware. In case of other languages such as Java and.NET, Java bytecode, and .NET bytecode respectively run faster than Python because a JIT compiler compiles bytecode to native code at runtime. CPython cannot have a JIT compiler because the dynamic nature of Python makes it difficult to write one.