本篇内容主要讲解“如何查看linux和centos的基本配置”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“如何查看linux和centos的基本配置”吧!
# 查看 linux 版本$ uname -aLinux shanyue 3.10.0-957.21.3.el7.x86_64 #1 SMP Tue Jun 18 16:35:19 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux# 查看 centos 版本号$ cat /etc/centos-releaseCentOS Linux release 7.6.1810 (Core)
查看还有多少内存,available 指还有多少可用内存
# -h 指打印可视化信息$ free -h total used free shared buff/cache availableMem: 3.7G 154M 2.1G 512K 1.5G 3.3GSwap: 0B 0B 0B
# 查看 cpu 的核心数$ cat /proc/cpuinfo# 查看$ top$ htop
$ df -h
load average
指单位时间内运行态进程及不可中断进程的平均进程数,运行态进程指正在使用或者等待使用 CPU 的进程,不可中断进程指正等待一些 IO 操作的进程。可使用 uptime
查看此指标。
$ uptime 16:48:09 up 2 days, 23:43, 2 users, load average: 0.01, 0.21, 0.20
# 公网IP$ curl ifconfig.me59.110.216.155# 公网IP,上个地址的网络在国内不太好$ curl icanhazip.com59.110.216.155# 私网IP$ ifconfig eth0eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 172.17.68.39 netmask 255.255.240.0 broadcast 172.17.79.255 ether 00:16:3e:0e:01:d8 txqueuelen 1000 (Ethernet) RX packets 416550 bytes 505253322 (481.8 MiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 194374 bytes 67561825 (64.4 MiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
$ who -uwho -uroot pts/0 Oct 18 15:04 04:25 16860 (124.200.184.74)root pts/2 Oct 18 18:10 01:22 2545 (124.200.184.74)root pts/5 Oct 18 19:33 . 24952 (124.200.184.74)$ last -a | head -6root pts/5 Fri Oct 18 19:33 still logged in 124.200.184.74root pts/2 Fri Oct 18 18:10 still logged in 124.200.184.74root pts/2 Fri Oct 18 18:10 - 18:10 (00:00) 124.200.184.74root pts/2 Fri Oct 18 17:54 - 18:10 (00:16) 124.200.184.74root pts/2 Fri Oct 18 17:49 - 17:53 (00:03) 124.200.184.74root pts/2 Fri Oct 18 16:49 - 17:25 (00:36) 124.200.184.74
到此,相信大家对“如何查看linux和centos的基本配置”有了更深的了解,不妨来实际操作一番吧!这里是亿速云网站,更多相关内容可以进入相关频道进行查询,关注我们,继续学习!
亿速云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。
原文链接:https://my.oschina.net/u/4592353/blog/4562527