Linux Common directives

Source: Internet
Author: User

The group has a Linux development beauty, Linux command mastered to the point of perfection.

Get this opportunity, learn some, summarize the commonly used instructions, not regularly updated to supplement.

--------------------------------------------------------------------------------------

I. Catalogue

1.cd "Directory"-Locate directory

2.cd. -Current Directory

3.cd.. -Return to the upper directory

4.CD ~-Current User root directory

5.CD/-Locating the root directory

6.pwd-View current directory

7.ls-View files in the current directory

8.ls-l file name-View a file details (permissions or whatever)

--------------------------------------------------------------------------------------

Two. Documentation

1.mkdir-Create a directory

2.touch-Create File

3.cat-View File contents

4.vi/vim-Edit File

5.vi/vim Command mode, I is the insert operation,: Instruction mode, Wq save exit, Q exit directly,! Q Force exit, ESC exits insert mode

6.RM-Delete Files

--------------------------------------------------------------------------------------

Three. Program Chapter

1../executable file-Execute file

2./executable file-parameters-file configuration file execute executable file according to configuration file and parameters

--------------------------------------------------------------------------------------

Four. Account Permissions Chapter

1.SU-Switch to Super Uer Ultra user mode

2. In super User mode, exit mode

3.SU account name-switch account

--------------------------------------------------------------------------------------

Five. Network Chapter

1.NETSTAT-APN | grep 80 Querying port information

--------------------------------------------------------------------------------------

Six. Service Chapter

1.service iptables Status View firewall status2.service iptables start to turn on the firewall3.service iptables stop shutdown firewall4.service iptables Restart reboot firewall 5.serivce iptables save Save settings for Firewall 6. Firewall configuration file-/etc/sysconfig/iptables7. Add Configuration Rule -a rh-firewall-1-input-m state--state new-m tcp-p TCP--dport 8080-j ACCEPT (open a port to put the rule to the last of the INPUT rules BAR) --------------------------------------------------------------------------------------

Seven. System operating Chapter

1.reboot Restart Now

2.shutdown-r now reboot (root user)

3.poweroff immediately shut down the machine

4.shutdown-h now shuts down (root user)

--------------------------------------------------------------------------------------

PS: Not updated regularly, not authoritative, only for their own inspection.

Linux Common directives

Related Article

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.