《《操作系统原理》实验2--实验项目:Linux Shell用户接口.docx》由会员分享,可在线阅读,更多相关《《操作系统原理》实验2--实验项目:Linux Shell用户接口.docx(6页珍藏版)》请在优知文库上搜索。
1、操作系统原理实验报告实验序号:2实验项目:LinUXShelI用户接口学号姓名专业、班级实验地点指导教师实验时间一、实验目的及要求通过本实验的学习,掌握LinuxShell的使用方法。二、实验设备(环境)及要求Windows7操作系统,VMware软件,Ubuntu虚拟机。三、实验内容与步骤1.根据课本附录D使用并熟悉常用LinUX系统命令A.文件操作命令JOnZubuntu:-jonzubuntu:$ISVideosDesktopDownloadsMusicPublicDocumentsexamples.desktopPicturesTemplatesType=Ltnk Name=Examp
2、les Nameaa=Ceelallo Nameace=ContohjonziJbUntu:5catexamples.desktopDesktopEntryVerston=I.0Is和cat命令JonZJbUntu:jonzubuntu:-$moreexamples.desktopDesktopEntryVerston=I.Type=LinkName=ExamplesNamesqj=b11emDujNanesr=11pwMepnNamesv=ExempelNameswl=Mifaomore命令CC、文件(F)编辑(E)杏看(V)搜索(三)终施(T)帮助(三)jonzubuntu:$fileex
3、amples.desktopexamples.desktop:UTF-8UnicodetextjonziJbUntl5head-3examples.desktopDesktopEntryVerston=I.Type=Linkjonzeubuntu:-$tail-3examples.desktopIcon=folderX-UbUntU-GetteXt-Donatn=example-contentfileheadtail命令IJonzQMibuntu:ESf.4)00:09XJonzJonZUbUntU:$prexamples.desktop2l5-69-0722:52examples.deskt
4、op第1页p命令文件(F)编辑(E)杳看(V)搜索(三)终端Cn帮助(三)BS11创)00:14Ucjonzubuntu:$cpexamples.desktopeamples2.desktopjonzubuntu:$ISDesktopDownloadsexamples.desktopPicturesTemplatesDocumentseamples2.desktopMusicPublicVideosjonzubuntu:$vexamples.desktopemples3.desktopjonzbuntu:IsDesktopDownloadseanples3.desktopPicturesTem
5、platesDocumentseamples2.desktopMusicPublicVideos4jonzubuntu:$rneaples3.desktopjonzUbUntUIsIDesktopDownloadsMusicPublicVideosDocumentsexanples2.desktopPicturesTemplatescpmvrm命令CQ文件(F)编辑(E)查看(V)搜索终端(T)帮助(三)jonzubuntu:$IS-Itest.txt-w-w-1jonzjonz9月1500:17test.txtjonz0ubuntu:$chmod777test.txtjonzubuntu:-
6、$IS-1test.txt-wxwxwx1jonzjonz9月1500:17test.txtjjonzubuntu:$chowTomtest.txtchown:无效的用户:Tomchmodchownee文件(F)编辑(E)查看(V)搜索(三)终端(T)帮助(三)jonzubuntu:-$touchtest.txtjonzubuntu:-$cmptest.txtexamples?.desktopCPip:test.txt已结束jonziJbUntUcmp-Itest.txtexamples2.desktopCmP:test.txt已结束CmP命令jonz)ubutu:jonziJbUntu:Sw
7、cexamples?.desktop2275398445examples2.desktopwc命令B.目录操作joz0ubunt:/CProgram$pwd/home/jonzCPioqampwd命令joz0ubntu:/CProgram$Isea3exan3.cexam3.c-she112.shshell3.shjonzubuntu:/CProgram$mkdtrtestjonz0ubutu:/CProgram$Isea3exam3.cexam3.c-she112.shsheaL13.shtestmkdir命令joz0ubutu:-/CProgramSCdtest/jonzQubuntCPr
8、ogratest5cd命令jonz0ubuntu:/CProgram$rm-rtest/jonzubuntu:*/CProgram$Isexan3exam3.cexam3.c-she112.shshell3.shrm命令C.信息显示jonzubuntu:/CProgram$echoHelloWorld!HelloWorld!jonzubuntu:/CProgram$echo命令jonzubuntu:/CProgram$whoguest-2p96BWtty7215-9-1423:08jonztty8215-9-1423:08jonzpts2015-12-1423:21(:1)who命令jonzu
9、buntu:/CProgram$whichpsbipswhich命令IjOnZJbUntu:/CPogam$date2915年12月14日星期一23:27:36PST-7Jonzgubuntu:/CProgran$PIDTTYTIME8379pts00:00:008499pts00:00:00timepsCMDbashPSreal0m.20suser0m0.04ssysm0.12stime命令jonz0ubuntu:*/CProgramShostid7f101hostid命令jonz0ubuntu:/CProgram$df文件系统1K块已用可用已用%挂载点devsdal194782043223
10、8461524188418%/udev5314453136IXdevtmpfs1025248117241%/runnone5125120%runlocknone5126228512341%/run/shnnone51262112511681%八叩/guest-2p96BW“Cdf命令D.进程命令jonz0ubuntu:-/CProgramSpsPIDTTYTIMECMD8379pts00:00:00bash8513pts/eee:ee:eePePS命令jonz0ubuntu:-/CProgramSkill8513bash:kill:(8513)-没有那个进程kill命令四、分析与讨论这些都是比较常用的命令,应该熟记方便日后的使用。五、教师评语成绩签名:日期: