linux entry must master command - system status detection command

ifconfig command

用于配置和显示Linux内核中网络接口的网络参数。

Parameters:
Down: Closes the specified network device;
up: Start specified network device;
Tunnel <address>: establishing a communication tunnel between the IPv4 and the IPv6 address;

启动关闭指定网卡:
ifconfig eth0 up
ifconfig eth0 down

uname command

打印当前系统相关信息(内核版本号、硬件架构、主机名称和操作系统类型等)

Options:
-a or --all: All the information;
-n or -nodename: Displays the host name on the network;

uptime command

打印系统总共运行了多长时间和系统的平均负载。

Uptime command displays information that can be displayed as follows: time now, the system has been running for a long time, the current number of users landed in the last 1 minute, 5 minute average load within 15 minutes and the system.

free command

显示当前系统未使用的和已使用的内存数目,还可以显示被内核使用的内存缓冲区。

Options:
-b: Byte units to display memory usage;
-k: in KB display memory usage;
-m: in MB display memory usage;
-h: display in GB memory usage;
-o: not display buffer adjustment columns;
-s <interval seconds>: memory usage is continuously observed;
-t: columns show the total memory;
-V: display version information.

who command

显示目前登录系统的用户信息。

Who can execute commands that there are users who log into the system, the individual who executed the command will list any user account, use the terminal, login time, and where to sign or display which X is being used.

Options:
-H or --heading: displaying the title information of each field columns;
-i or -u or --idle: idle time display, if the user has any previous operation within one minute, will be marked as " . "no, if the user has more than 24 hours without any action, then mark the" old "string;
-q or --count: show only login account name system and the total number of people;
-s: this parameter will be ignored pretreatment, who only responsible for resolving compatibility issues with other versions of the directive;
-w or -T or --mesg or --message or --writable: the status bar displays the user's information;

last command

用于显示用户最近登录信息。单独执行last命令,它会读取/var/log/wtmp的文件,并把该给文件的内容记录的登入系统的用户名单全部显示出来。

Options:
-n <number of columns to display> or - <shows the number of columns>: Set the number display column lists the list;
-a: to login to the system host name or ip address where to show in the last line;
-d: converting a host name into an IP address;
-f <log file>: Specifies the log file.
-R: does not display the host name or IP address of the logged in;
the -X-: System Shutdown, reboot, and changing information such as the execution level.

Parameters:
User Name: Displays the user registration list;
terminal: a login from the list of designated terminals.

history command

显示指定数目的指令命令,读取历史命令文件中的目录到历史命令缓冲区和将历史命令缓冲区中的目录写入命令文件。
该命令单独使用时,仅显示历史命令,在命令行中,可以使用符号!执行指定序号的历史命令。例如,要执行第2个历史命令,则输入!2。

Options:
-c: Clear the current command history;
-a: the history command buffer write command history command file;
-r: the history command file command reads the current history command buffer;
-w: current command history command buffer write command history file.

Parameters:
n: n recent print commands.

sosreport command

寻求在线帮助

Guess you like

Origin www.cnblogs.com/khche/p/11872653.html