

下載本文檔
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡介
1、精品文檔燕山大學(xué)Linux技術(shù)上機(jī)實(shí)驗(yàn)指導(dǎo)精品文檔實(shí)驗(yàn)一 Linux 系統(tǒng)安裝與簡單配置一、實(shí)驗(yàn)?zāi)康? 掌握 Linux 系統(tǒng)安裝的分區(qū)準(zhǔn)備。2. 掌握 Linux 系統(tǒng)的安裝步驟。3. 掌握 Linux 系統(tǒng)分區(qū)的掛載和卸載。4. 掌握 Linux 系統(tǒng)的啟動(dòng)和關(guān)閉操作。二、實(shí)驗(yàn)內(nèi)容1 安裝 VMware 虛擬機(jī),設(shè)置光盤驅(qū)動(dòng)器,為 Linux 系統(tǒng)安裝做準(zhǔn)備。2. 在虛擬機(jī)下安裝 Linux 操作系統(tǒng)(如 Ubuntu 桌面版本)。3. 配置 Linux 系統(tǒng)運(yùn)行環(huán)境。4. 禾 I用空閑分區(qū)創(chuàng)建新的 Li nux 系統(tǒng)分區(qū)。5. 將新的 Linux 系統(tǒng)分區(qū)掛載到系統(tǒng)中;卸載新掛載的分區(qū),
2、重新掛載到 目錄樹中的其他位置。三、主要的實(shí)驗(yàn)步驟1. 制定安裝系統(tǒng)的分區(qū)計(jì)劃。2. 配置光驅(qū)引導(dǎo)鏡像文件 iso,啟動(dòng)系統(tǒng),開始安裝過程。3. 根據(jù)安裝計(jì)劃,對磁盤空間進(jìn)行分區(qū)設(shè)置。4. 根據(jù)系統(tǒng)安裝指導(dǎo),完成 Linux 系統(tǒng)的安裝過程。5.安裝成功后,退出系統(tǒng),重新啟動(dòng)虛擬機(jī),登陸Linux 操作系統(tǒng)。6. 對 Linux 系統(tǒng)進(jìn)行配置,如網(wǎng)絡(luò)設(shè)備等。7. 利用磁盤使用工具和 mount, 將新創(chuàng)建的 Linux 系統(tǒng)分區(qū)掛載到系統(tǒng)中。將新掛載的分區(qū)卸載,并重新掛載到目錄樹的其他位置。精品文檔實(shí)驗(yàn)二 Linux 常用命令使用一、實(shí)驗(yàn)?zāi)康? 掌握 Linux 般命令格式。2. 掌握有關(guān)文件
3、和目錄操作的常用命令。3. 熟練使用 man 命令。二、實(shí)驗(yàn)內(nèi)容1. 熟悉 cd、date、pwd、cal、who、echo、clear、passwd 等常用命令。2. 在用戶主目錄下對文件進(jìn)行操作:復(fù)制一個(gè)文件、顯示文件內(nèi)容、查 找指定內(nèi)容、排序、文件比較、文件刪除等。3. 對目錄進(jìn)行管理:創(chuàng)建和刪除子目錄、改變和顯示工作目錄、列出和 更改文件權(quán)限、鏈接文件等。4. 利用 man 命令顯示 date、echo 等命令的手冊頁。5. 顯示系統(tǒng)中的進(jìn)程信息。三、主要實(shí)驗(yàn)步驟1.登陸進(jìn)入系統(tǒng),修改個(gè)人密碼。helmetgubuntupasswdChanging password for helme
4、t, (current) UNIX password: Enter new UNIXpassword:Retype new UNIX password: passwd: password updated successfullyheLnetubuntu:|2.使用簡單命令:date、cal、who、echo、clear 等,了解 Linux 命令格式。Date:helnetubuntu:*$ datekJed Jul 1 05:36:35 PDT 2015精品文檔Cal: av_. u 7 7 S _ov -helmetubuntu:$ cal July 2015Su Mo Tu NeTh F
5、r Sa2345678 910 1112 13 14 15 16 17 1819 20 21 22 23 24 2526 27 28 29 30 31helmetubuntu:-helmetgubuntu:cal 1616An uayFebruaryMarchSu Mo Tu VJe Th Fr Sa SuMo Tu rie ThFr SaSu Mo Tu UeTh Fr Sa12341123 456756739 10 1123斗567889 10 1112 13 1412 13 14 15 16 17 18910 11 1213 141515 16 17 1819 20 2119 26 21
6、 22 23 24 251617 18 19 29 212222 23 24 2526 27 2826 27 28 29 39 312324 252627282929 39 31AprilMayJuneSu Mo Tu Ne Th Fr Sa SuMo Tu We ThFr SaSu Mo Tu NeTh Fr Sa12341212 345656789 10 113456789789 1011 12 1312 13 14 15 16 17 181011 12 1314 151614 15 16 1718 19 2019 20 21 22 23 24 251718 19 2021 222321
7、22 23 2425 26 2726 27 28 29 302425 26 2728 293028 29 30PlJulyAugustSeptembersu Ho Tu we Th Fr 5a Su MoTuWe Th Fr SaSu MO TU k/e Th FrSa12341123 A556789 ID 1123斗S6786789 ID 111Z12 13 14 15 16 17 189 111 1213 14 1513 1415 16 17 IS1919 20 21 22 23 24 2516 1718 1920 21 2220 2122 23 2A 252626 27 2& 2
8、9 30 3123 2425 26 272S 2927 2829 303B 31OctoberNovemberDecemberSu Mo Tu Me Th Fr Sd Su HoTUMeTh Fr SaSu Mo Tu We Th FrSa123123456712345456?89 1389 10 11 1213 146789 10 111211 12 13 14 35 16 1715 1617 IS19 20 2113 1415 ie 17 181918 19 20 21 22 23 2理Z2 2324 2S26 27 2820 2122 2!3 24 252625 26 27 28 29
9、30 3129 30272829 30 31精品文檔2015-07-012015-07-01an i2015-07-0101:38 (:e)01:45 (:0)QI:45 (:e)Echo:helmetgubuntuecho This is acommand.This is aconmand,helmet(3ubuntu :$ echo This Is acommand *This is a command.Clear:令廠helmetubuntu: “ helnetubuintu:-$ |3.瀏覽文件系統(tǒng)(1) 運(yùn)行 pwd 命令,確定當(dāng)前工作目錄helme: $ pwdl/home/hel
10、net(2) 運(yùn)行 Is -命令,理解各字段含義Who、who am i:helnet(3ubuntu;-$ whohelmet :0 helnet pts/1helnetubuntu;-$ who helnetpts/1精品文檔(3) 運(yùn)行 Is -ai 命令,理解各字段含義drwxxr-x2helnethelnet4696Juldrwxr-xr-x2helnethelmet4G96Juldrwxr*xr-x2helmethelnet4696Jul-rw-rw1helmethelmet16Jul*rw-rw1helmethelnet9Jul1helmethelmet89S0Jul-rw-rw
11、八1helmethelmet3Jul-rw-rw 1helmethelnet6565Jul-rw-rw-r -1helmethelnet54Jul-rw-rw-r-1helmethelnetS4Jul-rwxrwxr-x1helnethelmet7293Juldrwxr -xr-x2helmet helnet4696Juldrwxr -xr-x2helmet helmet4G96uldrwxr-xr-x2helmet helmet4096Juldrwxr -xrx2helnethelmet4096Juldrwxr -xr-x2helmet helmet4696Julhelmet|ubuntu:
12、-$ is -Itotal 721 01::38 Desktop1. QI;;38 Documents1 01::38 Downloads1 02::49 example.c1 02;49EX白nple.c-1 00;58 examples,desktop1 01:file-1 02:37 fxlelO1 02:file.c1 02:301 02;;32 file.out1 01::38 Music1 01:138 Pictures1 01:;38 Public1. QI:;38 Templates1 01::38 Videos精品文檔h亡li*ietubuntu:Is “at15169315
13、3291 examples395103 .local131373 153289 example.c395071 Hustc153281 .bash,history151975 examples+desktop395072 Pictures1S1974 .bashlaqout153Z83 file-151972 * profile151973Tbashrc153287fileio395069Public395877 cache153290.fitelO.153284.swp395374 .config15328BftlCpC39S068Templates395566 Desktop1532B5
14、ftle.c-395073 Videos153278 .dnrc153286 file.cut153279 authority395070 Documents395990,gconf153280 .xsesslon-errors39S067 Downloads153282 .ICEauthortty(4) 使用 cd 命令,將工作目錄改到根(/ )上。運(yùn)行 Is -命令,結(jié)合教材 中圖2.2, 了解各個(gè)目錄的作用。精品文檔helmtiubuntu: / helmetuburtij:cd /helnetubuntu:/$ Is -Itotal 9Zdrwxr-xrK2 rootr oot4696
15、 Jul1 01:13bindrwxr-xrX3root root4096JU1191:17bootdrwxrwxr耳2root root4096 Jul1 00:56cdropidrwxr-xrX15 rootroot4186 Jul1 91:15devdrwxr-xrX129rootroot122SSJul195 I 33etcdrj( (r-xr耳3root root4096 Jul1eo:sahomeIrwxrwxrwx1root root33Jul1 01:12inttrd.tng - boQt/Vnitrd.ing-3*13.0-24-genericdrwx冀X23 rootroo
16、t4Q96 Jul1 01:13libdrwx 2 rootroot10384Jul1 00:43lost+founddrwxr-xrX3 rootroot4696 Apr162014 medtadrxr-xrX3 rootroot4096JU1101:16 Rfttdrwxr-xrX2 rootroot4096 Jul1 01:17optdr-xr-xrX201rootroat&Jul1 01:15procdrwx-2 rootroot4096 Apr162S14 rootdrwxr-xrX23 rootroot829Jul1 1:38rundrwxr-xrX2 rootroot12
17、28B Jul1 01:16sbtndrwxr-xrX2 rootr oot4096 Apr162614 srvdr-xr-xrX13rootrootaj( (jl1SI: 15客y雪drwxrwxrwt10root root4096 Jul1 04:17SRdrwxr-xrX10 rootroot4096 Apr162014 usrdrwxrwxrwtis root root09& Jul1 04:17S33drwxr-xr-x19 root rootApr 162914 usrdrwxr-xr-x13 root rootApr 162314 vartrwxrwxrwx1 root
18、root30I1 01:12vnlinuz - boot/vRltnuz-313,8-24-gneric(5) 直接使用 cd,通過 pwd 指令驗(yàn)證目錄位置。helmetgubuntu:pwd/helmetubuntu:/$ cd helfnetgubuntu pwd /hone/helmet用 mkdir 建立一個(gè)子目錄 subdir。helnet電ubuntu:$ mkdir /home/helmet/subdir精品文檔將工作目錄更改到 subdirhelmetubuntucd /hone/helmet/subdir helmetgubuntu: -/subdiir$ |4.文件操作:
19、(1)驗(yàn)證當(dāng)前工作目錄在 subdir。elmetubuntu:-/subdir$ pwd home/helmet/subdir運(yùn)行 datefile1,然后運(yùn)行 cat filel,看到什么信息?helmetubuntu:/subdtr$ datefilel helmetubuntu:/subdir$匚mt filel WedJul 1 05:56:14 PDT 2615運(yùn)行 cat subdir,會(huì)出現(xiàn)什么結(jié)果?為什么?helmetgubuntu:-/subdirS cat subdir cat: subdir: No such file or directoy利用 man 命令顯示 da
20、te 命令的使用說明DATE1)User CommandsDATE(l)NAMEdate - print or set the system date and timeSYNOPSISdate QEUflH+FORMAT!date-u I utu I、-unWer百allMHDDhhEnl丄wjjDESCRIPTIONDisplay the current tine tn the given FORnAT or set the system datE.Mandatory argunents to Long options are Mandatory for short options too-
21、d, -rfate=STRINGdisplay tine described by STRING, not1nowf-f, file=DATEFILEHike - -date once for each line of DATEFILEhelflnetubuntu: -/subdlr精品文檔-ItTIHESPEC, -1.SO&60ir=TIME5PECl_ output (Jate/tlE亡in iso 831 Format. TIME5PEC=Tdate for dateManual page date(l) line 1 (pess h for help or q to quit
22、)運(yùn)行 man datefile1,看到什么信息?運(yùn)行 cat filel,看到什么信息?精品文檔helmetubuntui/ubdtr$ nanhelf*ietubuntu:/ubti1.r$ cat ftlelwed Ml 1 05:56:14 PDT Z615DATE(l)User ConnardsDATE(l)NAMEdate - print or set the system date and tine5VN0PSISdate OPTION,., +FORMAT date u|-utc|-universal MMDDhhnnccY-ssDESCRIPTIONDisplay the c
23、urrent tine in the given FORMATpar set the system date.Nandatory argunents to long options are mandatary for short optIons too,-4 - date=STRINC display time descr-ibed by STRING not1now1f, fiU=DATEFrLE利用 Is -filel,了解鏈接計(jì)數(shù)是多少?運(yùn)行 In filel ./fa,再看看鏈接計(jì)數(shù)有什么變化?用 cat 命令顯示 fa 文件內(nèi)容顯示 filel 的當(dāng)前 10 行,后 19 行helm
24、etgubuntu:/subdir$ head filelWed 3ul 1 S5:56:14 PDT 2S15OATE(Iuser commandsDATE(1)NAMEdte - print or set thw syst亡 edmt它 日nd tineSVNOPsrsdate OPTION. +FORMAThelnetubuntu:/subdir$Is-rw-rw-r-1helmethelmethelmetubuintu:/subdtr$Inhelmetubuntu:/subdtr$Is-rw-rw-r- 2 helmet helmet-1 filel6594 Jul 1 05:59 f
25、tlel filel /f日-X fUel6594 Jul 1 05:59 filel精品文檔helmetubuntu r/subdir$ tai_l -n 19 filelCOPVRICHTCopyright 2013 Free Software FoundationIrc+Ltcense GPLv3+: GNU GPL version 2 or later/llcenses/gpl.This free software: you areto change and redistribute lt There is NO WARRANTY, to the extent
26、 pernttted by law.SEE ALSOrhe hill docunentattcfi date 1$ matntatned a Texinfo nmual, If the tnfa and date prograns areproperly installed mt yaur sitej the commandinfo coreutilspdat& invocationrshould give you access to the complete nanual.(8) 運(yùn)行 cp filel file2,然后 Is -,看到什么信息?運(yùn)行 mvfile2 file3,然后
27、 ls -,看到什么信息?運(yùn)行 cat f*,結(jié)果如何?helhetubuntu:/subdtr$ cp helnetgubuntu:-/subdirS Is total 16-rhi-riw-r- 2 helnet helnethelmetuburtu:-/ubdtr$ cat f* wed JU1 1 05:56:14 PDT 015NAMEdate - print or set the system dmte and timeSYNOPSISdate OPTION. -hFORMATCOPYRIGHTCopyright 2013 Free Software FoundationpInc*
28、 License CPLv3+: GNJGPL version 3 or later dir$ man Is|noreLS(1)user connandsL5(l)NAMEIs - list directory contentsSYNOPSISIs OPTION. FILE.,.1 05:59 filel精品文檔DESCRIPTIONList infornattor ebout theFILES(the current directory by default)- Sort entries alphabetically if noneof -cftuvSUX nor -sort is spec
29、ified.Mandatory arguments to long options are nandatory for short options tOQ-3ra LIdo not Ignore entries starting with .-A, -alnost-alldo not ll呂t implieci * and - *helnetgiibuntu:-/subdirS cat ftlel |head *261 tee filesWed Jul 1 05:56:14 POT 2615DATE(l)User ConnandsDArE(l)NAMEdate - print or set t
30、he system date nd tineSVNQPSISdate OPTION. +FORMATdate -u | - -utc | - - unwersal MMDDhhnnCCY . ssj DESCRIPTIONDisplay the current tine in the given FORMAT(or set the system date.Mandatory argunents to lang options are mandatory for short options tg*d, -date=STRlNGdisplay tine tjescribed by STRING n
31、ot now1精品文檔elmetQubuntu:-/subdtr$ cat ftle5|wc2062537實(shí)驗(yàn)三 vi 編輯器的使用一、 實(shí)驗(yàn)?zāi)康? 學(xué)習(xí)使用 vi 編輯器建立、編輯、顯示及加工處理文本文件二、 實(shí)驗(yàn)內(nèi)容1 進(jìn)入和推出 vi 編輯器。2利用文本插入方式建立一個(gè)文件。3.在新建的文本文件上移動(dòng)光標(biāo)位置。4對該文件執(zhí)行刪除、復(fù)原、修改、替換等操作。三、 主要實(shí)驗(yàn)步驟1.進(jìn)入 vi 編輯器。heLmetubuntu:-Ivln - vi Improvedverston 7,4.S2by Bran Moolenaar et al,Hcdtfted by pkg-vtn-maintatn
32、Vin is open source吞nd freely distributableBeeone a registered Vtn user!type:helpregister EforInfornattcntype;qto exittype:help -or -1 foron-line helptype:helpver$ton7forversion InfoRunning in Vi compatible nodetype:et noep En -forvim defaultstype:helpcp-defaultFfortnfo file
33、lO,然后 vi filelO。使用 x, dd 等命令刪除某些文本行。使用 u 命令復(fù)原此前的情況。使用 c、r、s 等命令修改文本內(nèi)容。 使用檢索命令進(jìn)行給定模式的檢索。弊念helmetubuntu: * helmetubuntu:*$ nan date filelOhelmetubuntu:vt filelOX:片-hclmetubuntu:BTE(I)user commandsDATENAMEdate - print or呂曇t th芒systEE date殆nd tineSVNOPSISdate OPTION. +FOftMATdate -u| -utc|-universal HMO
34、DhhmfccY.ssDESCRIPTIONDisplay the current tine in the given FORMAT, or set the system date.Handatoy argunents to long opttens are nandatory for short options too.dd:*helmt)ubuntu: -NAMEdate - print or set the systen dte殆nd tineSYNOPSIS精品文檔dateOPTION+FORMATdate -u|-utc|-universal MMDDhhnnCCVY*SSDESCR
35、IPTIONDisplay the current tine in the given FORMAT, or set the systen date.Mandatory arguments to long options are nandatory for short options too.-d, -date=STRlNGdisplay tine described by STRING, not1nowhu:亠helmetfubuntuz0TE(1)User CamendsDATE(l)NAMEdate - print or set the system date and timeSYNOP
36、SISdate OPTION.+FORMATdate -u|-utc|-Universal MMDDhhmmLtCCYY*ssDESCRIPTIONDisplay the current time In the given FORMAT, or set the systen date.Mendatcry arguments to long options are mandatory for short options too.-dF-date=5TRiNGC:精品文檔NAMEdate - print or set the system date and ttmeSYNOPSISdate OPT
37、ION,., +FQRMATdate -u|-utc|-universal MHDDhhFfflCCCY*SSDESCRIPTIONDisplay the current ttne tn the given FORMAT, or set the systen dateMandatory argunents to long options are nandatory for short options too.helmetutuntu: -精品文檔IMAMEdateSYNOPSISdatedate-print or set the system date and timeOPTION .卡FOR
38、MAT-u|-utc|-unlw電wal MMDDhhmmfCCY,ssDESCRIPTIONDisplay the current time tn the given FORMATor set the systeR:C * helmtubuntu: *BATEUser CcmnandsDATENAMEdate - print or set the system date and tineSYNOPSISdate OPTION*. +FORMATdate -u|-utc|-universal MrtDDhhmnCCVV.ssDESCRIPTIONDtspXy the current time
39、in the givenFORMATPor set the system datc+S:helmetlubuntu;精品文檔E 密helmetUbuntu:*1)Uer ConnandDATENAMEdatE - prtnt or set the systEE datE and tineSYNOPSISdate OPTION.h+IFORMATdate -u|-utc|-universal MMDOhhnmCCY*ss檢索:Jser comafidsNAMEate - print or set the system gate and ttpneSYNOPSIS實(shí)驗(yàn)四 shell 編程一、實(shí)驗(yàn)?zāi)康? 了解 shell 的作用和主要分類2. 掌握 bash 的建立和執(zhí)行方式3. 掌握 bash 的基本語法。4. 學(xué)會(huì)編寫 shell 腳本。二、實(shí)驗(yàn)內(nèi)容1. shell 腳本的建立和執(zhí)行。2. shell 變量和位置參數(shù)、環(huán)境變量。3. bash 的特殊字符。4. 一般控制結(jié)構(gòu)。5. 算術(shù)運(yùn)算及 bash 函數(shù)。DATEhelmetubuntu: 精品文檔三、主要實(shí)驗(yàn)步驟1.利用 vi 建立一個(gè)腳本文件,其中包括 date、cal、pwd、ls 等常用命
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 私車質(zhì)押貸款合同
- 個(gè)人英語介紹課件
- 兩委換屆課件
- 實(shí)習(xí)人員聘用合同
- 專屬介紹對象課件
- 【課件】實(shí)驗(yàn):探究加速度與力、質(zhì)量的關(guān)系+課件+-2024-2025學(xué)年高一上學(xué)期物理人教版(2019)必修第一冊
- 肇慶市實(shí)驗(yàn)中學(xué)高三上學(xué)期語文高效課堂教學(xué)設(shè)計(jì):成語教案二
- 宿遷澤達(dá)職業(yè)技術(shù)學(xué)院《中國史學(xué)史(下)》2023-2024學(xué)年第二學(xué)期期末試卷
- 新疆師大附中2025年初三期末試題含解析
- 云貴川高中2024-2025學(xué)年高考生物試題原創(chuàng)模擬卷(四)含解析
- 高級(jí)財(cái)務(wù)管理完整版課件
- 怎樣學(xué)習(xí)初中物理
- DB62∕T 25-3111-2016 建筑基坑工程技術(shù)規(guī)程
- 大班音樂《水果百變秀》課件
- 婦幼保健院醫(yī)療保健服務(wù)轉(zhuǎn)介工作制度和流程
- 國家職業(yè)技能鑒定考評員考試題庫1100題【含答案】
- 監(jiān)察機(jī)關(guān)執(zhí)法工作規(guī)定學(xué)習(xí)測試
- 產(chǎn)品鑒定試驗(yàn)大綱
- 2022職業(yè)病防治法宣傳周PPT
- 常州市武進(jìn)區(qū)征地拆遷房屋裝修及附屬設(shè)施補(bǔ)償標(biāo)準(zhǔn)
- 民辦教師人員花名冊
評論
0/150
提交評論