文章大綱 一、Linux發展史二、Linux系統的安裝三、Linux系統的文件四、學習資料下載五、參考文章 一、Linux發展史 1. Linux前身-Unix 1968年 Multics項目MIT、Bell實驗室、美國通用電氣有限公司走到了一起,致力於開發Multics項目。到後期由於開發進度不是 ...
文章大綱
一、Linux發展史
二、Linux系統的安裝
三、Linux系統的文件
四、學習資料下載
五、參考文章
![](https://upload-images.jianshu.io/upload_images/16598307-16015be6e87f2004.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1000/format/webp)
一、Linux發展史
1. Linux前身-Unix
1968年 Multics項目
MIT、Bell實驗室、美國通用電氣有限公司走到了一起,致力於開發Multics項目。到後期由於開發進度不是很好,MIT和Bell實驗室相繼離開這個項目的開發,最終導致項目擱淺。
1970年(Unix元年,時間戳) Unix誕生
當時在開發Multics項目的時候,實驗室中有一個開發成員開發了一款游戲(travel space:遨游太空),因為兩個實驗室相繼離開項目開發,導致這名開發人員沒法玩游戲,後來他提議組織人員重新在Multics項目之上重新的開發,也就出現了1970年的Unix。當時Unix操作系統是使用的彙編語言(機器語言)開發的。
1973年 用C語言重寫Unix
因為彙編語言有一個最大的局限性:對於電腦硬體過於依賴。導致移植性不好,所以後期在1973年使用了C語言對其進行重新開發。
1975年 Bell實驗室允許大學使用Unix。
1975年,bell實驗室允許大學使用Unix操作系統用於教學作用,而不允許用於商業用途。
2. Linux誕生
人物 Linus
Linux的開發作者,Linux之父,李納斯·托瓦茲。Linux誕生時是荷蘭在校大學生。
![](https://upload-images.jianshu.io/upload_images/16598307-bbcbb3caec9f726f.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/119/format/webp)
1991年 0.0.1版本
李納斯當時學校使用的就是Unix操作系統,然後其對系統的底層代碼進行了修改,放到了學校為學生開放的網站上,原先他把文件命名寫成了Linus’s Unix,後期網路管理髮現之後覺得這個名字不好,自己手動的將名字改成Linux。隨後其他同學下載之後發現這個版本還是挺好用的,隨後都把自己代碼貢獻給李納斯。
1992年 0.0.2版本
1994年 1.0版本
2003年 2.6版本
上述所提及的版本號並不是分支版本,而是指Linux的內核版本。
3. 開源文化
Linux是開源的操作系統。所謂開源就是指開放源代碼。
人 物 Stallman 斯特曼,開源文化的倡導人。
1983年 GNU計劃
1985年 FSF基金會
1990年 Emacs、GCC(c語言的編譯器)、程式庫
1991年 Stallman去找Linus,商談讓Linux加入其開源計劃(GNU計劃)
1992年 GNU/Linux
4. Linux系統特點
開放性(開源)、多用戶、多任務、良好的用戶界面、優異的性能與穩定性
多用戶多任務:
單用戶:一個用戶,在登錄電腦(操作系統),只能允許同時登錄一個用戶;
單任務:一個任務,允許用戶同時進行的操作任務數量;
多用戶:多個用戶,在登錄電腦(操作系統),允許同時登錄多個用戶進行操作;
多任務:多個任務,允許用戶同時進行多個操作任務;
Windows屬於:單用戶、多任務。
Linux屬於:多用戶、多任務。
5. Linux分支
分支:Linux分支有很多,現在比較有名的ubuntu、debian、centos(Community Enterprise Operating System)、redhat、suse等等。
二、Linux系統的安裝
1. 安裝方式
目前安裝操作系統方式有2種:真機安裝、虛擬機安裝。
真機安裝:使用真實的電腦進行安裝,像安裝windows操作系統一樣,真機安裝的結果就是替換掉當前的windows操作系統;
虛擬機安裝:通過一些特定的手段,來進行模擬安裝,並不會影響當前電腦的真實操作系統;
如果是學習或者測試使用,強烈建議使用虛擬機安裝方式。
2. 虛擬機軟體(瞭解)
什麼是虛擬機?
虛擬機,有些時候想模擬出一個真實的電腦環境,礙於使用真機安裝代價太大,因此而誕生的一款可以模擬操作系統運行的軟體。
虛擬機目前有2個比較有名的產品:vmware出品的vmware workstation、oracle 出品的virtual Box。
3. 虛擬機的安裝
3.1 VMware Workstation的安裝(本次教程使用)
①打開安裝程式
![](https://upload-images.jianshu.io/upload_images/16598307-fcc8413c06f8357f.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/449/format/webp)
②進行下一步開始安裝
![](https://upload-images.jianshu.io/upload_images/16598307-b8b70497242a416d.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/499/format/webp)
③同意許可協議
![](https://upload-images.jianshu.io/upload_images/16598307-ec8ba9f9828de355.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/499/format/webp)
④根據需要決定是否需要更改軟體的安裝位置
![](https://upload-images.jianshu.io/upload_images/16598307-061d3240c1ec0dd3.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/499/format/webp)
點擊下一步:
![](https://upload-images.jianshu.io/upload_images/16598307-a734e30eed92e405.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/499/format/webp)
⑤用戶體驗設置
![](https://upload-images.jianshu.io/upload_images/16598307-949e88ee6b112f59.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/499/format/webp)
⑥快捷方式創建的步驟
![](https://upload-images.jianshu.io/upload_images/16598307-2b511506b5842855.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/499/format/webp)
⑦點擊安裝按鈕
![](https://upload-images.jianshu.io/upload_images/16598307-d2f26c21033ea098.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/499/format/webp)
⑧點擊完成
![](https://upload-images.jianshu.io/upload_images/16598307-9cc56637400538e3.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/499/format/webp)
⑨最重要的地方,在安裝完之後需要檢查,檢查虛擬機軟體是否有安裝2個虛擬網卡!
![](https://upload-images.jianshu.io/upload_images/16598307-e4ff24ea06710247.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/529/format/webp)
溫馨提示:如果沒有這2個網卡的話,則會影響後期windows系統與虛擬機其中操作系統之間的相互通信(比如共用網路、文件傳輸等)。
3.2 Virtual Box的安裝
①運行安裝程式
![](https://upload-images.jianshu.io/upload_images/16598307-561c5c525358465c.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/286/format/webp)
②點擊下一步
![](https://upload-images.jianshu.io/upload_images/16598307-ff10aa6bce4e45a3.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/499/format/webp)
③選擇性更改安裝的位置
![](https://upload-images.jianshu.io/upload_images/16598307-6d0a14e73d903d23.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/499/format/webp)
④安裝的選項設置
![](https://upload-images.jianshu.io/upload_images/16598307-aeb93273921752be.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/499/format/webp)
⑤斷網警告,點擊是即可
![](https://upload-images.jianshu.io/upload_images/16598307-fd10efb2e036318d.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/499/format/webp)
點擊安裝按鈕
![](https://upload-images.jianshu.io/upload_images/16598307-5a257b19fa5400bc.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/499/format/webp)
⑥完成
![](https://upload-images.jianshu.io/upload_images/16598307-64fab6793facd305.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/499/format/webp)
⑦檢查是否有對應的虛擬網卡存在
![](https://upload-images.jianshu.io/upload_images/16598307-dfa4da5d131dcb95.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/269/format/webp)
兩個軟體安裝完成之後在桌面上都有對應的快捷方式
![](https://upload-images.jianshu.io/upload_images/16598307-05a39ed69e5072c0.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/184/format/webp)
4. Linux版本的選擇
版本選擇:CentOS 6.5 【鏡像一般都是xxx.iso文件】
問題:為什麼不選擇最新版的7.x版本?
6.x目前依然是主流
6.x的各種系統操作模式是基礎
7.x實際上也支持大多數6.x的操作形式
5. 新建虛擬機
5.1 使用VMware Workstation(重點)
①點擊“文件”菜單,選擇“新建虛擬機…”選項,選擇“自定義”點擊下一步
![](https://upload-images.jianshu.io/upload_images/16598307-4e3ff75e0d31386e.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/503/format/webp)
②選擇相容性,預設即可,直接下一步
![](https://upload-images.jianshu.io/upload_images/16598307-57eb0e61193ac5fd.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/503/format/webp)
③選擇鏡像文件的時候選擇“稍後….”,點擊下一步
![](https://upload-images.jianshu.io/upload_images/16598307-0f7971641d6ec8ca.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/503/format/webp)
④選擇需要安裝的操作系統
![](https://upload-images.jianshu.io/upload_images/16598307-45f90379a51da595.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/503/format/webp)
⑤選擇虛擬機的名稱(名稱將會後期出現在左側)和設置虛擬系統的安裝位置
![](https://upload-images.jianshu.io/upload_images/16598307-0339213312b277fa.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/554/format/webp)
⑥cpu設置
![](https://upload-images.jianshu.io/upload_images/16598307-b369d3f08c06f61a.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/503/format/webp)
⑦分配記憶體
![](https://upload-images.jianshu.io/upload_images/16598307-20b87dabbfdfaff0.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/503/format/webp)
⑧選擇網路類型,選擇nat即可
NAT:配置好之後windows即可和虛擬機進行互相通信,但是教室內的其他同學是訪問不了的,只能自己可以訪問虛擬機中的操作系統;
橋接:配置好之後其他同學也可以訪問你的虛擬機操作系統;
![](https://upload-images.jianshu.io/upload_images/16598307-b53e764a74eb1645.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/503/format/webp)
⑨後續預設的步驟,直接下一步
![](https://upload-images.jianshu.io/upload_images/16598307-54642a323ecf7e28.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/503/format/webp)
![](https://upload-images.jianshu.io/upload_images/16598307-2b9dfd7b7822802e.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/503/format/webp)
![](https://upload-images.jianshu.io/upload_images/16598307-21eaab2f18d4d255.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/503/format/webp)
![](https://upload-images.jianshu.io/upload_images/16598307-c41b2ea7e7c8d103.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/503/format/webp)
![](https://upload-images.jianshu.io/upload_images/16598307-4b922329b35163ef.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/503/format/webp)
⑩點擊完成
![](https://upload-images.jianshu.io/upload_images/16598307-cc18f85f5ede5d1a.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/503/format/webp)
5.2 使用Virtual Box(瞭解)
①點擊左上角的新建按鈕
![](https://upload-images.jianshu.io/upload_images/16598307-6bf99b1c890bc86f.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/446/format/webp)
②選擇操作系統,由於centos在列表中是沒有的,所以選擇centos對應的主線redhat 32位
![](https://upload-images.jianshu.io/upload_images/16598307-f0cd9b731f54ef9f.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/361/format/webp)
③選擇記憶體大小
![](https://upload-images.jianshu.io/upload_images/16598307-fe0f3fef613864d7.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/361/format/webp)
④創建磁碟,預設即可
⑤選擇磁碟類型,預設即可
![](https://upload-images.jianshu.io/upload_images/16598307-2d61a63e2c8d0c2e.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/401/format/webp)
⑥選擇磁碟大小的分配方式,方式為動態分配即可
![](https://upload-images.jianshu.io/upload_images/16598307-5dfa6a5523ac7d5a.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/371/format/webp)
⑦設置磁碟的位置和大小確認
![](https://upload-images.jianshu.io/upload_images/16598307-1e9fed035c1a6e3a.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/401/format/webp)
6. Linux操作系統安裝
6.1 VMware workstation進行安裝(重點)
a. 由於之前沒有指定iso鏡像文件,因此此處需要先指定系統鏡像文件
![](https://upload-images.jianshu.io/upload_images/16598307-23b6bba4032ec570.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/554/format/webp)
b. 運行此虛擬機
![](https://upload-images.jianshu.io/upload_images/16598307-1b846c078fbe4f82.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/302/format/webp)
註意:如果開機之後滑鼠點進去虛擬機出不來,則可以按下組合快捷鍵“ctrl+alt”。
如果啟動之後出現類似提示框(不是錯誤框)則勾選不再提示,並且確定即可:
![](https://upload-images.jianshu.io/upload_images/16598307-87014c1366453fab.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/422/format/webp)
如果在啟動時候出現下述錯誤,則說明電腦沒有開啟cpu的 虛擬化,如果需要開啟,則需要重啟電腦,並且在開啟的時候進入主板的BIOS設置開啟虛擬化,然後保存設置重啟電腦:
![](https://upload-images.jianshu.io/upload_images/16598307-7cd4c0267f1e0c97.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/379/format/webp)
c. 選擇升級/安裝已經存在的系統(通過↑/↓方向鍵)按下回車
![](https://upload-images.jianshu.io/upload_images/16598307-eaaaa156358835c9.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/497/format/webp)
d. 在檢測到光碟(disc)之後選擇跳過完整性檢測直接進行安裝
![](https://upload-images.jianshu.io/upload_images/16598307-ffeffdc2f6857081.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/382/format/webp)
隨後提示不支持的硬體,忽略直接下一步
![](https://upload-images.jianshu.io/upload_images/16598307-979b3318a9d23026.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/370/format/webp)
e. 點擊下一步
![](https://upload-images.jianshu.io/upload_images/16598307-29166b3d9f58dceb.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/237/format/webp)
f. 選擇在安裝過程中使用的語言
![](https://upload-images.jianshu.io/upload_images/16598307-53c12b51e38ebe3a.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/554/format/webp)
g. 選擇鍵盤類型,美國式英語
![](https://upload-images.jianshu.io/upload_images/16598307-910b12b390a0ac92.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/554/format/webp)
h. 選擇存儲設備類型
![](https://upload-images.jianshu.io/upload_images/16598307-e3bf1e1783d77150.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/554/format/webp)
i. 對磁碟進行空白盤的初始化操作,選擇“是,忽略所有的數據”
![](https://upload-images.jianshu.io/upload_images/16598307-fb735388d049aa09.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/554/format/webp)
j. 設置網卡自動連接,依次應用 – 關閉 – 下一步
![](https://upload-images.jianshu.io/upload_images/16598307-b1c4940c337e5704.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/554/format/webp)
k. 設置時區,預設亞洲/上海
![](https://upload-images.jianshu.io/upload_images/16598307-dff29989ccf7e193.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/554/format/webp)
l. 設置密碼,設置好了之後下一步
![](https://upload-images.jianshu.io/upload_images/16598307-4707ed0f36198055.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/554/format/webp)
m. 使用全部的磁碟空間來安裝Linux系統,點擊下一步
![](https://upload-images.jianshu.io/upload_images/16598307-8cee6060e8f8c163.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/554/format/webp)
![](https://upload-images.jianshu.io/upload_images/16598307-2b809773f02313ad.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/507/format/webp)
n. 選擇安裝的Linux類型
![](https://upload-images.jianshu.io/upload_images/16598307-19c3bf07af83e454.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/533/format/webp)
![](https://upload-images.jianshu.io/upload_images/16598307-e82fafb53a7343c7.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/554/format/webp)
o. 選擇開發 – 開發工具,前面覆選框√,點擊下一步
![](https://upload-images.jianshu.io/upload_images/16598307-a7b65288625319b8.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/554/format/webp)
p. 等待軟體包的安裝
![](https://upload-images.jianshu.io/upload_images/16598307-9843149f96f5d50f.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/554/format/webp)
等待完成,點擊重新引導
![](https://upload-images.jianshu.io/upload_images/16598307-77d8f16a10c77b0f.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/554/format/webp)
q. 重新引導之後點擊“前進”
![](https://upload-images.jianshu.io/upload_images/16598307-ccd98f61de394f6b.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/372/format/webp)
r. 在協議許可界面選擇同意,然後點擊前進
![](https://upload-images.jianshu.io/upload_images/16598307-1fa6f252203e2754.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/554/format/webp)
s. 創建普通用戶帳號(可選),然後點擊前進
![](https://upload-images.jianshu.io/upload_images/16598307-c35b788c72f0a3fc.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/554/format/webp)
t. 時間設置,設置好之後前進
![](https://upload-images.jianshu.io/upload_images/16598307-9d70b699d587492d.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/473/format/webp)
![](https://upload-images.jianshu.io/upload_images/16598307-49476ed8be79a971.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/378/format/webp)
u. 關於kdump,之後點擊完成
![](https://upload-images.jianshu.io/upload_images/16598307-16c64b9745f45427.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/554/format/webp)
v. 登錄界面
![](https://upload-images.jianshu.io/upload_images/16598307-162a4c24906076e1.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/472/format/webp)
如果需要使用非列出的用戶進行登錄則點擊其他,否則雙擊列出的用戶名即可,隨後輸入密碼。
w. 使用root帳號登錄之後的提示
![](https://upload-images.jianshu.io/upload_images/16598307-d824cb07c7abf4e0.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/494/format/webp)
x. 看到的桌面
![](https://upload-images.jianshu.io/upload_images/16598307-a6ed064b533ad8d7.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/554/format/webp)
6.2 使用virtual Box安裝Linux(瞭解)
a. 選擇需要安裝的系統鏡像
![](https://upload-images.jianshu.io/upload_images/16598307-c0adeb7fdae137c3.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/554/format/webp)
b. 啟動虛擬機
![](https://upload-images.jianshu.io/upload_images/16598307-ae49fc8724484264.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/367/format/webp)
註意:如果滑鼠在虛擬機中想退出到windows,則需要按下ctrl+alt組合鍵(空格右側的)
c. 後續全部操作按照上面6.1章節中的步驟繼續安裝即可。
7. 終端
問題:在目前的桌面系統中,如果需要關機可以通過“系統”“關機”進行關機,那麼後期伺服器都是命令行模式的,屆時這種方式將不好用,那會要怎麼關機呢?
![](https://upload-images.jianshu.io/upload_images/16598307-f7de51ece5d95dc0.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/554/format/webp)
答:可以通過命令行方式進行關機。命令的輸入需要在終端中進行輸入。
所謂終端,其實類似於windows下cmd命令行模式。在終端中可以輸入需要執行的一些指令,同樣可以通過終端進行關機(註意:以後在工作中很少會去使用關機命令,會使用重啟比較多)。
終端的形式:
![](https://upload-images.jianshu.io/upload_images/16598307-40f479fa8062eab9.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/545/format/webp)
終端組成部分:
![](https://upload-images.jianshu.io/upload_images/16598307-ff8c31e365e5309f.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/554/format/webp)
如何使用終端命令進行關機?
在Linux中關機命令 有以下幾個:shutdown -h now(正常關機)、halt(關閉記憶體)、init 0
8. 使用VMware備份操作系統
在vm中備份方式有2種:快照、克隆。
快照:又稱還原點,就是保存在拍快照時候的系統的狀態(包含了所有的內容),在後期的時候隨時可以恢復。【側重在於短期備份,需要頻繁備份的時候可以使用快照,做快照的時候虛擬的操作系統一般處於開啟狀態】
①在菜單“虛擬機”-“快照”-“拍攝快照”
![](https://upload-images.jianshu.io/upload_images/16598307-3e26715dfab6cd9e.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/384/format/webp)
輸入相關信息,點擊拍攝快照
②搞事情
![](https://upload-images.jianshu.io/upload_images/16598307-cac4f93cf44b33b5.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/543/format/webp)
③使用快照恢復搞事情之前的狀態
路徑:虛擬機 – 快照 – 快照管理器
![](https://upload-images.jianshu.io/upload_images/16598307-0a80ab162ab2e708.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/554/format/webp)
恢復好之後的狀態:
![](https://upload-images.jianshu.io/upload_images/16598307-f3cff6ffbcb0dae1.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/484/format/webp)
克隆:就是複製的意思。【側重長期備份,做克隆的時候是必須得關閉】
路徑:先關機 – 右鍵需要克隆的虛擬機 – 管理 – 克隆
![](https://upload-images.jianshu.io/upload_images/16598307-05c5cc1336f4fd36.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/514/format/webp)
![](https://upload-images.jianshu.io/upload_images/16598307-104f8172fecfcc56.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/514/format/webp)
![](https://upload-images.jianshu.io/upload_images/16598307-c7eb7c37721b1061.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/514/format/webp)
上述的名稱和位置與之前新建虛擬機的時候是一樣的含義。
等待克隆完成
![](https://upload-images.jianshu.io/upload_images/16598307-2ad8f665862f08a0.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/515/format/webp)
克隆好的伺服器相關密碼帳號等信息與被克隆的系統一致。
9. 系統語言改成中文簡體方法
(1)在root許可權下
切換到root下:su - root
查看當前語言環境:locale -a (註意中間有空格)
如果看到 zh_CN.UTF-8(這個是中文簡體)說明你的系統支持中文語言;
沒有的話,執行以下命令
yum install fonts-chinese.noarch
yum install m17n-db-common-cjk
yum install m17n-db-chinese 安裝上面的幾個語言包重啟就正常了
(2)編輯i18n配置文件: vi /etc/sysconfig/i18n
進行如下配置並保存退出:
#LANG="en_US.UTF-8"
LANG="zh_CN.UTF-8"
SYSFONT="latarcyrheb-sun16"
3、使用命令:shutdown -r now 立刻重啟(root用戶使用),重啟系統,即可成功修改!
三、Linux系統的文件
1. 文件與文件夾(目錄)
什麼是文件?
一般都是一個獨立的東西,可以通過一些特定的工具進行打開,並且其中不能在包含除了文字以外的東西。例如:
![](https://upload-images.jianshu.io/upload_images/16598307-f79bc1be43468e3f.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/417/format/webp)
什麼是文件夾?
可以在其中包含其他文件的東西。
![](https://upload-images.jianshu.io/upload_images/16598307-19d2323f898027fa.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/356/format/webp)
為什麼先講文件?
1:日常運維工作中,有近一半以上的工作內容 精力 其實都是對文件的操作。
2: Linux 本身也是一個基於文件形式表示的操作系統。
Linux一切皆文件。
①在windows是文件的,在Linux下同樣也是文件;
②在windows不是文件的,在Linux下也是以文件的形式存儲的;
日常學習中和日常工作中,對於文件的操作的都有哪些種類?
創建文件、編輯文件、保存文件、關閉文件、重命名文件、刪除文件、恢覆文件。
2. Linux系統的文件目錄結構
![](https://upload-images.jianshu.io/upload_images/16598307-6ceeb1891e481685.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/555/format/webp)
目錄結構:
Bin:全稱binary,含義是二進位。該目錄中存儲的都是一些二進位文件,文件都是可以被運行的。
Dev:該目錄中主要存放的是外接設備,例如盤、其他的光碟等。在其中的外接設備是不能直接被使用的,需要掛載(類似windows下的分配盤符)。
Etc:該目錄主要存儲一些配置文件。
Home:表示“家”,表示除了root用戶以外其他用戶的家目錄,類似於windows下的User/用戶目錄。