Linux commonly used commands, learn the time to remember the commonly used to save convenient later use O (∩_∩) o haha

Source: Internet
Author: User
Tags save file

Service httpd Restart restart Apache
Service mysqld Restart restart MySQL

[-] [RWX] [R-x] [r--]
1 234 567 890
421 421 421

CHGRP: Change the file group example: CHGRP root (user group) testing (directory)
Chown: Change File owner example: chown cent (user) testing (directory)
chmod: Changing the properties of files, SUID, etc.

chmod (U-user, G-group, O-others, A-all) (R, W, x) files or directories chmod 777 Directory

mkdir Creating a Directory
Touch Create Profile

Su User Transform User
RM Directory Delete Directory

Cat is an instruction to read the contents of an archive

Ls-l/View and directory
Ls-al View All

Reboot restart
Halt shut down the machine
Shutdown-r now restart
Shutdown-h now shutdown

Shutdown-r 10 10 minutes after restart
Shutdown-r 10:0-point restart

Vi
I: Before the cursor
Save command

Press the ESC key to jump to command mode, and then:

: w save file but do not exit VI
: W file saves the modification to file and does not exit VI
: w! Forced to save, do not launch VI
: Wq save file and Exit VI
: wq! Force the file to be saved and exit VI
Q: Do not save file, Exit VI
: q! Do not save file, Force exit VI
: e! Discard all changes and edit from the last time the file was saved

Php-m See the extensions that PHP has installed
Yum Search plug-in name to install

Vim Find/Find content

/etc/httpd/conf.d/about the host binding domain name parsing

Change time in Beijing:
1.[[email protected] ~]# rm-rf/etc/localtime
2.[[email protected] ~]# ln-s/usr/share/zoneinfo/asia/shanghai/etc/localtime

Kill-9 26136 (number of services) kill process
Chkconfig Service name on open service

Linux commonly used commands, learn the time to remember the commonly used to save convenient later use O (∩_∩) o haha

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.