Apple system commands for system monitoring and management

Source: Internet
Author: User

MAC OS x provides terminal (in the Application-> Utility folder), which is the terminal program as the command-line interaction interface. The way the command line works does make some work easier, such as management and monitoring of some systems, and simple viewing and processing of configuration text.

Many users may have experience in terminal using some basic commands, such as LS,RM,MKDIR,RMDIR,CP and so on. This paper introduces some terminal commands, which are more advanced and less popular than LS, and are mainly used for system monitoring and management.

In a dark (or pale) terminal program, have you ever typed the wrong line of commands and pressed the backspace button to the sore finger? Or do you use the left and right arrows to walk back and forth with that blinking little cursor? command-line control of the cursor several shortcuts must be mastered, absolute ease of use.

Cursor Control:

CONTROL-A: Move the cursor to the beginning of the line

CONTROL-C: Move the cursor to the end of the line

Control-u: Delete all characters before the inline cursor

Control-k: Delete all characters after the cursor in the row

Monitoring related:

Top: Real-time display of resource consumption for each process in the system

WHO: Display account information

Uptime: This time has been booted

Last: View related log After previous user logged in

Df–h: View File System Information

Fdisk–l: View partition information (single system single disk OS X users don't have to look)

Du-sh *: View the folder size under the current directory

Iostat: View CPU and disk I/O-related statistics

Lsof: View all open files

LPQ: View print queues

Diskutil: Full-Featured disk tools

DMESG: View kernel messages

Sysctl: Displaying and setting kernel parameters

Ifconfig: View network adapter configuration

BG/FG: Run the job in the background/foreground

Jobs: View Current job

kill-9 [PID]: Forces a process to end, where [PID] is the process number

Uname–a: Displaying operating system Information

Other controls:

CTRL + C Abort task

Ctrl+d Terminate Task

Ctrl+z Background Run Task

Page navigation under the j/f command line

So much. If you are interested in Mac OS X's underlying UNIX and Apple's transformation, recommend an introductory book, "A Practical Guide to UNIX for MAC OS X Users."

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.