Oracle Linux Understanding Basic command line

Source: Internet
Author: User
Tags chmod

1. Version of Linux: Core (Kernel) version and release (distribution) version

2. Commands for copying, deleting, and moving files

CP [option] source file or directory destination file or directory

-r,-r recursively replicates the directory, copying all files in the source directory and all levels of subdirectories to the target location.

rm[Options] File list delete files and directories

MV [options] sourcetarget rename a file or directory, or move a file from one directory to another.

3. PWD displays the absolute path of the current working directory.

4. LS View all files in the current directory (does not contain hidden files)

5. Ls–l View all files in the current directory (detailed view, including permissions, owner, etc.)

6. Ls–a View all files in the current directory (including hidden files)

7. R Read W write X Execute

4 2 1 777 represents read and write execution permissions

8. Links (two types)

Create a link with the ln command

Ln [Options] source file [destination file]

① Hard Links: When you create a hard link, add a directory entry for the destination file in another directory or in this directory, so that a file is registered in multiple directories. The ln command creates a hard link, and the LN command increases the number of links, and the RM command reduces the number of links.

The following restrictions apply to hard links:

I. You cannot create a hard link to a catalog file.

II. You cannot make hard links between different file systems. That is, the linked file and the linked file must be in the same file system.

② Symbolic Link: Also called a soft link, is a path name linked to a file.

Unlike a hard link, a symbolic link is really a new file, of course it has a different I node number, and a hard link does not create a new file.

Symbolic links do not have a hard-link limit, you can create symbolic links to catalog files, or you can create symbolic links between different file systems.

When creating symbolic links with the ln–s command, it is best to use the absolute pathname for the source file, which allows symbolic links to be made under any working directory. When the source file is in a relative path, the current work path cannot be linked if it is not the same path as the symbolic link file you are creating.

Symbolic links maintain the difference between a link and a source file or directory:

I. Delete the original file or directory, only delete the data, do not delete the link. Once the source file is created with the same file name, the link continues to point to the new data for that file.

Ii. in the list of long lists of directories, symbolic links are displayed in a special type of file, with the first letter being 1.

III. The size of the symbolic link is the number of bytes of the path name of the linked file.

Iv. when listing files with the Ls–l command, you can see an arrow pointing to the source file or directory after the symbolic link name.

9. chmod command

Used to change or set access permissions for a file or directory.

Only the file master or Superuser can change the Read permission of the file directory with the chmod command.

Two usages: Changing permissions in symbolic mode and changing permissions in an absolute way.

How VI Works

Three modes of operation: Command mode, input mode and ex escape mode.

① Command mode: After the shell prompts to enter the command VI, enter the VI editor, and in the VI command mode. At this point, any characters entered from the keyboard are interpreted as edit commands.

② Input Method: By entering the VI Insert Command (i), additional command (a), open command (o), replace command (s), modify command (c) or replace command (R) can be entered from the command mode. In the input mode, all characters entered from the keyboard are inserted into the buffer being edited and treated as the body of the file.

③ex Escape mode: VI and ex editor functions the same, the main difference between the two is the user interface. In VI, commands are usually a single letter, such as A,x,r. In ex, the command is the command line that ends with the ENTER key.

One. Linux kernel

Overview

Linux systems can be broadly divided into three tiers:

I. The bottom layer near the hardware is the kernel,

II. The middle tier is the shell layer outside the kernel,

Iii. the highest layer is the application layer.

Linux System kernel: User layer, core layer, hardware layer.

Linux operating system with a single-block structure of the operating system.

12. File System

The main file system used by Linux is ext3, ext2

①EXT2 File System

Supports standard UNIX file types, including plain files, catalog files, special files, and symbolic links.

I. Index nodes: Also called I nodes, each file has a unique index node. The index node of the ext2 file system acts as a file control block that can be used to control and manage files.

② Virtual File system

Linux systems support a variety of file systems, and for this reason, you must use a unified interface, which is the virtual file system (VFS).

I. VFS Index node: Each file and directory in the VFS has one and only one VFS index node.

13. Memory Management

Linux system uses virtual memory management mechanism, using Exchange and request paging storage management technology.

Basic methods for paging storage management:

Logical space paging, memory space paging, logical address representation, memory allocation principle, page table.

the basic idea of requesting paging :

Request Paging Storage management technology is developed on the basis of simple paging storage technology, the fundamental difference is that request paging provides virtual memory. The basic idea is that when a program is executed, it is swapped into memory, but not all of the programs are in memory, but on which page to use. This reduces the time to exchange and the amount of memory required, allowing the number of programs to be added.

Multilevel page table for Linux

In the Linux system of the x86 platform, the address is 32 bits, so the virtual memory space of each process can be up to 4GB. The Linux kernel divides this 4GB space into two parts: the 1GB of the highest address is the "system space" for the kernel itself, while the 3GB of the lower address is the "user space" for each process.

14. Process Communication

The Linux system supports a variety of internal process communication mechanisms (IPC), the most commonly used in the form of signals, pipelines, and system V IPC mechanisms supported by UNIX systems (i.e., message communication, shared data segments, and semaphores).

15. Hardware devices

Three types: block devices, character devices, and network devices.

. GCC compilation system

Four phases: preprocessing, compilation, assembly, and connection.

GDB mainly helps users to complete 4 aspects of their work when debugging a program:

① start the program, according to user requirements affect the operation of the program behavior.

② stops the running program at the specified condition.

③ when the program stops, check for any problems with it.

④ dynamically alters the execution environment of the program, so that one error can be corrected before other errors are corrected.

Make Tools

The main function of make is to perform the steps required to generate a new version of the target program, which automatically detects which part of a large program needs to be recompiled and then issues a command to recompile them.

Important Make files: Makefile file

19. System call: Is the interface provided by the operating system and the user program, which is the interface provided by the operating system to the programmer. It is typically located at the highest level of the operating system core.

20. Library functions: It contains a large number of programs provided by the system. They solve problems with commonalities and provide a more convenient environment for the development and execution of programs.

21. Several main means of process communication

Pipelines and well-known pipelines, signals, messages, shared memory, semaphores, and sockets.

22. User and Workgroup Management

Each user in the system has a personal account, and each account has a different user name and password.

Useradd [Options] [user name]

Workgroup: Users who have similar permissions are included in the same workgroup, and those users are automatically granted permissions for that workgroup.

Groupadd [Options] [group name]

What is the role of the system administrator?

① sets up the entire computer system, including hardware and software, such as installing hardware devices, installing operating systems and software packages, and creating accounts for users.

② do the proper backup and recovery when needed.

③ handles problems that are encountered due to limited computer resources available for use.

④ troubleshooting system traffic caused by connection problems.

⑤ to upgrade and maintain the operating system.

⑥ provides general support for users.

24. Objectives of security management

① prevent illegal operation.

② data protection.

③ correctly manage users.

④ guarantees the integrity of the system.

⑤ Bookkeeping.

⑥ System Protection.

25. Security management Elements

① Physical Security Management

② General user Security Management

③ Super User security management

26. Basic network commands

Ping command: Used to test whether the native system can reach a remote host and the rate of arrival.

Ifconfig command: Specify a network interface address or set the parameters of the network interface to set the necessary network interfaces at boot time.

Netstat command: Used to count TCP/IP network protocols and connections.

Basic working principle of NFS

NFS is a TCP/IP-based application-layer software that is dedicated to file operations, which is built on XDR (external data representation) and RPC (Remote Procedure Call) mechanisms.

28. Real-time Kernel scheduling units

① Dynamic ② parallelism ③ asynchronous independence

Oracle Linux Understanding Basic command line

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.