1.添加一个以自己的姓名拼音命名的新用户。
Adduser wht
2.设置该用户的密码。
[root@cobbler user1]# passwd WHT
更改用户 WHT 的密码 。
新的 密码:
重新输入新的 密码:
抱歉,密码不匹配。
新的 密码:
重新输入新的 密码:
passwd:所有的身份验证令牌已经成功更新。
3.使用新用户远程登录centos。
(以下操作除必要切换到root外,以下操作均在该用户下执行)
[root@cobbler user1]# su WHT
[WHT@cobbler user1]$ cd
4.屏幕上输出“I am xxx, my student ID number is xxxxxxxxx.”
[WHT@cobbler ~]$ echo I am WHT, my student ID number is 1948050**.
I am WHT, my student ID number is 1948050**.
5.显示系统时间,并将系统时间修改为2020年10月28日零点。
[WHT@cobbler ~]$ date
2020年 10月 28日 星期三 11:09:05 CST
[root@cobbler WHT]# date -s “2020-10-28 00:00:00”
2020年 10月 28日 星期三 00:00:00 CST
[root@cobbler WHT]# date
2020年 10月 28日 星期三 00:00:10 CST
[root@cobbler WHT]# su WHT
[WHT@cobbler ~]$ date
2020年 10月 28日 星期三 00:00:28 CST
6.查看2025年12月18日是星期几。
[WHT@cobbler ~]$ cal 18 12 2025
十二月 2025
日 一 二 三 四 五 六
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
7.查看并写出ls命令中-s选项的帮助信息。
ls –help
-S sort by file size
–sort=WORD sort by WORD instead of name: none (-U), size (-S),
time (-t), version (-v), extension (-X)
–time=WORD with -l, show time as WORD instead of default
modification time: atime or access or use (-u)
ctime or status (-c); also use specified time
as sort key if --sort=time
–time-style=STYLE with -l, show times using style STYLE:
full-iso, long-iso, iso, locale, or +FORMAT;
FORMAT is interpreted like in ‘date’; if FORMAT
is FORMAT1FORMAT2, then FORMAT1 applies
to non-recent files and FORMAT2 to recent files;
if STYLE is prefixed with ‘posix-’, STYLE
takes effect only outside