haiku/docs/userguide/sv_SE/applications/terminal.html

125 lines
8.1 KiB
HTML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "../../../html-dtd/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-US">
<head>
<!--
*
* Copyright 2008-2009, Haiku. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* Humdinger <humdingerb@gmail.com>
*
-->
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta name="robots" content="all" />
<title>Terminal</title>
<link rel="stylesheet" type="text/css" href="../../../Haiku-doc.css" />
</head>
<body>
<div id="banner">
<div><span>User guide</span></div>
</div>
<div class="nav">
<div class="inner">
<ul class="lang-menu">
<li class="now"><img src="../../../images/flags/sv_SE.png" alt="" /> Svensk</li>
<li><a href="../../fr/applications/terminal.html"><img src="../../../images/flags/fr.png" alt="" />Français</a></li>
<li><a href="../../de/applications/terminal.html"><img src="../../../images/flags/de.png" alt="" />Deutsch</a></li>
<li><a href="../../it/applications/terminal.html"><img src="../../../images/flags/it.png" alt="" />Italiano</a></li>
<li><a href="../../ru/applications/terminal.html"><img src="../../../images/flags/ru.png" alt="" />Русский</a></li>
<li><a href="../../es/applications/terminal.html"><img src="../../../images/flags/es.png" alt="" />Español</a></li>
<li><a href="../../jp/applications/terminal.html"><img src="../../../images/flags/jp.png" alt="" />日本語</a></li>
<li><a href="../../en/applications/terminal.html"><img src="../../../images/flags/gb.png" alt="" />English</a></li>
</ul>
<span>
« <a href="stylededit.html">StyledEdit</a>
:: <a href="../applications.html#list-of-apps" class="uplink">Applications</a>
:: <a href="textsearch.html">TextSearch</a> »
</span></div>
</div>
<div id="content">
<div>
<h2><img src="../../images/apps-images/terminal-icon_64.png" alt="terminal-icon_64.png" width="64" height="64" />Terminal</h2>
<table summary="layout" border="0" cellspacing="0" cellpadding="2">
<tr><td>Deskbar:</td><td style="width:15px;"></td><td><span class="menu">Applications</span></td></tr>
<tr><td>Plats:</td><td></td><td><span class="path">/boot/system/apps/Terminal</span></td></tr>
<tr><td>Inställningar:</td><td></td><td><span class="path">~/config/settings/Terminal_settings</span><br />
<span class="path">~/.profile</span> - adds/overrides defaults in <span class="path">/boot/system/etc/profile</span><br />
<span class="path">~/.inputrc</span> - adds/overrides defaults in <span class="path">/boot/system/etc/inputrc</span></td></tr>
</table>
<p><br /></p>
<p>The Terminal is Haiku's interface to bash, the Bourne Again Shell.</p>
<p>Please refer to the topic on <a href="../bash-scripting.html">Scripting</a> for a few links to online tutorials on working in the shell. Here, we'll concentrate on the Terminal application itself.</p>
<h3>
<a href="#"><img src="../../images/up.png" style="border:none;float:right" alt="index" /></a>
<a id="appearance" name="appearance">Appearance</a></h3>
<p>You can open as many Terminals as needed, either each in it's own window by simply launching more Terminals or with <span class="key">ALT</span> <span class="key">N</span> from an already running Terminal. Or you use Terminal's tabbed view and open another tab with <span class="key">ALT</span> <span class="key">T</span>.</p>
<p>A Terminal window can be resized like any other window or you use the presets from the <span class="menu">Settings | Window Size</span> menu. <span class="key">ALT</span> <span class="key">ENTER</span> toggles fullscreen mode.</p>
<p>Changed window size and text encoding are only kept choosing <span class="menu">Settings | Save as default</span>.</p>
<img src="../images/apps-images/terminal.png" alt="terminal.png" />
<br />
<p><span class="menu">Settings | Preferences</span> opens a panel where you can set font type, font size and the different text and background colors. You can save different settings as separate profiles, which on double-click open an accordingly configured Terminal.<br />
Pressing <span class="button">OK</span> will save the current settings as default.</p>
<h3>
<a href="#"><img src="../../images/up.png" style="border:none;float:right" alt="index" /></a>
<a id="customization" name="customization">Bash customization</a></h3>
<p>Coming from Unix, there are countless possibilities to customize the bash itself. There are two files that are especially important to the user: <span class="cli">.profile</span> and <span class="cli">.inputrc</span><br />
Both files can be created in the <span class="path">home/</span> folder and add or override the system defaults that are defined in <span class="path">/boot/system/etc/</span>.</p>
<h4>.profile</h4>
<p>The <span class="cli">.profile</span> is loaded every time you open a new Terminal. It sets all kinds of aliases and variables that will affect bash's behavior and appearance. You'll find many online resources that will detail all possibilities.</p>
<p>The Haiku/BeOS Tip Server has quite a few tips to get you started, for example:</p>
<ul>
<li><a href="http://betips.net/1997/09/09/customize-your-terminal-prompt/">Customize your Terminal prompt</a></li>
<li><a href="http://betips.net/1997/09/09/more-prompt-customizations/">More prompt customizations</a></li>
<li><a href="http://betips.net/1997/09/09/enhancing-bash/">Enhancing bash</a></li>
<li><a href="http://betips.net/1997/09/09/custom-keyboard-shortcuts/">Custom keyboard shortcuts</a></li>
</ul>
<p>There are more, <a href="http://betips.net/index.php?s=.profile">have a look</a>.</p>
<h4>.inputrc</h4>
<p>The <span class="cli">.inputrc</span> deals with keybindings. Since Haiku provides useful defaults, you probably don't have to mess with these more involved settings. If you do have special needs here, consult one of the many online resources, e.g. <a href="http://tiswww.case.edu/php/chet/readline/rluserman.html">The GNU Readline Library</a>.</p>
<h3>
<a href="#"><img src="../../images/up.png" style="border:none;float:right" alt="index" /></a>
<a id="shortcuts" name="shortcuts">Keyboard shortcuts</a></h3>
<p>You'll find a list of useful shortcuts in <a href="../keyboard-shortcuts.html#terminal">Shortcuts and key combinations</a>.</p>
<h3>
<a href="#"><img src="../../images/up.png" style="border:none;float:right" alt="index" /></a>
<a id="hints" name="hints">Hints for working with the Terminal</a></h3>
<ul><li><p>Dragging a file or folder from a Tracker window into the Terminal will insert its path at the location of the cursor. Dragging with the right mouse button offers additional actions in a context menu:</p>
<table summary="layout" border="0" cellpadding="2" cellspacing="0">
<tr><td><span class="menu">Insert Path</span></td><td> </td><td>Inserts the location of the file, same as drag&amp;dropping with the left mouse button.</td></tr>
<tr><td><span class="menu">Change Directory</span></td><td> </td><td>Changes to the folder of the dragged file.</td></tr>
<tr><td><span class="menu">Create Link Here</span></td><td> </td><td>Creates a link to the dragged file in the current working directory of the Terminal.</td></tr>
<tr><td><span class="menu">Move Here</span></td><td> </td><td>Moves the dragged file into the current working directory of the Terminal.</td></tr>
<tr><td><span class="menu">Copy Here</span></td><td> </td><td>Copies the dragged file into the current working directory of the Terminal.</td></tr>
</table></li>
<li><p>You can open any file with its preferred application with the command <span class="cli">open <i>[filename]</i></span>. This also works with the representation of the current ("<span class="cli">.</span>") and parent ("<span class="cli">..</span>") folder which then open in a Tracker window. So, to open the current working directory, you type:</p>
<pre class="terminal">open .</pre>
</li></ul>
</div>
</div>
<div class="nav">
<div class="inner"><span>
« <a href="stylededit.html">StyledEdit</a>
:: <a href="../applications.html#list-of-apps" class="uplink">Applications</a>
:: <a href="textsearch.html">TextSearch</a> »
</span></div>
</div>
</body>
</html>