Basic operation of Linux system

Source: Internet
Author: User
Tags clear screen system log

First, the basic command
1. Change directory: CD directory name
2. Create file: Touch file name
3. Delete files: RM-RF file name
4, change the file path or change the filename: MV source file Destination file
5. Shutdown: Init 0
6. Restart: reboot
7. View Ip:ip A or ifconfig
8. View system Current Date: Date
9. View Current User: WhoAmI or who I am
10. View current path: pwd
11, modify the IP configuration file: Ls/etc/sysconfig/network-scripts/ifcfg-ens33

Second, the file system directory structure
Media: Medium Folder
Home: Household Directory
Root: Super Admin home Directory
Dev: Hardware Device folder
ETC: System configuration folder (Modify system settings)
TMP: System temp File Folder
Boot: System boot Boot folder
USR: Custom program installation folder
var: System log Folder

Third, the meaning of the prompt symbol
[Email protected] ~]#
[\[email protected]\h \w]\$
Root: \u Current Account
localhost: \h hostname The first point in front of the name Localhost.localdomain
~: \w The home of the current account, here is the root user's home
#: Prompt, which represents the current user as an administrator, super user
$: Representative is currently a regular user

Four, Shell syntax
[Email protected] ~]# ls-a/home/
Command option Parameters
Command: The body of the entire shell command
Options: Affects the behavior of fine-tuning commands, usually in-,--
Parameters: The object to which the command works

Five, shortcut keys
^C: Terminate the program running in the foreground
^d: Exit, equivalent exit
^l: Clear Screen
^u: Delete all characters before the cursor
^k: Delete all characters after cursor
^r: Search history commands, using keywords
esc+. : Reference the last parameter of the previous command, equivalent to! $

Vi. Basic features of Bash
1. <Tab> key, auto-complete command and file
2. Historical command:
A. Cursor up and DOWN keys
B. ^r//Search history commands, using keywords
C.! $//reference last parameter of previous command
D.! string//Executes the specified command in the history command, with an exclamation mark followed by a string or a number representing the command
3. Command aliases
To view the current alias of the system: Alias
To view the alias of a specified command: type-a command

                建立永久别名:  vim /etc/bashrc                                       alias 自定义别名=‘命令‘                建立临时别名:  alias 自定义别名=‘命令‘                取消别名:  unalias 自定义别名                别名优先:  命令 //                跳过别名:  \命令 //

4. How to get Help
Help: Command--help
Man:man command
Command Help--1,8
function Help--2,3
File Format--5
Official Handbook: http://docs.redhat.com Enterprise Linux (5/6/7)
http://www.mysql.com docs
Baidu, Google

Basic operation of Linux system

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.