1. Man helps explain commands you are familiar with or unfamiliar with
Eg:man ls to view LS-related usage
Note: Press the Q key or CTRL + C to exit, under Linux you can use CTRL + C to terminate the current program run.
2. LS View the directory or file of the genus *, listed as a directory below the file
Eg:ls/usr/man
Ls-l
A.D represents the directory, if it is a "-" represents a file, if L is a connection file (link)
B. Represents a file or directory permission permission. Separate with readable (R), writable (w), can be run (x).
3. CP Copy File
EG:CP filename1 filename2//copy filename1 to Filename2
CP 1.c NETSEEK/2.C//1.c Copy to Netseek directory named 2.c
4. RM Delete files and directories
EG:RM 1.c//delete 1.c this file
5. MV Remove directory or change file name
EG:MV filename1 filename2//renamed filename1 to Filename2
MV Qib.tgz. /QIB.TGZ//move to the top level directory
6. CD Change current directory PWD View the current directory full path
EG:PWD//view current directory path
CD Netseek//Enter Netseek this directory
CD//Exit current directory
7. Cat,more command
Displays the contents of a file. The two commands differ: The cat prints the contents of the file, while the more is displayed on a split screen
eg CAT>1.C//You can paste the code into the 1.c file, press Ctrl+d to save the code.
Cat 1.c or more 1.c//can view content inside.
Gcc-o 1 1.c//compiles 1.c into an. exe file, and we can compile the code with this command.
8.chmod Command Permissions Modify usage: chmod a 8 binary number filename.
Eg:chmod u+x filenmame//Just want to run for themselves, others can only read
U represents the file owner, and G represents the group where the file is located. o denotes others; R table readable, W table writable, x table can be run
chmod g+x filename//Same group of people to perform
9. Clear,date command
Clear: Clear screen, equivalent to Dos under the CLS;
Date: Displays the current time.
Mount load a hardware device
Usage: Mount [parameter] the device load point to load
Eg:mount/dev/cdrom
Cd/mnt/cdrom//Enter the disc directory
One. Su switches to another person's identity without exiting the login
Usage: SU-L User name (if user name is default, switch to root state)
Eg:su-l netseek (Switch to netseek This user, will be prompted to enter the password)
12.whoami,whereis,which,id,who
WHO displays all user information
WHOAMI: Confirming your identity
Whereis: Query the directory where the command resides and the directory where the Help document resides
Which: Query the directory where the command is located (similar to Whereis)
ID: Print out your UID and GID. (UID: A unique identification of the user identity.) GID: User group identity unique identity. Each user can only have a unique UID and GID)
Eg:whoami//Display your self-logged in user name
Whereis bin Displays the directory where the bin is located and will be displayed as:/usr/local/bin
Which bin
Grep,find.
grep: text content search; find: File or directory name, and permissions belong to the main matching search
EG:GREP Success */* Find files containing success characters in all files under the current directory
Kill kills a process that is in progress or is already in a dest state
eg PS AX
passwd can set the password. Other commands related to this are
Useradd only create users, you need to create passwords and add directories, if you create a password and do not create a directory, the user log on as the home directory, not writable.
AddUser for interactive, create a user to create a password at the same time, create directory;
Groupadd group name Create a new group PASSWD username user-created password passwd-d user name Delete user password can also login passwd-s user name query account password usermod-l new username old user name rename user userdel–r user Name Delete User everything
The commands used by the history user
Eg:history//can display commands used by the user in the past
17.!! Perform the most recent command
mkdir command
Eg:mkdir Netseek//create Netseek this directory
. Tar decompression Command
TAR-C Create Package –x release Package-V Show command procedure –z represent compressed package TAR–CVF benet.tar/home/benet Pack/home/benet directory TAR–ZCVF benet.tar.gz/mnt package and compress the directory TAR–ZXVF benet.tar.gz Compressed Package file Decompression Recovery TAR–JXVF benet.tar.bz2 decompression
Finger can allow users to query some other user's information
Eg:finger//View the user's usage profile
Finger root//view root information
Several basic commands commonly used by Linux