




已阅读5页,还剩35页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
Start To Play ,Open Your VM (Of Cause!),First Step is?,Then,Wait, if we already have a server,You can use different toolsPuttyVNC,Putty,Normally, we can use this tool,VNC,How about we already have the desktop, can we use that?,Example: VNC Viewer,Easy way ,Example: VNC Sever Configuration,But, before we can use this tool, we need to configure our server.,Installyuminstalltigervnc-serverStart and set password: vncserver:1 Configure: vim/etc/sysconfig/vncserversAdd a line VNCSERVERS=1:root“Restart the VNC serverservice vncserver restartIf we want the SVN server starts automaticallychkconfig vncserver on,Play With Linux ,cd, ls Were already mentioned,Navigate,Normally, we have to use command line,I dont want to re-type the same word,Try to use history:history!lineNumCtrl + R,What if my command typing is wrong ?,Command line editingIn this case, you need command line editingMovingCtrl-a Move cursor to the beginning of the line.Ctrl-e Move cursor to the end of the line.Ctrl-f Move cursor forward one character; same as the right arrow key.Ctrl-b Move cursor backward one character; same as the left arrow key.Alt-f Move cursor forward one word.Alt-b Move cursor backward one word.Ctrl-l Clear the screen and move the cursor to the top left corner. The clear command does the same thing.,Command line editingEditingCtrl-d Delete the character at the cursor locationCtrl-t Transpose(exchange)the character at the cursor location with the one preceding it.Alt-t Transpose the word at the cursor location with the one preceding it.Alt-l Convert the characters from the cursor location to the end of the word to lowercase.Alt-u Convert the characters from the cursor location to the end of the word to uppercase.,What if my command typing is wrong (Con.) ?,Command line editingCut And PasteCtrl-k Kill text from the cursor location to the end of line.Ctrl-u Kill text from the cursor location to the beginning of the line.Alt-d Kill text from the cursor location to the end of the current word.Alt-Backspace Kill text from the cursor location to the beginning of the word. If the cursor is at the beginning of a word, kill the previous word.Ctrl-y Paste the text at the cursor location.,What if my command typing is wrong (Con.) ?,Command: ls, cd sh startStore.sh, ./startStore.sh,Execute command / script,Normally, it is the easiest part,But, some exceptions are also exist ,Exceptions You May Meet,Env variables issueSet the required environment variablesFormat issuedos2unixCommand not foundInstall the required softwaresAccess rightsu, sudo, chown, chgrp, chmod,How To Install The Required Softwares (1),Almost all software for a Linux system can be found on the Internet. How will them be provided:Most of them are package filesRest of them are source code,How To Install The Required Softwares (2),Most distributions belong to one of two camps of packaging technologiesThe Debian “.deb” campDebian, Ubuntu, Xandros, LinspireThe Red Hat “.rpm” campFedora, CentOS, Red Hat Enterprise Linux, OpenSUSE, Mandriva, PCLinuxOS,How To Manage The Required Softwares On Debian,Through repository:apt-get install package_nameapt-get remove package_nameThrough package:dpkg -install package_fileapt-get remove package_name,How To Manage The Required Softwares On Red Hat,Through repository:yum install package_nameyum erase package_nameThrough package:rpm -i package_fileyum erase package_name,How To Install The Required Softwares From Source Code,Dowload: wgetftpUnpackedtar xzf diction-1.11.tar.gzBuild./configmake install,Got Errors ?,Check log: VI, cat, lessPipeSearch,Now, I can execute the scripts, but I got errors after I execute them,VI Introduction,Start - vi filenameQuit - :q! / wqCommand mode VS Input modeInitially, Command modeFrom Command mode to Input mode - Type “i”From Input mode to Command mode Type “Esc”,Move Cursor In VI,numberGTo line number. For example, 1G moves to the first line of the file.GTo the last line of the file.Ctrl-f or Page Down Down one page.Ctrl-b or Page Up Up one page.0 (zero)To the beginning of the current line$To the end of the current line.,Basic Editing In VI,aEnter Input mode and move cursor beyond the current location of cursor.A Enter Input mode and move cursor beyond the end of the line.oEnter Input mode and open a line below the current line.OEnter Input mode and pen a line above the current line.,Deleting In VI,ddDelete the current line. 5dd The current line and the next 4 lines.dG From the current line to the end of the file.d$ From the cursor position to the end of the current line.d0 From the cursor position to the beginning of the current line.uUndo,Cutting, Copying And Pasting In VI,dThe d command will be used as both delete and cut.p/PTo copy the text after/before the cursor.yyCopy the current line.5yyCopy the current line and the next 4 lines.ySCopy from the current cursor to the end of line.y0Copy from the current cursor to the begin of the line.yG Copy from the current cursor to the end of the file.JContact the lines below to the current line.,Finding And Replacing In VI,fFind character in one line. Type semicolon to repeat./Find in the whole file. Type “n” to repeat.:%s/Line/line/gReplace. % is a shortcut meaning from the first line to the last line. Alternately, the range could have been specified 1, 5.s Specifies the operation. In this case, substitution (search and replace)g means “global”, if omitted, only the first instance of the search string on each line is replaced,Common Search Methods,locateIt look up path in database. updatedb To update the database for locate.find Find files base on different conditions.,I/O Redirect,The result of commands: stdoutStatus and error messages: stderrThe default output is connect to screenThe inputs are from the standard input: stdinThe default input is connect to the keyboardI/O Redirect allows us to change the direction of outputs and inputs,STDOUT Redirect,Operator “”Examplesls -l /usr/bin ls-output.txt test.txt Empty the file or create a new file.echo “sh startStorefront.sh” startStore.sh3. Operator “” Append content instead of empty the content.,STDERR Redirect,A program can produce output on any of several numbered file streams. We have referred to the first three of these file streams as standard input, output and error, the shell references them internally as file descriptors zero, one and two, respectively.Examplels -l /bin/usr 2 ls-error.txtRedirect the second file stream which refers to the stderror to the file.,Get Together,ls -l /bin/usr ls-output.txt 2&1There are two redirect:Redirect output to ls-output.txtRedirect STDERR to STDOUTNewer way for this task: ls -l /bin/usr & ls-output.txtRedirect STDERR and STDOUT to the ls-output.txt through “&”,If we can output both STDOUT and STDERR into the same file,Exception,ls -l /bin/usr 2 /dev/null/dev/nullThis file is a system device called a bit bucket which accepts input and does nothing with it.,If we write a script, and the there are too many log which we want to ignore,STDIN Redirect,catcat movie.mpeg.0* movie.mpegConcact filescat lazy_dog.txtCreate new file through the STDIN“”cat lazy_dog.txtRead content from file and output to screen,Pipelines,Operator “|” The standard output of one command can be piped into the standard input of another.
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025个体工商户与雇员劳动合同协议书范本
- 2025标准建设工程借款合同模板
- H大学青年教师教学学术发展的深度剖析与策略构建
- 2025年主题公园沉浸式体验项目虚拟现实技术与互动体验设计报告
- 2025年K2教育领域人工智能个性化学习系统实证研究报告
- 2025年BIM技术在建筑行业产业链协同中的应用报告
- 2025年5G通信技术资金申请报告撰写与项目评审
- 幼儿园大班科学活动《神奇的中草药》教案
- 2025年中国电热元件行业发展策略、市场环境及未来前景分析预测报告
- 2025数学常考压轴题上册八年级(沪科版)专题17 角平分线模型的七种类型-解析版
- 保护性约束患者的护理-PPT课件
- 酸碱平衡判断(杜斌教授)血气分析六步法
- 延安整风运动历史背景基本情况
- 模特摄影及肖像权使用协议书
- 北师大版小学数学五年级下册单元测试题含答案(全册)
- RTO使用说明书
- 矿坑涌水量的预测方法 -(解析法)
- 有限空间作业审批
- 医院超融合服务器项目供货合同
- 中国物流与采购联合会采购与供应链管理专业委员会简介
- 5人防测量温州市综合测绘成果报告书(范本)
评论
0/150
提交评论