Linux Common commands

Source: Internet
Author: User

Common instruction ls display file or directory-l list file details L (list)-a lists all files and directories under the current directory, including Hidden A (all) mkdir Create directory, if no parent directory, create p (parent) CD switch directory touch create empty file EC HO output variable Value or string cat view file contents CP Copy MV Move or rename rm Delete file-r recursive Delete, delete subdirectory and file-F to force delete Find in File system search for a file in WC statistics text row count, Word count, number of characters grep find a string in a text file rm Dir Delete empty directory tree structure display directory, need to install tree package PWD Display current directory ln Create link file more, less page display text file content head, tail display file header, tail content ctrl+alt+f1 command line full screen mode CTRL + ALT + F2-F6 Display Character Interface System admin Command stat display details of specified file, more details than LS show online login user WhoAmI show current operation user hostname display host name uname display System Information PS Show instant process status PS-AUXDF view Disk size df-h with unit display disk information ifconfig View network condition ping Test network Connectivity Man command will not be used, find men such as: Guy lsclear clear Screen alias to rename the command such as: Alias Ll= "Ls-l", in addition to de-use Unali AX ll shutdown/restart machine shutdown-r shutdown Restart-h shutdown do not restart now shutdown halt shutdown reboot Restart Linux pipeline the standard output of the previous command as the user and user group for the latter command is managed/etc/passwd Storage user account (user name: password: uid:gid: Prompt content: Home directory: Shell)/etc/group Storage Group account (group name: Group Password: GID: Group member)/etc/shadow Store user account password (user name: password: Passwords change time: password changes within a few days: password must be changed within a few days: password reminder days: Password expiration: Account expiration: Reserved field)/etc/gshadow Store user group account password useradd user name Userdel User name AddUser user name Groupadd Group name Groupdel Group name GPASSWD groupmems Group user Add, remove passwd root to root set password su Rootsu-Root/etc/profile system environment variable bash_profile user environment variable. BASHRC User environment variable su user switches user, loads configuration file. Bashrcsu-user switch user, load config file/etc/profile, Load Bash_profile file Rights Management three basic rights R read value represented as 4W write numeric value represented as 2X executable value as 1[[email protected] ~] #ll initial-setup-ks.cfg-rw-r--r-- . 1 root root 1949 8 19:34 initial-setup-ks.cfg The first character "-" represents a normal file; This location may also have an "L" link; "D" means that the No. 234 character of the directory "rw-" represents the permissions of the currently owned user. Therefore, the value is expressed as 4+2=6 the No. 567 character "rw-" represents the permission of the currently owned group. So a numeric representation of 4+2=6 No. 890 character "r--" represents other user rights. So the value is represented as 2 so the permission to manipulate this file is represented by a value of 662

Linux Common commands

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.