chkconfig :用于启动(或关闭)和查看服务器运行级别;
chkconfig --version 版本
chkconfig --list 查看所有服务信息
chkconfig --list mysql 查看某一服务信息
chkconfig mysql on/off 表示开机自动运行(或不启动)
last: 显示以前登录过系统的用户信息
last -n 10 -R 只显示最近登录的10条信息,-R表示不显示主机名称
lastb:表示登录失败的用户信息:
service httpd status 查看某一服务状态
service mysql stop
service mysql start 开启或关闭某一服务
cal 显示日历
cal 默认显示当前月份
cal -3 显示上月、本月、下月;
cal -y 显示当年
cal 2000 显示指定年份
date显示当前系统时间
hostid:显示主机数字标识(十六进制)
bc:计算任意精度的算数语言
yes: 反复输出指定字符:
shutdown :关机
shutdown -r now 马上重启
shutdown -h now 马上关机
shutdown -h+5 "Warning,Closing computer" 5分钟以后关机,并提醒
shutdown -c 取消关机指令
logname 显示当前登录用户名
su 切换用户
su root
su -root
users: 显示当前登录的用户
groups:显示当前用户所属的组
原文:http://freedom1991.blog.51cto.com/10752428/1699294