基本命令

Posted 一干而尽

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了基本命令相关的知识,希望对你有一定的参考价值。

查看系统基本信息:                                                           
hostname | uname -n                                                 
uname -r                                                            
uname -a                                                            
cat /etc/redhat-release                                             
                                                                    
lsblk                                                               
blkid   //查看磁盘号                                                     
du -sh      //查看当前目录                                                
du -sh /home    //查看目录的使用空间                                         
                                                                    
last    //查看系统什么时候重启过                                               
lastlog //查看用户最后一次登录操作系统的时间                                         
uptime  //显示系统的系统的基本状况                                              
                                                                    
top     //监控操作系统实时运行状况                                              
    r:更改正在运行进程的nice值                                                
    k:杀掉进程                                                          
    q:退出                                                            
    ?:寻求帮助                                                          
    shift+>:向下翻页                                                    
    shift+<:向上翻页                                                    
    shift+p:按照进程占用cpu的百分比排序                                         
    shift+M: 按照进程占用内存的百分比排序                                         
                                                                    
ps命令:                                                               
#查看本终端所运行的程序                                                        
ps aux      //显示更多信息,BSD语法                                          
ps -ef      //显示更多信息,标准语法                                           
//打印一个进程树                                                           
ps -ejH                                                             
ps axjf                                                             
                                                                    
//获取有关线程的信息                                                         
ps -eLf                                                             
ps axms                                                             
                                                                    
//获取安全信息                                                            
ps -eo euser,ruser,suser,fuser,f,comm,label                         
ps axZ                                                              
ps -eM                                                              
=====================================================================

以上是关于基本命令的主要内容,如果未能解决你的问题,请参考以下文章

Linux学习之路命令基本格式

Git 常用基本命令

Git 常用基本命令

PowerShell 基本语法及常用命令

linux基本命令

linux 详解useradd 命令基本用法