生产环境中常用的命令
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了生产环境中常用的命令相关的知识,希望对你有一定的参考价值。
一般情况下,买了一台新机器。为了安全考虑,登录系统后把密码先修改了。[[email protected] ~]# sudo passwd root
Changing password for user root.
New UNIX password: 新的密码
BAD PASSWORD: it does not contain enough DIFFERENT characters
Retype new UNIX password: 重新输入新的密码
passwd: all authentication tokens updated successfully. 所有的身份验证令牌已经成功更新。
[[email protected] ~]#
=====================================================================================
查看系统版本
[[email protected] ~]# cat /etc/redhat-release
CentOS release 5.5 (Final)
[[email protected] ~]#
=====================================================================================
CentOS如何查看系统是64位还是32位?
[[email protected] ~]# getconf LONG_BIT
64 这个版本是64位。如果是32位的这里就显示32
[[email protected] ~]#
======================================================================================
Centos 查看CPU
[[email protected] ~]# cat /proc/cpuinfo |grep "cores"|uniq
cpu cores : 4 代表就是4核
[[email protected] ~]#
=====================================================================================
Centos 查看内存
[[email protected] ~]# free 查看内存使用
total used free shared buffers cached
Mem: 3956680 1265416 2691264 0 102732 867464
-/+ buffers/cache: 295220 3661460
Swap: 5996536 0 5996536
[[email protected] ~]# cat /proc/meminfo 读出的内核信息进行解释
MemTotal: 3956680 kB
MemFree: 2691784 kB
Buffers: 102772 kB
Cached: 867472 kB
SwapCached: 0 kB
Active: 447188 kB
Inactive: 687136 kB
HighTotal: 0 kB
HighFree: 0 kB
LowTotal: 3956680 kB
LowFree: 2691784 kB
SwapTotal: 5996536 kB
SwapFree: 5996536 kB
Dirty: 164 kB
Writeback: 0 kB
AnonPages: 164092 kB
Mapped: 41336 kB
Slab: 93704 kB
PageTables: 14012 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
CommitLimit: 7974876 kB
Committed_AS: 450104 kB
VmallocTotal: 34359738367 kB
VmallocUsed: 4380 kB
VmallocChunk: 34359733007 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
Hugepagesize: 2048 kB
[[email protected] ~]#
====================================================================================
Centos 查看磁盘大小
[[email protected] ~]# df -h
文件系统 容量 已用 可用 已用% 挂载点
/dev/mapper/VolGroup00-LogVol00
72G 3.1G 66G 5% /
/dev/hda1 99M 13M 82M 14% /boot
tmpfs 1.9G 0 1.9G 0% /dev/shm
[[email protected] ~]#
=====================================================================================
以上是关于生产环境中常用的命令的主要内容,如果未能解决你的问题,请参考以下文章