查看“Lts0010”的源代码
来自Ubuntu中文
←
Lts0010
跳到导航
跳到搜索
因为以下原因,您没有权限编辑该页面:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
== 什么是Shell? == 简单的说, shell就是一个小程序,这个小程序可以接受来自键盘的命令并把这些命令发送到操作系统,再有系统来执行。在过去,在安装有Unix的计算机上,这是唯一的可用的交互式操作。而如今,我们可以通过图形化界面来输入命令行,比如shell. 在大多数的linux计算机中,安装有个一个叫bash(bash是Bourne Again SHell的简写,这是有Steve Bourne编写的一个早期shell的升级版。),它充当shell的角色。通常在Linux计算机上有多种可用的shell,比如:ksh、tcsh、 zsh。 == Xterm、 Gnome、Konsole之类都是什么? == <br>这些都是所谓的“终端模拟器”,这是一些可以让您的计算机界面变得易于操作,并解可以帮助您和对话的程序。现在有很多的终端模拟器供我们使用。一般的Linux系统通常包含多种终端模拟器,就像:xterm、rxvt、konsole、kvt、gnome-terminal、nxterm、eterm. == 启动终端 == 您的窗口管理器可以通过菜单来启动程序,查看程序清单,您也许会发现一个像终端模拟器的程序。 在 KDE中,在主菜单中,终端模拟器通常是 Konsole和Tterminal.而在 Gnome中,您发现的却是"color xterm"、 "regular xterm,"和 "gnome-terminal". You can start up as many of these as you want and play with them. While there are a number of different terminal emulators, they all do the same thing. They give you access to a shell session. You will probably develop a preference for one, based on the different bells and whistles each one provides. == Testing the Keyboard == Ok, let's try some typing. Bring up a terminal window. You should see a shell prompt that contains your user name and the name of the machine followed by a dollar sign. Something like this: <code><nowiki>[me@linuxbox me]$</nowiki></code> Excellent! Now type some nonsense characters and press the enter key. <code><nowiki>[me@linuxbox me]$</nowiki></code> <code><nowiki>kdkjflajfks</nowiki></code> If all went well, you should have gotten an error message complaining that it cannot understand you: <code><nowiki>[me@linuxbox me]$</nowiki></code> <code><nowiki>kdkjflajfks</nowiki></code> <code><nowiki>bash: kdkjflajfks: command not found</nowiki></code> Wonderful! Now press the up-arrow key. Watch how our previous command "kdkjflajfks" returns. Yes, we have ''command history''. Press the down-arrow and we get the blank line again. Recall the "kdkjflajfks" command using the up-arrow key if needed. Now, try the left and right-arrow keys. You can position the text cursor anywhere in the command line. This allows you to easily correct mistakes. == You're not logged in as root, are you? == Don't operate the computer as the superuser. You should only become the superuser when absolutely necessary. Doing otherwise is dangerous, stupid, and in poor taste. Create a user account for yourself now! == Using the Mouse == Even though the shell is a command line interface, you can still use the mouse for several things. That is, if you have a 3-button mouse; and you should have a 3-button mouse if you want to use Linux. First, you can use the mouse to scroll backwards and forwards through the output of the terminal window. To demonstrate, hold down the enter key until it scrolls off the window. Now, with your mouse, you can use the scroll bar at the side of the terminal window to move the window contents up and down. If you are using <code><nowiki>xterm</nowiki></code>, you may find this difficult, since the middle button is required for this operation. If you have a 2-button mouse, it may have been configured to emulate a 3-button mouse. This means the middle button can be simulated by pressing down both the left and right buttons at the same time. Next, you can copy text with the mouse. Drag your mouse over some text (for example, "kdkjflajfks" right here on the browser window) while holding down the left button. The text should highlight. Now move your mouse pointer to the terminal window and press the middle mouse button. The text you highlighted in the browser window should be copied into the command line. Did I mention that you will need a 3-button mouse? == A few words about focus... == When you installed your Linux system and its window manager (most likely Gnome or KDE), it was configured to behave in some ways like that legacy operating system. In particular, it probably has its ''focus policy'' set to "click to focus." This means that in order for a window to gain focus (become active) you have to click in the window. This is contrary to traditional X windows behavior. If you take my advice and get a 3-button mouse, you will want to set the focus policy to "focus follows mouse". This will make using the text copying feature of X windows much easier to use. You may find it strange at first that windows don't raise to the front when they get focus (you have to click on the title bar to do that), but you will enjoy being able to work on more than one window at once without having the active window obscuring the the other. Try it and give it a fair trial; I think you will like it. You can find this setting in the configuration tools for your window manager.
返回
Lts0010
。
导航菜单
页面操作
页面
讨论
阅读
查看源代码
历史
页面操作
页面
讨论
更多
工具
个人工具
登录
导航
首页
最近更改
随机页面
页面分类
帮助
搜索
编辑
编辑指南
沙盒
新闻动态
字词处理
工具
链入页面
相关更改
特殊页面
页面信息