2、Linux基础练习题

题目

2、Linux基础练习题

答案

1、答案
[root@centos7 ~]# date +'%F %T'
2019-07-23 10:21:35
2、答案
[root@centos7 ~]# date +%A -d '-2 days'
星期日
3、答案
[root@centos7 ~]# date -s '2019-08-07 06:05:10'
2019年 08月 07日 星期三 06:05:10 CST

4、答案

通过man手册查看issue帮助,再查看agetty或mingetty帮助
  • motd是登录后的显示信息,issue是登陆前的提示信息
[root@centos7 ~]# cat /etc/issue
current terminel:\l
current time:\t
current hostname:\s
\S
Kernel \r on an \m
显示效果:

2、Linux基础练习题

5、答案

查看shutdown帮助
[root@centos7 ~]# shutdown 18:30 "今天18:30系统自动关机"
Shutdown scheduled for 三 2019-08-07 18:30:00 CST, use 'shutdown -c' to cancel.

猜你喜欢

转载自blog.51cto.com/14012942/2422696