Commands related to system information

  • You can view the current system date and time, disk space usage, and program execution on the server when maintaining the server through a remote terminal

content

  • Time and date
    • date
    • cal
  • Disk and directory space
    • df
    • du
  • Process information
    • ps
    • top
    • kill

1. Time and date

The serial number The command role
01 date Viewing the System Time
02 cal Calendar Displays the calendar. The -y option displays the calendar for a year

2. Disk information

The serial number The command role
01 df -h Disk Free Displays the free disk space
02 Du -h [directory name] Disk Usage Displays the file size in the directory
  • Options that parameter | meaning
  • H | — – | in humane way show the file size

3. Process information

  • The so-called process, popular culture is the current executing a program number | | command
  • | | – 01 | ps aux | process status check process status in detail 02 | top | dynamic display the running process and sort 03 | kill [9] process code | termination specified code process, 9 said forced termination

By default, ps displays only the applications started by the current user on the terminal

  • psOption Description Function
options meaning
a Displays all processes on the terminal, including those of other users
u Displays the detailed status of processes
x Displays processes that do not control terminals

Tip: When using the kill command, you are advised to stop only the processes started by the current user rather than the processes started by the root user. Otherwise, the system may crash

To exit top, type Q