切换用户:
[root@localhost ~]# su - xxq //从根用户root切换到用户xxq,(输入- youruser,其中youruser就是你要切换去的用户)
[xxq@localhost ~]$ su - root //从用户xxq切换回根用户root
口令:
[root@localhost ~]#
(其中root或者xxq 是目前用户的账号,localhost是主机名,最右边的~指的是目前所在的目录)
显示日期和时间:
[root@localhost ~]# date
2011年 08月 09日 星期二 20:44:45 CST //CST是China Standard Time 中国标准时间(北京时间)
[root@localhost ~]# date +%Y/%m/%d //注意是 大写Y,小写的m和d
2011/08/09
[root@localhost ~]# date +%H:%M
20:51
显示日历:
[root@localhost ~]# cal //显示本月的日历
八月 2011
日 一 二 三 四 五 六
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31
[root@localhost ~]# cal 2011 //显示2011年的日历
2011