Some basic commands for linux

Posted By: Matpal - March 28, 2018
1. How to find disc space

sh-4.4$ df -h
Filesystem      Size  Used Avail Use% Mounted on                                                                                                       
overlay         440G   12G  406G   3% /                                                                                                                
tmpfs           126G     0  126G   0% /dev                                                                                                             
tmpfs           126G     0  126G   0% /sys/fs/cgroup                                                                                                   
/dev/sdb1       440G   12G  406G   3% /etc/hosts                                                                                                       
shm              64M     0   64M   0% /dev/shm                                                                                                         
tmpfs           126G     0  126G   0% /sys/firmware

2. How to find the linux name and version

sh-4.4$ uname -a 
Linux 73482bbdf7a0 3.10.0-514.26.2.el7.x86_64 #1 
SMP Tue Jul 4 15:04:05 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

3. How to find the last yum update

$ grep Updated: /var/log/yum.log | tail-5  

4. How to find the last rebooted time for linux

sh-4.4$ last reboot                                                                                                                                                                                                           
wtmp begins Sun Jan 28 20:27:49 2018   


Post a Comment

Note: Only a member of this blog may post a comment.