linux-unit1练习题

来源:互联网 发布:如何申请淘宝小号涮单 编辑:程序博客网 时间:2024/06/06 07:54

1.用student用户登录系统图形界面

[kiosk@foundation4 Desktop]$ rht-vmctl start desktop   //开虚拟机

Starting desktop.

[kiosk@foundation4 Desktop]$ rht-vmctl view desktop   //显示虚拟机

[kiosk@foundation4 Desktop]$

打开虚拟机,让虚拟机显示出来,在显示出来的登录界面点击student用户进行登录,输入密码,登录成功。

2.打开一个bash

<1>Applications>Utilties>Terminal

<2>鼠标右键>open in Terminal

3.修改student的密码,把密码更新成“T3stlngtlme”(主机字母和数字)

<1>root用户修改student密码

[root@localhost Desktop]# passwd student              //修改密码命令

Changing password for user student.

New password:                                         //输入新的密码(不回显)

Retype new password:                                  //再次输入新的密码(不回显)

passwd:all authentication tokens updated successfully. //修改密码成功

<2>student用户修改student密码

[student@localhost Desktop]$ passwd                   //修改密码命令

Changing password for user student.                   

Changing password for student.

(current) UNIX password:                              //输入student用户原密码

New password:                                         //输入新的密码(不回显)

Retype new password:                                  //再次输入新的密码(不回显)

passwd:all authentication tokens updated successfully. //修改密码成功

4.显示当前系统时间

[root@localhost Desktop]#date             //显示系统当前时间

5.显示当前系统时间,显示格式为:“小时:分钟:秒 AM/PM”(AM/PM为上下午标识)

[root@localhost Desktop]#date +%H:%M:%S%p

6.显示“/usr/bin/clean-binary-files”的文件类型

[root@localhost Desktop]# file /usr/bin/clean-binary-files    //查看文件类型

/usr/bin/clean-binary-files:POSIX shell script,ASCII text executable //文件类型

7.统计“/usr/bin/clean-binary-files”的文件大小

[root@localhost Desktop]# wc -c /usr/bin/clean-binary-files   //查看文件的大小

13220 /usr/bin/clean-binary-files                             //文件大小

8.用快捷方式在shell中调用已经执行过的第4条命令

[root@localhost Desktop]# !4                                //调用已经执行过的第4条命令

9.用快捷方式执行最近一条含有“date”关键字的命令

[root@localhost Desktop]# ctrl+r+date                       //用快捷方式执行最近一条含有“date”关键字的命令

 

1 0