website rev 95

en: Add Commands to Hbk
author Paul Issott <paul@slitaz.org>
date Fri Jul 04 23:46:09 2008 +0000 (2008-07-04)
parents a5e20c75073a
children 6972ce31c48b
files en/doc/handbook/cmdline.html en/doc/handbook/index.html en/doc/handbook/livecd.html
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/en/doc/handbook/cmdline.html	Fri Jul 04 23:46:09 2008 +0000
     1.3 @@ -0,0 +1,365 @@
     1.4 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     1.5 +    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     1.6 +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
     1.7 +<head>
     1.8 +    <title>SliTaz Handbook (en) - Commands</title>
     1.9 +    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
    1.10 +    <meta name="description" content="slitaz English handbook" />
    1.11 +    <meta name="expires" content="never" />
    1.12 +    <meta name="modified" content="2008-02-26 18:30:00" />
    1.13 +    <meta name="publisher" content="www.slitaz.org" />
    1.14 +    <meta name="author" content="Christophe Lincoln"/>
    1.15 +    <link rel="shortcut icon" href="favicon.ico" />
    1.16 +    <link rel="stylesheet" type="text/css" href="book.css" />
    1.17 +</head>
    1.18 +<body bgcolor="#ffffff">
    1.19 +
    1.20 +<!-- Header and quick navigation -->
    1.21 +<div id="header">
    1.22 +<div align="right" id="quicknav">
    1.23 +    <a name="top"></a>
    1.24 +    <a href="install.html">Installation</a> |
    1.25 +    <a href="index.html">Table of contents</a>
    1.26 +</div>
    1.27 +<h1><font color="#3E1220">SliTaz Handbook (en)</font></h1>
    1.28 +</div>
    1.29 +
    1.30 +<!-- Content. -->
    1.31 +<div id="content">
    1.32 +<div class="content-right"></div>
    1.33 +
    1.34 +<h2><font color="#DF8F06">Command Line Reference (<em>cmdline</em>)</font></h2>
    1.35 +
    1.36 +<ul>
    1.37 +    <li><a href="#intro">Introduction to the commands.</a></li>
    1.38 +    <li><a href="#help">Help and list available commands.</a></li>
    1.39 +    <li><a href="#ls">List the files in a directory.</a></li>
    1.40 +    <li><a href="#cd">Moving around directories.</a></li>
    1.41 +    <li><a href="#cp">Copy files.</a></li>
    1.42 +    <li><a href="#mkdir">Create a new directory.</a></li>
    1.43 +    <li><a href="#rm">Remove files or directories.</a></li>
    1.44 +    <li><a href="#read">View the files.</a></li>
    1.45 +    <li><a href="#edit">Edit files in ncurses mode.</a></li>
    1.46 +    <li><a href="#cat">Cat</a> - Edit a line of commands.</li>
    1.47 +    <li><a href="#web-nav">Navigate the web.</a></li>
    1.48 +    <li><a href="#irc-chat">Chat on IRC channels.</a></li>
    1.49 +    <li><a href="#wget">Download files.</a></li>
    1.50 +    <li><a href="#partitions">List the available partitions.</a></li>
    1.51 +    <li><a href="#mount">Mount a partition, cdrom or USB key.</a></li>
    1.52 +    <li><a href="#halt">Halt the system or Reboot.</a></li>
    1.53 +</ul>
    1.54 +
    1.55 +<a name="intro"></a>
    1.56 +<h3><font color="#6c0023">Introduction to the commands</font></h3>
    1.57 +<p>
    1.58 +This document is intended as a quick reference for using commands on SliTaz via
    1.59 +a Linux terminal or a graphical terminal (xterm). There are many GNU/Linux commands
    1.60 +for file handling, system maintenance or network management. You can also browse 
    1.61 +the web, chat on IRC, download files, edit scripts or even play games in text mode.
    1.62 +Note it is necessary to operate in <em>root</em> to assemble the hard drive or cdrom.
    1.63 +You can use the command <code>su</code> to become system administrator.
    1.64 +</p>
    1.65 +<a name="help"></a>
    1.66 +<h3><font color="#6c0023">Help and list available commands</font></h3>
    1.67 +<p>
    1.68 +Most GNU/Linux system commands have an option for assisting information on
    1.69 +their use. For support on the use of a command it is necessary to type the
    1.70 +command followed by the <code>--help</code> option. Example using the 
    1.71 +<code>cp</code> command to copy files:
    1.72 +</p>
    1.73 +<pre>
    1.74 + $ cp --help
    1.75 +</pre>
    1.76 +<p>
    1.77 +To list all the commands available on the system, you can simply press the 
    1.78 +Tab button to the left of the keyboard twice. For commands provided by the
    1.79 +Busybox utility you can type <code>busybox --help</code>.
    1.80 +</p>
    1.81 +
    1.82 +<a name="ls"></a>
    1.83 +<h3><font color="#6c0023">List the files in a directory</font></h3>
    1.84 +<p>
    1.85 +To list the files and folders contained in a directory, you can use the
    1.86 +<code>ls</code> command. For all options remember to use the <code>--help</code>
    1.87 +flag. To simply list the files in the current directory:
    1.88 +</p>
    1.89 +<pre>
    1.90 + $ ls
    1.91 +</pre>
    1.92 +<p>
    1.93 +List all the files using the <code>-al</code> option:
    1.94 +</p>
    1.95 +<pre>
    1.96 + $ ls -al
    1.97 +</pre>
    1.98 +<p>
    1.99 +List a directory:
   1.100 +</p>
   1.101 +<pre>
   1.102 + $ ls /home/slitaz
   1.103 +</pre>
   1.104 +
   1.105 +<a name="cd"></a>
   1.106 +<h3><font color="#6c0023">Moving around directories</font></h3>
   1.107 +<p>
   1.108 +To browse to the files you can use the <code>cd</code> command:
   1.109 +</p>
   1.110 +<pre>
   1.111 + $ cd /usr/share/doc
   1.112 + Back to the parent directory:
   1.113 + $ cd ..
   1.114 +</pre>
   1.115 +<p>
   1.116 +To go into the directory of the user (root = /root):
   1.117 +</p>
   1.118 +<pre>
   1.119 + $ cd
   1.120 + Or :
   1.121 + $ cd ~
   1.122 + Or :
   1.123 + $ cd $HOME
   1.124 +</pre>
   1.125 +
   1.126 +<a name="cp"></a>
   1.127 +<h3><font color="#6c0023">Copy files</font></h3>
   1.128 +<p>
   1.129 +The <code>cp</code> command copies files or folders. The example copies the
   1.130 +info.txt file in the current directory into the Documents directory:
   1.131 +</p>
   1.132 +<pre>
   1.133 + $ cp info.txt Documents/
   1.134 +</pre>
   1.135 +<p>
   1.136 +Copy a whole directory. Here the command copies the Templates directory
   1.137 +into /home/hacker:
   1.138 +</p>
   1.139 +<pre>
   1.140 + $ cp -a Templates /home/hacker
   1.141 +</pre>
   1.142 +
   1.143 +<a name="mkdir"></a>
   1.144 +<h3><font color="#6c0023">Create a new directory</font></h3>
   1.145 +<p>
   1.146 +This command will create a new directory. The following command creates a
   1.147 +directory called Projects. It will be created in the directory /home of the 
   1.148 +current user or in the directory which one is in. Note you can display 
   1.149 +your current working directory with the <code>pwd</code> command:
   1.150 +</p>
   1.151 +<pre>
   1.152 + $ mkdir Projects
   1.153 +</pre>
   1.154 +<p>
   1.155 +Creation of a directory named script-1.0 in the Projects folder:
   1.156 +</p>
   1.157 +<pre>
   1.158 + $ mkdir Projects/script-1.0
   1.159 +</pre>
   1.160 +<p>
   1.161 +You can also create a directory tree with the <code>-p</code> parents option:
   1.162 +</p>
   1.163 +<pre>
   1.164 + $ mkdir -p one/two/three/four
   1.165 +</pre>
   1.166 +
   1.167 +<a name="rm"></a>
   1.168 +<h3><font color="#6c0023">Delete files or directories</font></h3>
   1.169 +<p>
   1.170 +The command <code>rm</code> lets you delete a file. Let's remove the
   1.171 +file work.txt which is in the current directory:
   1.172 +</p>
   1.173 +<pre>
   1.174 + $ rm work.txt
   1.175 +</pre>
   1.176 +<p>
   1.177 +The command <code>rm</code> has several options. To delete a directory and
   1.178 +it's contents, we use the <code>-rf</code> option.
   1.179 +Example:
   1.180 +</p>
   1.181 +<pre>
   1.182 + $ rm -rf /home/hacker/Templates
   1.183 +</pre>
   1.184 +<p>
   1.185 +Note you can also use the <code>-i</code> option to remove files interactively.
   1.186 +</p>
   1.187 +
   1.188 +<a name="read"></a>
   1.189 +<h3><font color="#6c0023">View files</font></h3>
   1.190 +<p>
   1.191 +To read the contents of a file or script, you can use the
   1.192 +<code>less</code>, <code>more</code> or <code>cat</code> commands, or the web
   1.193 +browser Retawq. Examples with a README file, essential.txt, and  
   1.194 +script.sh:
   1.195 +</p>
   1.196 +<pre>
   1.197 + $ less -EM essential.txt
   1.198 + or :
   1.199 + $ more README
   1.200 + or :
   1.201 + $ cat /path/to/script.sh
   1.202 +</pre>
   1.203 +<p>
   1.204 +Display a text or html file with the web browser Retawq:
   1.205 +</p>
   1.206 +<pre>
   1.207 + $ retawq /usr/share/doc/index.html
   1.208 +</pre>
   1.209 +
   1.210 +<a name="edit"></a>
   1.211 +<h3><font color="#6c0023">Edit files</font></h3>
   1.212 +<p>
   1.213 +Editing text files, scripts, configuration files etc, can be done easily using
   1.214 +the text editor GNU Nano in a console or graphical terminal.
   1.215 +Example with a file bookmarks.html (&lt;Ctrl+X&gt; to quit
   1.216 +and save):
   1.217 +</p>
   1.218 +<pre>
   1.219 + $ nano Public/bookmarks.html
   1.220 +</pre>
   1.221 +
   1.222 +<a name="cat"></a>
   1.223 +<h3><font color="#6c0023">Cat</font></h3>
   1.224 +<p>
   1.225 +You can use the <code>cat</code> command to create various text files. EOF signifies
   1.226 +End Of File, this is where the file ends. Example with a file packages.list, this 
   1.227 +removes the current contents of the file and lets you add some new text:
   1.228 +</p>
   1.229 +<pre>
   1.230 + $ cat &gt; packages.list &lt;&lt; "EOF"
   1.231 + The text...
   1.232 + and more text
   1.233 + 
   1.234 + EOF
   1.235 +</pre>
   1.236 +<p>
   1.237 +To amend to the following text file, put two greater than signs 
   1.238 +(&gt;&gt;) after <code>cat</code>, example:
   1.239 +</p>
   1.240 +<pre>
   1.241 + $ cat &gt;&gt; packages.list &lt;&lt; "EOF"
   1.242 + The text...
   1.243 + 
   1.244 + EOF
   1.245 +</pre>
   1.246 +
   1.247 +<a name="web-nav"></a>
   1.248 +<h3><font color="#6c0023">Navigate the web</font></h3>
   1.249 +<p>
   1.250 +Surf the web quickly and simply with the 'retawq' text-mode web browser.
   1.251 +Note that you can also use the local browser. You can then navigate easily
   1.252 +with the arrows on your keyboard - links are colored blue and can be
   1.253 +followed by pressing &lt;ENTER&gt;:
   1.254 +</p>
   1.255 +<pre>
   1.256 + $ retawq http://slitaz.org/en
   1.257 + or :
   1.258 + $ retawq http://localhost/
   1.259 +</pre>
   1.260 +
   1.261 +<a name="irc-chat"></a>
   1.262 +<h3><font color="#6c0023">Talk on IRC</font></h3>
   1.263 +<p>
   1.264 +To discuss and transfer files via the many IRC servers available, SliTaz
   1.265 +provides Rhapsody. The IRC client is simple, fast and lightweight, providing
   1.266 +a pleasant, easy to handle ncurses configuration menu. To start the application
   1.267 +from a terminal connecting to server (irc.freenode.net) and joining #slitaz:
   1.268 +</p>
   1.269 +<pre>
   1.270 + $ rhapsody
   1.271 + /connect irc.freenode.net
   1.272 + /join #slitaz
   1.273 +</pre>
   1.274 +<a name="wget"></a>
   1.275 +<h3><font color="#6c0023">Download files</font></h3>
   1.276 +<p>
   1.277 +To download various file formats on the internet, you have the <code>wget</code>
   1.278 +command. To grab a simple html page, the contents of a folder or an entire
   1.279 +website:
   1.280 +</p>
   1.281 +<pre>
   1.282 + $ wget http://www.slitaz.org/en/doc/handbook/
   1.283 +</pre>
   1.284 +
   1.285 +<a name="partitions"></a>
   1.286 +<h3><font color="#6c0023">List the available partitions</font></h3>
   1.287 +<p>
   1.288 +To list the partitions on an internal or external hard drive, you can use
   1.289 +<code>cat</code> to display the contents of <code>/proc/partitions</code>
   1.290 +or use the <code>fdisk</code> utility with the <code>-l</code> option
   1.291 +meaning <em>list</em>. You can then mount the individual partition(s)
   1.292 +that you want to use:
   1.293 +</p>
   1.294 +<pre>
   1.295 + $ cat /proc/partitions
   1.296 + or :
   1.297 + # fdisk -l
   1.298 +</pre>
   1.299 +
   1.300 +<a name="mount"></a>
   1.301 +<h3><font color="#6c0023">Mount a partition, CD or USB drive</font></h3>
   1.302 +<p>
   1.303 +To mount a local partition in the SliTaz filesystem, we advise you to use
   1.304 +the /mnt directory. Example creating the necessary directory and mounting
   1.305 +the <code>hda6</code> partition of the first local hard drive on /mnt/hda6:
   1.306 +</p>
   1.307 +<pre>
   1.308 + # mkdir -p /mnt/hda6
   1.309 + # mount -t ext3 /dev/hda6 /mnt/hda6
   1.310 +</pre>
   1.311 +<p>
   1.312 +SliTaz functions in RAM, you can mount the same cdrom or remove it 
   1.313 +to mount another (/dev/cdrom is a link on the first cdrom drive).
   1.314 +Note that a cdrom is a removable medium, it should be
   1.315 +mounted on /media:
   1.316 +</p>
   1.317 +<pre>
   1.318 + # mount -t iso9660 /dev/cdrom /media/cdrom
   1.319 +</pre>
   1.320 +<p>
   1.321 +To mount a USB or flash drive you must specify the proper filesystem. 
   1.322 +Normally a USB key is formatted in FAT32 which can be read from GNU/Linux
   1.323 +and Windows operating systems. On a GNU/Linux system is it generally
   1.324 +recognized as the sda1 device - we now prepare a link <code>sda1</code> on
   1.325 +<code>flash</code> to facilitate the task. Note it is also a removable medium
   1.326 +and should be mounted on /media:
   1.327 +</p>
   1.328 +<pre>
   1.329 + # mount -t vfat /dev/flash /media/flash
   1.330 +</pre>
   1.331 +
   1.332 +<a name="halt"></a>
   1.333 +<h3><font color="#6c0023">Turn off the system or restart</font></h3>
   1.334 +<p>
   1.335 +To stop or restart SliTaz, you can use the <code>halt</code>, <code>reboot</code>
   1.336 +commands or the &lt;Ctrl+Alt+Delete&gt; key combinations, which enable a
   1.337 +system reboot. In case of any problems you can use the <code>-f</code>
   1.338 +option signifing <em>forced</em>:
   1.339 +</p>
   1.340 +<pre>
   1.341 + # halt
   1.342 + To restart :
   1.343 + # reboot
   1.344 + Or :
   1.345 + # reboot -f
   1.346 +</pre>
   1.347 +
   1.348 +<!-- End of content -->
   1.349 +</div>
   1.350 +
   1.351 +<!-- Footer. -->
   1.352 +<div id="footer">
   1.353 +	<div class="footer-right"></div>
   1.354 +	<a href="#top">Top of the page</a> | 
   1.355 +	<a href="index.html">Table of contents</a>
   1.356 +</div>
   1.357 +
   1.358 +<div id="copy">
   1.359 +    Copyright &copy; 2008 <a href="http://www.slitaz.org/en/">SliTaz</a> -
   1.360 +    <a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License</a>;<br />
   1.361 +    Documentation is under
   1.362 +    <a href="http://www.gnu.org/copyleft/fdl.html">GNU Free Documentation License</a>
   1.363 +    and code is <a href="http://validator.w3.org/">valid xHTML 1.0</a>.
   1.364 +</div>
   1.365 +
   1.366 +</body>
   1.367 +</html>
   1.368 +
     2.1 --- a/en/doc/handbook/index.html	Mon Jun 30 21:10:19 2008 +0000
     2.2 +++ b/en/doc/handbook/index.html	Fri Jul 04 23:46:09 2008 +0000
     2.3 @@ -34,6 +34,7 @@
     2.4  <ul>
     2.5  	<li><a href="livecd.html">LiveCD usage</a> - How to boot and set options 
     2.6  	at the command prompt.</li>
     2.7 +	<li><a href="cmdline.html">Commands</a> - List of useful commands.</li>
     2.8  	<li><a href="install.html">Installation</a> - HD install instructions.</li>
     2.9  </ul>
    2.10  
     3.1 --- a/en/doc/handbook/livecd.html	Mon Jun 30 21:10:19 2008 +0000
     3.2 +++ b/en/doc/handbook/livecd.html	Fri Jul 04 23:46:09 2008 +0000
     3.3 @@ -18,7 +18,7 @@
     3.4  <div id="header">
     3.5  <div align="right" id="quicknav">
     3.6      <a name="top"></a>
     3.7 -    <a href="install.html">Installation</a> |
     3.8 +    <a href="cmdline.html">Commands</a> |
     3.9      <a href="index.html">Table of contents</a>
    3.10  </div>
    3.11  <h1><font color="#3E1220">SliTaz Handbook (en)</font></h1>