Linux Basic Notes

Source: Internet
Author: User
Tags time and date

1 vim/etc/inittab Linux configuration file, this file is responsible for setting init initialization program initialization script where;
2 passwd Change Password
2.1 passwd XXX Modify specific user's password
3.1 System-config-language System Language Modification
3.2 System-config-packages Bag
3.3 System-config-display Display Changes
4 su-xxx Change to another account
5 Sudo/usr/sbin/useradd XXX Authorized Add Account
6 vim/etc/sudoers Display sudoer list and permissions
6.1 Default Specification Custom Modify Permissions
6.1.1 Cmnd_alias USERS =/usr/sbin/useradd,/usr/sbin/userdel,/usr/sbin/usermod
6.2 Allow root-to-run any commands anywhere add authorized users here
6.2.1 Root all= (All) example
6.2.2 Rehat all= (All) USERS sample
7 more/etc/passwd View user list
8 ID XXX View information for the group in which the user is located
9 command-a-b-c-abc All Commands-a-b-c =-abc
9.1 Command--help equals a whole order.
9.2 Command; Command for split between two commands (similar to batch) #两个命令之间没有必然的联系 #
9.3 command [] can not be added
9.4 Command <> must be added
9.5 Command {} indicates list {1..20}
9.6 command x|y|z Three Select one cannot be used at the same time
The current time and date of a date
10.1 Date 123011072008 modified (month-day hour-minute year)
Calc Display Calendar
11.1 Calc 11 2014 Displays the specified calendar
The Whatis shows a short description
12.1 Whatis System can view all commands under System
Command--help A detailed description of the order (not all commands provide--help)
Description of the man command
14.1 man/Press/To search for keywords in man
14.2 man n N is the next n in Man and N is up
14.3 Man Q in Man, press Q to exit
14.4 Man-k keyword can search all the keywords have associated commands
More details than man
15.1 Info S Search
15.2 Info tab tab jumps to the next keyword
15.3 Info n/p Down
15.4 Info U/1 up
15.5 Info Q exit
16/user/share/doc Linux Help documentation
16.1 More xxx Enter a document to view files with more+ files
+ DF View Disk
17.1 df-h View Disk
Fdisk partition tool
19/proc/This directory is the hardware information and status of the current system
PWD Displays the absolute path of the current directory (full path)
20.1 Pwd-p shows the real directory of the current directory (possibly a linked directory)
CP Copy
21.1 cp/proc/cpuinfo/usr/games/Absolute path notation
22.2 cp-r Copy Directory (when there are files in the directory)
22.3 cp xxx xxx xxx destion copy multiple files to the same directory
22.4 CP-A contains pdr three parameters (r recursion, p save permission and time stamp, D link file (shortcut)
The role of 22.5 cp-i hints
22.6 CP/PROC/CPUINFO/USR/GAMES/ABC Copy the file to the destination and change the name to ABC
CD Change Directory
23.1 CD. Top level Directory
23.2 CD. Current directory
23.3 CD back to home directory (root in/root, user in/home/xxx)
23.4 CD-Back to the previous working directory
List of LS display directory
24.1 ls/xxx/Display a list of specified directories
24.2 Ls-a Show all information (including hidden files)
24.3 Ls-l = ll Display Extended information (general with LL)
24.4 Ls-r Display recursive information (the list of subdirectories will also be displayed)
24.5 LS-LD displays information about the directory itself
MV Cut (move file properties do not change)
25.1 MV Default Default.bak renaming a file or directory
Touch Create a blank file
26.1 Touch/proc/cpuinfo Update Timestamp
RM Delete File
27.1 rm-i Interaction (enquiry)
27.2 Rm-r Recursion
27.3 rm-f forced removal
27.4 RM *-RF forcibly Delete all directories and files in the current directory (common)
27.5 rm-rf/xxx forcibly delete all directories and files under the specified directory
27.6 RM. *-RF contains hidden files deleted together
mkdir Creating a Directory
File to determine the properties of files (with what software Open)
30.1 Black file binaries
30.2 Blue file Directory
30.3 Green file Executable file
30.4 light blue File Link file
30.5 Red File Compression file
30.6 Red Bottom file Suid file
30.7 Yellow bottom Black file Sgid file
chmod ugo+-wrx =+ Give-delete WRX
32.1 chown-r User file/directory only root can modify the UID,
32.2 chgrp-r User file/directory owner and Root can modify GID
32.3 chown-r user:group file/directory changes both UID and GID
33.1 * denotes 0 and all characters
33.2? Represents a single character
33.3 [0-9] means 0 to 9
33.4 [ABC] matches one character in ABC (inverse selection)
33.5 [^ABC} matches any character in ABC (forward selection)
The TAB can be filled with commands, file names
35/etc/profile can modify the history record
36.1 Ctrl+r Displays the last command at the beginning of this character
36.2 esc+. Call the last used parameter
36.3 ALT +. Up invokes the previous command
36.4!$ executing the last command written
36.5 ~ The home directory is displayed
37.1 Echco "(hostname)" represents a variable (string) that is called, and the very amount
37.2 echo "' hostname '" means that a constant is called
37.3 Touch abc{1,3,4}.txt means that all of them will be called
38.1 Hi=hello definition Hi=hello define a variable
38.2 echo $hi shown as Hello
39.1 Ctrl + A moves to the beginning
39.2 Ctrl+e move to end of line
39.3 Ctrl+u Delete the cursor to the beginning of the content
39.4 Ctrl+k Delete the cursor to the end of the line
39.5 Ctrl+arrow to move between words
39.6 CTRL + C interrupt
39.7 ctrl+shift+c Replication
39.8 ctrl+shift+v Paste
A. Sh to be recognized as a script

Linux Basic Notes

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.