Linux Common commands

Source: Internet
Author: User
Tags gz file

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

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.