Linux系统配置查看-命令汇总 发表于 2018-04-26 | 分类于 Linux | 阅读次数 | 字数统计 409 | 阅读时长 2查看Linux操作系统版本12[samson@work ~]$ head -n 1 /etc/issueCentOS release 6.9 (Final)查看计算机名12[samson@work ~]$ hostnamework查看内核/操作系统/CPU信息的命令12[samson@work ~]$ uname -aLinux work 2.6.32-696.23.1.el6.x86_64 #1 SMP Tue Mar 13 22:44:18 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux查看内存信息12345678910111213141516171819202122232425262728293031323334353637383940414243[samson@work ~]$ cat /proc/meminfoMemTotal: 2054216 kBMemFree: 1865084 kBBuffers: 7476 kBCached: 75372 kBSwapCached: 0 kBActive: 48128 kBInactive: 48020 kBActive(anon): 13316 kBInactive(anon): 192 kBActive(file): 34812 kBInactive(file): 47828 kBUnevictable: 0 kBMlocked: 0 kBSwapTotal: 4128764 kBSwapFree: 4128764 kBDirty: 4 kBWriteback: 0 kBAnonPages: 13320 kBMapped: 6880 kBShmem: 208 kBSlab: 63876 kBSReclaimable: 9772 kBSUnreclaim: 54104 kBKernelStack: 1488 kBPageTables: 2048 kBNFS_Unstable: 0 kBBounce: 0 kBWritebackTmp: 0 kBCommitLimit: 5155872 kBCommitted_AS: 89748 kBVmallocTotal: 34359738367 kBVmallocUsed: 32600 kBVmallocChunk: 34359687672 kBHardwareCorrupted: 0 kBAnonHugePages: 0 kBHugePages_Total: 0HugePages_Free: 0HugePages_Rsvd: 0HugePages_Surp: 0Hugepagesize: 2048 kBDirectMap4k: 10176 kBDirectMap2M: 2086912 kB查看内存大小:12[samson@work ~]$ cat /proc/meminfo |grep MemTotalMemTotal: 2054216 kB查看存储大小:12345678910[samson@work ~]$ df -hFilesystem Size Used Avail Use% Mounted on/dev/mapper/vg_work-lv_root 50G 1.3G 46G 3% /tmpfs 939M 0 939M 0% /dev/shm/dev/sda1 477M 52M 400M 12% /boot/dev/mapper/vg_work-lv_home 45G 107M 43G 1% /homevboxshare 311G 5.5G 305G 2% /media/sf_vboxsharevboxshare 311G 5.5G 305G 2% /mnt/vboxshare查看CPU信息(型号)12[samson@work ~]$ cat /proc/cpuinfo | grep name | cut -f 2 -d : | uniq -c 1 Intel(R) Core(TM) i5-6400 CPU @ 2.70GHz查看CPU的主频12[samson@work ~]$ cat /proc/cpuinfo |grep MHz|uniqcpu MHz : 2712.002Linux总核数计算12总核数 = 物理CPU个数 X 每颗物理CPU的核数总逻辑CPU数 = 物理CPU个数 X 每颗物理CPU的核数 X 超线程数查看物理CPU个数12[samson@work ~]$ cat /proc/cpuinfo| grep "physical id"| sort -u | wc -l1查看每个物理CPU中core的个数(即核数)12[samson@work ~]$ cat /proc/cpuinfo| grep "cpu cores"| uniqcpu cores : 1查看逻辑CPU的个数12[samson@work ~]$ cat /proc/cpuinfo| grep "processor"| wc -l1坚持原创技术分享,您的支持将鼓励我继续创作!赏微信打赏支付宝打赏