Warning: count(): Parameter must be an array or an object that implements Countable in /www/wwwroot/mdaeo.org/usr/plugins/AMP/Action.php on line 388
centos常用命令记录

centos常用命令记录

2010-11-19T21:21:29

1、查看系统版本号
cat /etc/redhat-release vps下用这个看~ 其他的好像没效果
uname -a
lsb_release -a
2、系统包管理
yum -y update 这个经常用到的,检查是否有版本更新
rpm -qa | grep httpd 查看安装的软件信息
3、查看cup信息
more /proc/cpuinfo | grep “model name”
grep “model name” /proc/cpuinfo
grep “model name” /proc/cpuinfo | cut -f2 -d:
getconf LONG_BIT cpu系统位数
4、查看内存
grep MemTotal /proc/meminfo
grep MemTotal /proc/meminfo | cut -f2 -d:
free -m |grep “Mem” | awk ‘{print $2}’
cat /proc/meminfo
5、查看主机名
hostname
cat /etc/sysconfig/network
6、查看开机运行时间
uptime
7、查看系统资源使用情况
vmstat 1 -S m
top
8、重启
reboot
shutdown –ry 0
9、关闭
halt
shutdown -h
init 0
10、断开其他ssh用户
先查看连接的用户 :who
断开用户:fuser -k /dev/pts/2

当前页面是本站的「Baidu MIP」版。发表评论请点击:完整版 »
因本文不是用Markdown格式的编辑器书写的,转换的页面可能不符合MIP标准。