Oracle linux understands the basic command line and oraclelinux command line
1. Linux version: kernel version and distribution version
2. commands for copying, deleting, and Moving Files
Cp [Option] source file or directory target file or directory
-R and-r recursively copy directories to replicate all files and subdirectories in the source directory to the target location.
Rm [Option] delete files and directories in the file list
Mv [Option] sourcetarget renames a file or directory, or moves the 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 (excluding hidden files)
5. ls-l view all files in the current directory (View Details, including permissions and owner)
6. ls-a: view all files in the current directory (including hidden files)
7. r read w write x Execute
4 2 1 777 indicates that you have read and write permissions.
8. Link (two types)
Use ln command to create a link
Ln [Option] source file [target file]
① Hard link: when creating a hard link, add a directory item of the target file to another directory or local directory, so that a file is registered in multiple directories. The Ln command creates a hard link. The ln command increases the number of links and the rm command reduces the number of links.
There are the following restrictions on hard links:
I. You cannot create hard links to directory files.
Ii. Hard links cannot be made between different file systems. That is to say, the linked file and the linked file must be in the same file system.
② Symbolic link: Soft link: links a path name to a file.
Unlike hard links, symbolic links are indeed a new file. Of course they have different I-node numbers, but hard links do not create new files.
There is no hard link restriction on symbolic links. You can create symbolic links for directory files or between different file systems.
When using the ln-s command to create a symbolic link, it is best to use an absolute path name for the source file, so that the symbolic link can be performed in any working directory. When the source file uses a relative path, if the current working path is different from the path of the symbolic link file to be created, the link cannot be connected.
The symbolic link maintains the difference between the link and the source file or directory:
I. Delete the original file or directory. Only data can be deleted and the link is not deleted. Once a source file is created with the same file name, the link continues to point to the new data of the file.
Ii. In the directory length list, symbolic links are displayed in a special file type. The first letter is 1.
Iii. The size of the symbolic link is the number of bytes of the path name of the linked file.
Iv. When you use the ls-l command to list files, 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 the access permissions for files or directories.
Only the file owner or super user has the right to use the chmod command to change the read permission of the file directory.
Two Methods: Change permissions in symbolic mode and Change permissions in absolute mode.
10. How vi works
Three ways to work: Command, input, and ex escape.
① Command mode: Enter the command vi after the shell prompt is attached, enter the vi editor, and run the command vi. In this case, any character entered on the keyboard is interpreted as an editing command.
② Input Method: Input vi's INSERT command (I), additional command (a), open command (o), replace command (s), modify command (c) or replace the command (r) to enter the input mode 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: The vi and ex editors have the same functions. The main difference between them is the user interface. In vi, commands are generally a single letter, such as a, x, and r. In ex, the command line ends with the enter key.
11. Linux Kernel
Overview
Linux systems can be roughly divided into three layers:
I. The underlying layer close to the hardware is the kernel,
Ii. The middle layer is a shell layer outside the kernel,
Iii. The highest layer is the application layer.
Linux Kernel: user layer, core layer, and hardware layer.
A Linux operating system uses a single block structure.
12. File System
The main file systems used in Linux are ext3 and ext2.
① Ext2 File System
Supports standard UNIX file types, including common files, directory files, special files, and symbolic links.
I. Index node: Also known as I node. Each file has a unique index node. The index node of the ext2 file system acts as a file control block. This data structure can be usedControlAndManagement.
② Virtual File System
Linux supports multiple file systems. Therefore, a unified interface must be used, which is a Virtual File System (VFS ).
I. VFS index node: each file and directory in VFS has one and only one VFS index node.
13. Memory Management
The Linux system uses the virtual memory management mechanism and the switch and request paging storage management technology.
Basic Methods for paging Storage Management:
Logical space paging, memory space paging, logical address representation, memory allocation principle, and page table.
Basic Idea of request Paging:
The request paging storage management technology is developed based on the simple paging storage technology. The fundamental difference between the two is that the request paging provides virtual memory. The basic idea of it is that when a program is executed, it is switched into the memory, but not all programs are transferred into the memory, but the page to which it is used is transferred. This reduces the exchange time and memory space required, and allows you to increase the number of programs.
Multi-level page table in Linux
In linux on the x86 platform, the address is 32-bit, so the virtual storage space of each process can reach 4 GB. The Linux kernel divides the 4 GB space into two parts: 1 GB of the highest address is the "system space" for the kernel itself, and 3 GB of the lower address is the "user space" of each process ".
14. Process Communication
Linux supports multiple internal process communication mechanisms (IPC). The most common methods are signals and pipelines, and the System v ipc Mechanism Supported by UNIX systems (that is, message communication, shared data segments, and semaphores ).
15. hardware devices
Three types: Block devices, character devices, and network devices.
16. Gcc compilation system
Four stages: preprocessing, compilation, assembly, and connection.
17. gdb mainly helps users complete four tasks during program debugging:
① Start the program and affect the running behavior of the program according to user requirements.
② Stop the running program under the specified conditions.
③ When the program is stopped, check what problems it has.
④ Dynamically change the execution environment of the program. In this way, you can first correct an error and then correct other errors.
18. Make Tool
The main function of Make is to execute the steps required to generate a new version of the target program, that is, to automatically detect which part of a large program needs to be re-compiled, and then issue commands to re-compile them.
Important make file: makefile file
19. System Call: The interface provided by the operating system and between the operating system and the user program, that is, the interface provided by the operating system to the programmer. It is generally located in the operating systemThe highest level of core.
20. library functions: contains a large number of programs provided by the system. They solve common problems and provide a more convenient environment for program development and execution.
21. Several main means of Process Communication
Pipelines and famous pipelines, signals, messages, shared memory, semaphores and sockets.
22. User and workgroup Management
In the system, each user has a personal account, and each account has a different user name and password.
Useradd [Option] [user name]
Workgroup: If users with similar permissions are assigned to the same Workgroup, these users are automatically granted the permissions of the workgroup.
Groupadd [Option] [group name]
23.What is the role of the system administrator?
① Set 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.
② Perform proper backup and recovery as needed.
③ Handle problems arising from limited computer resources.
④ Eliminate system communication congestion caused by connection problems.
⑤ Upgrade and maintain the operating system.
6. provide regular support for users.
24. Security management goals
① Prevent unauthorized operations.
② Data protection.
③ Correctly manage users.
④ Ensure system integrity.
⑤ Accounting.
⑥ System protection.
25. Security Management Elements
① Physical security management
② Ordinary user security management
③ Super User security management
26. Basic Network commands
Ping Command: used to test whether the system of the local machine can reach a remote host and the arrival rate.
Ifconfig command: specify a network interface address or set network interface parameters to set necessary network interfaces during boot.
Netstat command: used to collect statistics on TCP/IP network protocols and connections.
27. How NFS works
NFS is an application layer software that is based on TCP/IP and is responsible for file operations.XDR (external data representation)AndRPC (Remote process call)Mechanism.
28. Real-Time Kernel scheduling Unit
① Dynamic ② parallelism ③ asynchronous independence
In linux, how does one start the oracle database? What is the command?
I use Redhat Linux and use the following steps to start the oracle database.
First, use the oracle user to log on to Linux, and then execute the following command in the shell command line:
Step 1: Enable Oracle listening
$ Lsnrctl start
Step 2: Go to sqlplus
$ Sqlplus/nolog
SQL>
Step 3: Use the sysdab role to log on to sqlplus
SQL> conn/as sysdba
Step 4: Start the database
SQL> startup
After the above four steps, the oracle database can be started.
Use of oracle service commands in linux
Enable listener: lsnrctl start
Go to sqlplus: sqlplus/nolog
Connect to sysdba: conn/as sysdba
Start Database: startup