Linux command note

Source: Internet
Author: User
Linux command Miscellaneous kernel is the kernel (dealing with machines) application is the application shell is the shell (dealing with people) What is the shell? Each terminal is provided by the shell. a prompt is provided, indicating that the shell ends with the shell "%". The bash administrator logs in to the end of the cshell $ Code... linux command Miscellaneous kernel is the kernel (dealing with machines) application is the application shell is the shell (dealing with people) What is the shell? The shell provides a prompt for each terminal. the shell "%" ends with "cshell $" and bash administrator logon ends, warning means the administrator name is "root". the root user has various shells. how can I change the shell for different minor operations? in the terminal: for example: bash, press bash at the prompt, and press Enter. the "clear" command terminal clears the screen and the "ps" command process status "q" exits the "chsh" command when entering man, why is there a shell at the beginning? the file/etc/passwd specified by the administrator contains the "cat" command for the user information to display the content. the format is as follows: cat/etc/passwd password in the/etc/shadow file "passwd" command password "id" command to view the user "who" command to see who has logged on (whoan I look at myself)] "w" command, view what the user is doing, view what the current user is doing "su" command to change the user The "ls" command lists the permissions. The "which" command tells you where the XX command is "~" Command to view the current user's main directory "~ User name command to view the current user's home directory "alias XXX =" "command alias". "Command is the main directory of the current directory, where it is located at the beginning, that is, the current directory of the birthplace, the current location" .. "Command level-1 directory" .. /.. "Command on the upper-level directory" pwd "command on the current directory name" cd "command, for example, enter cd uc and press enter, switch to the absolute path to the uc Directory, start with/relative path, it does not start with ". "Files starting with" are hidden files in Linux. The software uses the "ln" command to save the configuration information with hidden files, soft link "touch" command to create a file "mkdir" command to create the directory "mkdir-p" command to create a layer-by-layer directory "rm" command to delete the file "rmdir" command to delete the directory "rm- r directory name "command to delete non-empty directory (-r indicates recursion) run the "ls-l" command to view permissions for three octal nodes. set permissions. 4. Read, 2. write, and 1. run the "rm-r/" command to delete all permissions. only the administrator can perform the "rm" command. -I file name "command"-I "indicates whether to perform the next" rm-f "command-f indicates to force delete the" chmod "command to modify permissions (u (yourself) = rwx, g (same group) = rx, o (others) = rw) "chmod ax file name" command open all permissions "cp file name ...... "Destination" command to copy the file "cp-r file name destination" command to copy the file. "-r" means to copy the entire directory and move the file "mv" command (Partial files and directories ).) the "mv file name new file name" command can rename the wildcard "*" to any file or directory name with multiple characters "?" Any "ls-d" command in the string specified by the character "[]" for a character in the specified range "{}" indicates that this directory is the directory itself" after the umask command, add "0" to shield the permission "cal" to view the Calendar "ln-s pointing to the file name shortcut name" command to create a shortcut for the current directory, it is best to use the absolute path "ln file name new file name" to create a shortcut for soft link to give the file an alias, the two names correspond to the ">" command redirection ">" command for the same file. The "wc" command is appended to the statistics command to display the number of lines, number of words, and number of characters. "|" command pipeline, link the two commands "echo" command "more" command "head" command to view the format of the first few lines, for example, head number/etc/passwd "tail" command to see the format of the first few lines, for example: run the/etc/passwd "grep" command to search for the tail number in the format of grep cal: grep-v bash/ Etc/passwd view the "seq" command without bash to generate a sequence of "sleep" command. the cursor sleep format is for example: sleep 5 (where "5" is time) the "find" command format is as follows: Directory condition-exec operation \; example: find ~ -Name "win. c "Example 2: find/-name "*. c "2> aaa (2 indicates the error message, input the error message to the file aaa, and the correct information is displayed)"; "The command links the commands to execute them in sequence"!" The history command format is "!". Add the number to view the historical command "!" View all history commands $ history | grep | sort | here, sort indicates sorting. $ cd abc & rm def where & indicates that cd abc is successful, rm def "fg" is executed" run the "bg" command back to the foreground. The "jobs" command "kill" command is executed in the background to stop the command and kill 9 = "kill" to stop the command, run the "env" command environment "=" command to assign values (note: No space is allowed around the equal sign). run the "echo $ {cc}" command to output the "cc" value, here, echo is the meaning of display, $ is the meaning of the value, if there is no $ -- "echo {cc}" directly outputs cc
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.