Http://www.xxlinux.com/linux/article/accidence/install/20051202/564.htmlLinux Basic Commands
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, quite with DOS Cls;date: Display the current time, format Date ' +the date of today is:%x, it is:%x '
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
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
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
EG:TAR-ZXVF nmap-3.45.tgz//unzip this into the nmap-3.45 directory.
Finger can allow users to query some other user's information
Eg:finger//View the user's usage profile
Finger root//view root information
Common command format for Linux systems: http://www.itbbs.cn/manual/linux/command-lite/
Linux basic Commands