Linux_ System administration commands (frequently used in work)

Source: Internet
Author: User

  1. View network configuration information ifconfig
  2. View system Resource information (like win system Explorer) Top (ps:load average load Task process Cpus/mem Swap swap partition similar to win system virtual memory)
  3. View Memory usage Free-m #-m represents the default KB in megabytes
  4. View System Processes Ps-ef
  5. View firewall status/etc/init.d/iptables status or CD/ETC/INIT.D;. /iptables status
  6. Temporarily open firewall/etc/init.d/iptables start or service iptables start
  7. Temporarily shut down the firewall/etc/init.d/iptables stop or service iptables stop
  8. Permanently turn on the firewall chkconfig iptables on
  9. Permanently shut down the firewall chkconfig iptables off
  10. Restart Firewall settings Service iptables restart
  11. Firewall Custom Port formatting:
    A input-m state–state new-m tcp-p tcp–dport 80-j ACCEPT (allow 80 ports through the firewall)
    Vi/etc/init.d/iptables
    Increase the port in the format above
    /etc/init.d/iptables Restart can
  12. No ps-ef off when viewing tomcat | grep Tomcat
  13. When you turn on Tomcat, view the boot information tail-f. /logs/catalina.out
  14. Terminating tomcat Command kill-9 Tomcat_pid
  15. Restart Network Service restart
  16. View network status netstat (available to all users)
    -a query All-t query TCP (3 handshake, Secure) Information-u query UDP (only responsible for transmitting data, fast) information-L listening Port-R View Route (Gateway)-N IP Address port number
    NETSTAT-TUNL querying TCP and UDP network information that is listening
    Netstat-an Query all listening network information and connected network information

Linux_ System administration commands (frequently used in work)

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.