[Linux command] system settings

date command

date displays the current host time

date -s 20080715  //将本机时间改为2008-7-15 00:00:00

date -s 17:50  //将本机小时和分钟改为17时,50分钟

date -d "2 days ago" +%Y-%m-%d  //显示两天前的日期  (显示描述的日期)

man command

The man command is used to display help information for the specified command

man ls

who command

who shows the user currently logged in to the system

 //who -r 查询系统处于运行级别
 run-level 5  2018-01-23 16:04

uname command

uname displays operating system related information

uname -a //显示操作系统全部信息

uptime command

The command is used to output the system task queue information. It
outputs the current system time, the running time from the system startup to the present, how many users are currently online and the average system load, etc.

free command

Command used to display system memory status

free -m 以MB为单位显示内存的使用情况 Swap是交换分区

ps command

Show system processes in瞬间的运行状态

ps -ef 查看系统所有进程
ps -aux

top command

View 即时活跃the process.

ulimit command

The application of ulimit is very wide, especially the optimization of system parameters.

    -a  显示目前资源限制的设定。  

    -c <core文件上限>  设定core文件的最大值,单位为区块。  

    -d <数据节区大小>  程序数据节区的最大值,单位为KB
    -f <文件大小>  shell所能建立的最大文件,单位为区块。  

    -H  设定资源的硬性限制,也就是管理员所设下的限制。  

    -m <内存大小>  指定可使用内存的上限,单位为KB
    -n <文件数目>  指定同一时间最多可打开的文件数。  

    -p <缓冲区大小>  指定管道缓冲区的大小,单位512字节。  

    -s <堆栈大小>  指定堆叠的上限,单位为KB
    -S  设定资源的弹性限制。  

    -t <CPU时间>  指定CPU使用时间的上限,单位为秒。  

    -u <进程数目>  用户最多可启动的进程数目。 

    -v <虚拟内存大小>  指定可使用的虚拟内存上限,单位为KB

Click the command details

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324880169&siteId=291194637