PWD Displays the current path
CD to switch directories. .. ~
LS display file (clamp)
-L Show more information
-a show all, including hidden files (clips)
mkdir Creating a Folder
-P Recursive creation
Touch Create a blank file
Echo
Cat, TAC, more, tail view text content
RmDir Delete a blank folder
Rm
-F Force Delete
-R Recursive Delete
CP Copy/New file
MV Move/Rename
Find File
PS View the process status of the moment
Kill-9 PID Kill Process
Ps-ef|grep keywords
Hostname Display host name
If you want to permanently modify the host name, the corresponding file/etc/sysconfig/network
VI Just enter VI, can only read can not write
Press I or a to enter insert mode
When exiting, press ESC first, then press the key combination shift+:, wq/x!/q!
Avoid shutting down the terminal directly
Which command view command location
Ifconfig Viewing network card information
Man, get help.
Permission *****************
Rwx
Read and write execution
Rwxr-xr-x
Belong to the main group of others
Usergroupother
chmod G+w Bin
644
rw-r--r--
chmod 755 Bin
Under Linux, the default permissions for newly created folders are 755
Under Linux, the default permissions for newly created files are 644
Learn to use Pietty, WinSCP
Unzip tar.gz file TAR-ZXVF hadoop-1.1.2.tar.gz
1. Installing the JDK
1) Increased execution permissions chmod 777 jdk******
2) unzip./jdk*******
3) Rename MV jdk***** JDK
4) Set environment variables, execute Vi/etc/profile
Add two rows of records export JAVA_HOME=/USR/LOCAL/JDK
Export path=.: $JAVA _home/bin: $PATH
Save exit
5) Immediate effect Source/etc/profile
Validation success: Execute Java-version
2. Password-free login with SSH
1) Generate key ssh-keygen-t RSA
Three times enter, generate two files under/root/.ssh/
2) Create an authorization file
CP ~/.ssh/id_rsa.pub ~/.ssh/authorized_keys
Verify: SSH localhost does not need to enter a password
Exit? Exit command
Linux Common commands