1.虛擬機控制linux
在真機中打開Terminal,在命令行中輸入如下命令:ios
[kiosk@foundation0 Desktop]$ rht-vmctl start desktop###開啓desktop虛擬機shell
Error: desktop not started (is already running)###報錯,desktop已經運行bash
[kiosk@foundation0 Desktop]$ rht-vmctl view desktop###顯示desktop微信
[kiosk@foundation0 Desktop]$ rht-vmctl poweroff desktop ###關閉dekstopsession
Powering off desktop..less
[kiosk@foundation0 Desktop]$ rht-vmctl start desktop ###開啓desktopide
Starting desktop.ui
[kiosk@foundation0 Desktop]$ rht-vmctl view desktop spa
[kiosk@foundation0 Desktop]$ rht-vmctl poweroff desktop
Powering off desktop..
[kiosk@foundation0 Desktop]$ rht-vmctl view desktop
Error: unable to view desktop - not currently running.###虛擬機沒開啓沒法顯示
[kiosk@foundation0 Desktop]$ rht-vmctl reset desktop ###當虛擬機出現故障,reset表示重置
Are you sure you want to reset desktop? (y/n) y###詢問是否重置y表示yes
Resetting desktop.##正在重置
Powering off desktop..
2.進入系統
*)普通用戶登錄
student 普通用戶,密碼student
*)超級用戶登錄
->not listed 點擊未列出
username提示輸入用戶名稱
->rootroot爲系統超級用戶
passwd提示輸入密碼
->redhatredhat是超級用戶密碼
###語言調整#####
Applications ----->system tools---->settings ----->Region & language --->language
打開命令行---> reboot
3.行提示符
[kiosk@foundation0 Desktop]$
kiosk##打開shell的用戶
@##分隔符
foundation0##主機名稱
Desktop##工做目錄名稱
$##身份提示符,#表示超級用戶,$表示普通用戶
注意:命令要在行提示符以後輸入才能執行
4.切換用戶
[kiosk@foundation0 Desktop]$ su - username
*)高級用戶切換到低級用戶不須要密碼,低級用戶切換到高級或者平級用戶的切換須要密碼
5.虛擬控制檯
Ctrl+Alt+F(1|7)進入圖形
Ctrl+Alt+F(2~6) 進入虛擬控制檯
Red hat Enterprise Linux Server 7.0 (Maipo)##系統版本
Kernel 3.10.0-123.el7.x86_64 on an x86_64##內核版本,系統位數
desktop0 login:root##登錄用戶名稱輸入
Password:##密碼輸入無回顯
6.命令的執行
1.命令必須在行提示符以後輸入
2.命令格式
命令 參數 目標
3.ctrl +c##撤銷命名的執行
4.命令參數
-參數##單詞縮寫
--參數##單詞的全拼
7.命令的幫助
1.
whatis 命令 ##查看命令的功能
命令 –help ##查看命令的幫助
[]##選擇加入的內容,可加可不加
...##加入的內容個數任意
<>##內容在命令執行過程中必需要加
8.系統的使用基礎方法
1)系統登錄
圖形登錄方式
文本登錄方式
gnome-session-quit --force###註銷用戶 --force強制註銷,不詢問
2)工做界面轉換
ctrl+alt+上|下
3)開始bash
1.Applications>Utilities>Terminal
2.鼠標右鍵----->open in terminal
3.gnome-terminal
4. ctrl+shift+n##在新窗口中打開shell
ctrl+shift+t##同一個窗口中打開新的tab
5.退出:exit | ctrl+d
4)系統關機,重啓
重啓
reboot | init 6 |shutdown -r now
關機
poweroff | init 0 | shutdown -h now
5)鎖屏
ctrl + alt +L##在rhel7.0
win鍵 + L##在rhel7.2
9.簡單的系統命令
1) date
watch -n 1 date ###讓date命令每秒執行一次,ctrl +c 推出監控模式
date 11181115###把系統時間設定爲11月18日11:15 格式:月月每天小時分鐘
date 111811152016.55##2016表示年(能夠不加).55 表示秒(能夠不加)
-d +xday -xday##查看x天前或者後的時間
+%....##設定date的輸出格式
2)passwd
1.passwd 修改用戶密碼
[root@foundation0 ~]# passwd
Changing password for user root.##改變超級用戶密碼
New password: ##輸入密碼
BAD PASSWORD: The password is shorter than 8 characters
Retype new password: ##確認密碼
passwd: all authentication tokens updated successfully.
[kiosk@foundation0 Desktop]$ passwd
Changing password for user kiosk.##改變普通用戶密碼
Changing password for kiosk.
(current) UNIX password: ##輸入當前密碼
New password:
BAD PASSWORD: The password is the same as the old one##和原始密碼不能類似
New password:
BAD PASSWORD: The password fails the dictionary check - it is too simplistic/systematic ##密碼必須是無序數字+字母
New password:
BAD PASSWORD: The password is shorter than 8 characters##密碼必須>8位
passwd參數用戶名稱
-Sstudent##用戶密碼信息
--status student。。。。。。
-lstudent##鎖定賬號
-ustudent##解鎖
-n 1student ##設定密碼最短有效期
-x 30student ##設定密碼最長有效期
-w 3student ##警告期
-i 2student ##設定用戶非活躍天數
-dstudent##清除用戶密碼
監控passwd密碼信息
watch -n 1 passwd -S student
3)file
file 文件名字##查看文件類型
4)文件的查看
catfilename##顯示文件的所有內容
lessfile##分頁瀏覽,按「q」退出
headfilename##顯示一個文件的前幾行
head -n 5filename##前五行
tailfilename##顯示文件後幾行
tail -n 5 filename##顯示一個文件的後5行
5)wc統計文件容量信息
wc-l行數
-w字數
-c字節數
-m字符數
10.tab鍵
在系統中table鍵能夠自動補齊存在的命令,文件名稱和某些命令的參數
a+TAB x2 顯示系統中全部a開有的命令
11.history歷史調用
history##顯示歷史
hostory -c##清除當前環境當中的歷史命令
!數字##執行第多少行命令
!字母##執行最近一條以這個字母開頭的命令
ctrl +R +關鍵字 ##執行最近一條含有這個關鍵字的命令
上下鍵##逐行調用命令
12.linux中的快捷鍵
左右##一個字符一個字符移動
ctrl +左右##一個字一個字移動
ctrl + a ##光標移動到行首
+ e ##光標移動到行尾
+ u ##光標所在位置刪除到行首
+ k ##光標所在位置刪除到行尾
+ r+關鍵字 ##調出最近一條含有關鍵字的命令
+ c ##撤銷以輸入的命令
+ d ##關閉當前環境
+ L##清空屏幕
+ shift + c##複製
+ shift + v##粘貼
+ shift + t ##在現有shell中從新打開一個table
+ shift + n##在shell中打開一個新的shell
+ shift + pageup|pagedown ##切換table
+ alt + l ## 鎖屏
+ alt +上|下 ##切換工做界面
+ alt + f1|f7 ##進入圖形界面
+ alt + f2-f6 ##進入虛擬控制檯