Install Linux operation xxx

Source: Internet
Author: User
Tags clear screen unpack

Install Linux operation xxx

    1. Red had Linux version

      Red Hat corporate: Red Hat Enterprise Linux (RHEL); Official website: http://www.redhat.com
      Fedora Community Edition: maintained by Red Hat-funded community, located on personal desktops; Official website: http://fedoraproject.org
      CentOS Community Edition: Community Enterprise Operating System (Community Enterprise Operation XXX) official website: http://www.centos.org

2. File XXX Type
Currently RHEL6 default file XXX type: EXT4, 4th Generation Extension (Extended) file xxx
Swap, swap file xxx
Other files supported by Linux XXX type: FAT16, FAT32, NTFS;XFS, JFS

    1. Initialization and boot process

4.init process
Linux Kernel Load Run/sbin/init program: is the first process in XXX; PID (process tag) number is always 1

5.Upstart Boot Mode
Inittab configuration file: Distribute various initialization configurations; corresponding startup events
Section Upstart Boot profile table

parameters Description
/etc/inittab Configuration Default Run Level
/etc/sysconfig/init load rc.sysinit script, complete XXX initialization task
etc /init/rc.conf Load Rc.sysinit script to complete the XXX initialization task
/etc/init/rc.conf compatible script responsible for each run level Call handling
/etc/init/rcs-sulogin.conf start/sbin/sushell Environment for single user mode
/etc/init/control-alt-delete.conf conf The Ctrl+alt+del hotkey operation under the control Terminal
/etc/init/start-ttys. Conf Configure the number of open TTY terminals, device files
/etc/init/tty.conf Control the opening of the TTY terminal

Structure of the 6.inittab file
To view the INIT program configuration: Cat/etc/inittab
Syntax: id:runlevels:action:process
Field description
ID is used to uniquely identify a configuration record in a Inittab file
Runlevels is used to specify which runlevel the record runs in
Action is used to describe what kind of action the record will perform
Process is used to set the command executed by the startup process
runlevels--Run Level
Run level description
0 shutdown state, the host will be turned off when using this level
1 single user mode, do not need password Authentication can login xxx, more for XXX maintenance
Multi-user mode with 2-character interface (network access not supported)
Full multi-user mode for 3 character interface, most server hosts run at this level
4 Not assigned to use
5 graphical interface for multi-user mode, providing a graphical desktop operating environment
6 Restart, the host will be restarted when using this level
Note: Only the default run-level configuration is retained in the RHEL6/etc/inittab file

7.XXX Service Control
Syntax: Service service Name control type or/ETC/RC.D/INIT.D name control type
Control type: Start: start; stop: stop; restart: restart; Reload: Reload Status: View service status
Using the service tool or the XXX services script under the/ETC/INIT.D directory, you can start, restart, stop the XXX service

8. Operating level
View: Use the RunLevel command to display, respectively: the runlevel before switching, the current RunLevel
Temporary switchover: Using the init command to combine 0-6 run-level parameters
[Email protected] ~]# RunLevel
5 3
[[Email protected] ~]# init 6 (restart XXX)
[[Email protected] ~]# init 0 (off xxx)

    1. Optimizing the startup process
      NTSYSV Tool: Provides an interactive, visual window that can be run at a character terminal and facilitates centralized management of multiple services
      Syntax: NTSYSV; NTSYSV--level Level list

      Chkconfig tool: Similar to the NTSYSV tool but does not provide interactive, visual windows; more efficient management of individual services

10.XXX Service start-up and control
View the startup status of the XXX service
Syntax: chkconfig–list View the default boot status for all services
Chkconfig--list Service Name View the default startup state for the specified service
Set the startup status of the XXX service
Syntax: chkconfig--level Level list service name On|off

Directory and file Management

    1. Classification of Linux commands
      Purpose: An instruction or program used to implement a class of functions; the execution of the command depends on the interpreter program (for example:/bin/bash)
      Classification
      Internal command: Part of the Shell interpreter
      External command: Program Files independent of Shell interpreter

    2. The format of the Linux command
      Syntax: command word [options] [parameters]
      Options: Specific functions for adjusting commands
      "-" To boot short format options (single character), such as "-L"
      "--" to boot long format options (multiple characters), such as "--color"
      Multiple short format options can be written together with only one "-" boot, such as "-al"
      Parameters: Objects that command actions, such as files, directory names, and so on
      Several auxiliary operations for command line editing
      Tab key: Auto-completing
      Backslash "\": Force line break
      Shortcut key ctrl+u: Empty to the beginning of the line
      Shortcut key ctrl+k: Empty to end of line
      Shortcut key ctrl+l: Clear Screen
      Shortcut keys CTRL + C: cancel this command edit

3. Basic commands
1): Cat command: Displays the contents of the file
Syntax: Cat [options] File name ...
2): More command/less command: Full screen mode to display the contents of the file page
Syntax: more/less [options] File name ...
Interactive Operation method: Press ENTER to scroll downward, press SPACEBAR to scroll down one screen, press the Q key to exit/page up and Page down; Press "/" key to find content, "n" Next content, "n" the previous content; Other functions are similar to more commands
3): Head command/tail command: View part of the beginning/end of the file (default is 10 lines)
Syntax: Head/tail-n file name ...
4): WC command: Number of words in the statistics file (Word Count). Information such as number of rows
Syntax: WC [Options] ... Target file ...
Common command options:-L: Count rows;-W: Count the number of words;-C: Statistics bytes
E.g.[[email protected] ~]# wc/etc/hosts
4 185/etc/hosts (4 rows, 23 words, 185 bytes)
5): grep command: Finds and displays the line containing the specified string in the file
Syntax: grep [Options] ... Find a conditional target file
Common Command options:-I: Ignore case when searching (Ignore-V: Reverse lookup (invert), output rows that do not match the find criteria)
Find conditional settings: The string to find is enclosed in double quotation marks; "^ ...". The beginning, "... $" means to be ... "^$" indicates a blank line.
6): gzip command, BZIP2 command: Make compressed files, unpack compressed files
Syntax: gzip [-9] File name ...
bzip2 [-9] File name ... (Making compressed files)
gzip-d. gz format for compressed files
bzip2-d. bz2 format Compressed file (unzip the compressed file)
Common Command options:-9: Indicates a high compression ratio, which is used when creating a compressed package;-D: Used to unpack files that have already been compressed
Note: The compression algorithms used by the GZIP and BZIP2 commands are different, generally bzip2 compression efficiency is better
8): Tar command: Make an archive file, release the archive
Syntax: tar [options] ... Archive file name source file or directory
tar [options] ... Archive file name [-C target directory]
Common Command options:
-C: Create a package file in. tar format
-X: Unpack package files in. tar format
-V: Output details
-F: Indicates the use of an archive file
-P: Preserve the original file and directory permissions while packaging
-T: List view files in package
-C: Specify the target folder to release when unpacking
-Z: Call the gzip program for compression or decompression
-J: Call bzip2 Program for compression or decompression

4. Text Editor
Linux has many configuration files, similar to the registry in Windows, and is managed and maintained by the VI Editor (text editing tools) by default; Vim is an enhanced version.
Three modes of operation: Command mode, input mode, last line mode
switching between different modes

Basic command operation

type of Operation Operation Keys function
Mode switching A Inserts content after the current cursor position
I Insert content before the current cursor position
o/o Inserts a new row after/before the current cursor line
Direction of cursor Movement ?、?、?、? Up, down, left, right
Inline Quick Jump Line display Home key or "^"/End Key or "$": Set nu/: Set Nonu Show line number/Cancel line number display
Delete X or Del Delete a single character at the cursor
Dd Deletes the current cursor in the row
#dd Delete the # line content that starts at the cursor
d^ Delete all characters before the current cursor to the beginning of the line
d$ Delete all characters at the end of the line at the current cursor
Copy Yy Copy the contents of the entire row of the current row to the Clipboard
#yy Copy the # line content starting at the cursor
Paste P (Large) Before pasting at the cursor position
P Pastes the contents of the buffer after the cursor position
Save exit Wq Save modified content Exit
Exit Q! Discard modified File exit
Save As W/root/newfile Save As ...
Find File Contents /word/?word Find the string "word" from top to bottom/bottom
n/n Locate the next/previous matched lookup string
Undo Edit U Press once to cancel the most recent operation, and so on
U Used to cancel all edits made to the current line
Save exit Zz Save the current file contents and exit the VI editor
Open a new file : E ~/install.log Open a new file for editing
Read other content : R/etc/filesystems Read other file contents into the current file
File content Substitution : s/old/new Replace the first "old" you find with "new"
: s/old/new/g Replace all found "old" with "new"
: #,# s/old/new/g Replace all "old" with "new" within the "#,#" range
:% s/old/new/g Replace all "old" with "new" within the entire file
: s/old/new/c Add the C command at the end of the Replace command to prompt for confirmation

Install Linux operation xxx

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.