Linux Common commands

Source: Internet
Author: User

ifconfig------View IP Address

mkdir command. MKDIR is the acronym for Make directory: Create directory

  

Ls-f | grep '/$ '

Using the Linux Pipeline command, grep finds '/$ ' with/to the end, which is also the directory

The grep full name is global Regular expression Print, which represents the globally regular expression version, and its use rights are for all users.

| : Pipe Break

Using the pipe symbol "|" provided by Linux Separates the two commands, and the output from the left command of the pipe character is entered as the command to the right of the pipe.

Ls-lf

Linux Delete directory is very simple, many people are still accustomed to use rmdir, but once the directory is not empty, it fell into deep distress, now use the RM-RF command.
Direct RM is available, but add two parameters-rf that is: RM-RF directory name
-R is recursive down, no matter how many levels of directory, delete
-F is directly forcibly deleted, without any hint of meaning

To delete a folder instance:
Rm-rf/var/log/httpd/access
The/var/log/httpd/access directory and all files and folders under it will be deleted

Vim file path

I insert

Wq Save and exit

Linux restart

Reboot

To modify the configuration file to log in as the root user

    • Linux Instructions: System setup--export

Feature Description: Sets or displays environment variables.

syntax:export [-fnp][variable name]=[variable setting value]

Additional Note: when executing a program in the shell, the shell provides a set of environment variables. Export can add, modify, or delete environment variables for use by subsequent executing programs. The effect of export only extends to the operation of this landing.

    • ways to configure environment variables 1.

Modify the/etc/profile file if your computer is only recommended for development use, because all user shells have the right to use these environment variables, this can pose a security issue for the system.
• Open/etc/profile with a text editor
• At the end of the profile file, add:
Export Java_home=/usr/share/jdk1.6.0_14
Export path= $JAVA _home/bin: $PATH
Export classpath=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar

Profile:property file

• Re-login
• Annotations
A. You want to change/usr/share/jdk1.6.0_14 to your JDK installation directory
B. Use the colon ":" to separate the paths under Linux
C. $PATH/$CLASSPATH/$JAVA _home is the value used to refer to the original environment variable
When setting environment variables, be careful not to overwrite the original value, which is a
A common error.
D. Current directory in Classpath "." It is a common mistake to throw away the current directory.
E. Export is exporting these three variables as global variables.
F. The case must be strictly differentiated.  

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.