linux練習題

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”關鍵字的命令

 


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章