~ubuntu-branches/ubuntu/precise/kubuntu-docs/precise-proposed

« back to all changes in this revision

Viewing changes to docs/cli/cs/cli.xml

  • Committer: Package Import Robot
  • Author(s): David Wonderly
  • Date: 2012-04-18 11:56:36 UTC
  • Revision ID: package-import@ubuntu.com-20120418115636-43z5hjr79m9j1cuo
Tags: 12.04.0ubuntu1
12.04 updated, fixed English version.  

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?xml version="1.0" encoding="UTF-8"?>
2
 
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
3
 
    "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
4
 
<!ENTITY % globalent SYSTEM "../../../libs/global.ent">
5
 
%globalent;
6
 
<!ENTITY % kde-menus-C SYSTEM "../../../libs/kde-menus-C.ent">
7
 
%kde-menus-C;
8
 
<!ENTITY language "en">
9
 
]>
10
 
<article id="cli">
11
 
<articleinfo>
12
 
<title
13
 
>Introduction To The Command Line</title>
14
 
&legalnotice;
15
 
<abstract>
16
 
<para
17
 
>This document provides a brief description of the Linux command line. It is not a complete guide to the command line, but rather an introduction to complement &kubuntu;&apos;s graphical tools. </para>
18
 
</abstract>
19
 
</articleinfo>
20
 
 
21
 
<sect1 id="introduction">
22
 
<title
23
 
>Úvod</title>
24
 
 
25
 
<para>
26
 
<emphasis
27
 
>"Under Linux there are GUIs (graphical user interfaces), where you can point and click and drag, and hopefully get work done without first reading lots of documentation. The traditional Unix environment is a CLI (command line interface), where you type commands to tell the computer what to do. That is faster and more powerful, but requires finding out what the commands are." -- from <emphasis role="strong"
28
 
>man intro(1)</emphasis
29
 
> </emphasis>
30
 
</para>
31
 
<para
32
 
>This guide describes some basic GNU/Linux shell commands. It is not intended to be a complete guide to the command line, just an introduction to complement &kubuntu;&apos;s graphical tools. </para>
33
 
<para>
34
 
<itemizedlist>
35
 
<listitem>
36
 
<para
37
 
>Všechny názvy příkazů, souborů nebo cesty k adresářům jsou zobrazeny použitím <command
38
 
>neproporcionálního písma</command
39
 
>. </para>
40
 
</listitem>
41
 
<listitem>
42
 
<para
43
 
>The commands should be issued from a command prompt within a <application
44
 
>Terminal</application
45
 
> and will be shown as: <screen
46
 
>command to type</screen>
47
 
</para>
48
 
</listitem>
49
 
<listitem>
50
 
<para
51
 
><emphasis role="strong"
52
 
>Command Line Linux is case sensitive.</emphasis
53
 
> User, user, and USER are each different and distinct in Linux. </para>
54
 
</listitem>
55
 
</itemizedlist>
56
 
</para>
57
 
</sect1>
58
 
 
59
 
<sect1 id="terminal">
60
 
<title
61
 
>Starting A Terminal</title>
62
 
<para
63
 
>&kubuntu;&apos;s Terminal application is called <application
64
 
>Konsole</application
65
 
>, and is opened by going to &menukonsole;. </para>
66
 
<para>
67
 
<example>
68
 
<title
69
 
>&kubuntu;&apos;s terminal - Konsole</title>
70
 
<mediaobject>
71
 
<imageobject>
72
 
<imagedata fileref="help:/images/C/C/konsole.png" format="PNG"/>
73
 
</imageobject>
74
 
</mediaobject>
75
 
</example>
76
 
</para>
77
 
</sect1>
78
 
 
79
 
<!-- FILES AND DIRECTORIES COMMANDS -->
80
 
<sect1 id="files-directories">
81
 
<title
82
 
>File and Directory Commands</title>
83
 
<sect2 id="pwd">
84
 
<title
85
 
>pwd - print working directory</title>
86
 
<para
87
 
>The <command
88
 
>pwd</command
89
 
> command displays the directory where the user is currently located. (<acronym
90
 
>pwd</acronym
91
 
> stands for <quote
92
 
>print working directory</quote
93
 
>). For example, typing <screen
94
 
>pwd</screen
95
 
> while in the <filename class="directory"
96
 
>Desktop</filename
97
 
> will show <computeroutput
98
 
>/home/[username]/Desktop</computeroutput
99
 
>. <note
100
 
> <para
101
 
><application
102
 
>Konsole</application
103
 
> also displays this information in both the tab and title bar of its window. </para>
104
 
</note>
105
 
</para>
106
 
</sect2>
107
 
<sect2 id="cd">
108
 
<title
109
 
>cd - change directory</title>
110
 
<para
111
 
>The <command
112
 
>cd</command
113
 
> command changes directories. (<acronym
114
 
>cd</acronym
115
 
> stands for <quote
116
 
>change directory</quote
117
 
>). When a terminal window is opened, it will be in the user's home directory. Moving around the file system requires the use of the <command
118
 
>cd</command
119
 
>. </para>
120
 
<itemizedlist>
121
 
<listitem>
122
 
<para
123
 
>To navigate into the root directory, type: <screen
124
 
>cd /</screen>
125
 
</para>
126
 
</listitem>
127
 
<listitem>
128
 
<para
129
 
>To navigate to the current user's home directory, type: <screen
130
 
>cd</screen
131
 
> or <screen
132
 
>cd ~</screen>
133
 
</para>
134
 
<note>
135
 
<para
136
 
>The <command
137
 
>~</command
138
 
> character represents the current user's home directory. As shown above, <command
139
 
>cd ~</command
140
 
> is equivalent to <command
141
 
>cd /home/username/</command
142
 
>. However, when running a command as root (using <command
143
 
>sudo</command
144
 
>, for example), <command
145
 
>~</command
146
 
> points to <filename class="directory"
147
 
>/root</filename
148
 
>. When running a <command
149
 
>cd</command
150
 
> command with <command
151
 
>sudo</command
152
 
>, the full path to the home directory must be given. </para>
153
 
</note>
154
 
</listitem>
155
 
<listitem>
156
 
<para
157
 
>To navigate up one directory level, type: <screen
158
 
>cd ..</screen>
159
 
</para>
160
 
</listitem>
161
 
<listitem>
162
 
<para
163
 
>To navigate up two directory levels, type: <screen
164
 
>cd ../../</screen>
165
 
</para>
166
 
</listitem>
167
 
<listitem>
168
 
<para
169
 
>To navigate to the previous directory (go back), type: <screen
170
 
>cd -</screen>
171
 
</para>
172
 
</listitem>
173
 
<listitem>
174
 
<para
175
 
>To navigate through multiple levels of directories at once, specify the full directory path. For example, type: <screen
176
 
>cd /var/log</screen
177
 
> to go directly to the <filename class="directory"
178
 
>/log</filename
179
 
> subdirectory of <filename class="directory"
180
 
>/var/</filename
181
 
>. For another example, typing: <screen
182
 
>cd ~/Desktop</screen
183
 
> moves to the <filename class="directory"
184
 
>Desktop</filename
185
 
> subdirectory inside the current user's home directory. </para>
186
 
</listitem>
187
 
</itemizedlist>
188
 
</sect2>
189
 
<sect2 id="ls">
190
 
<title
191
 
>ls - list files</title>
192
 
<para
193
 
>The <command
194
 
>ls</command
195
 
> command outputs a list of the files in the current directory. (<acronym
196
 
>ls</acronym
197
 
> is short for <quote
198
 
>list</quote
199
 
>). For example, typing <screen
200
 
>ls ~</screen
201
 
> will display the files that are in the current user's home directory. </para>
202
 
<para
203
 
>Used with the <command
204
 
>-l</command
205
 
> option, <command
206
 
>ls</command
207
 
> outputs other information along with the filename, such as the permissions on the file, the file's owner, and more. </para>
208
 
<para
209
 
>Used with the <command
210
 
>-al</command
211
 
> options, <command
212
 
>ls</command
213
 
> outputs the information associated with the <command
214
 
>-l</command
215
 
> option in addition to showing hidden files (<command
216
 
>a</command
217
 
> option). </para>
218
 
</sect2>
219
 
<sect2 id="touch">
220
 
<title
221
 
>touch - create empty file</title>
222
 
<para
223
 
>The <command
224
 
>touch</command
225
 
> command is used either to change a file's access and modification timestamps or to create a new empty file. For example, <screen
226
 
>touch foo</screen
227
 
> will create a new empty file named <filename
228
 
>foo</filename
229
 
>. If <filename
230
 
>foo</filename
231
 
> is already a file, then using <command
232
 
>touch</command
233
 
> will update the timestamps on the file which will show the last time a file was <emphasis
234
 
>touched</emphasis
235
 
>. </para>
236
 
</sect2>
237
 
<sect2 id="mkdir">
238
 
<title
239
 
>mkdir - make directory</title>
240
 
<para
241
 
>The <command
242
 
>mkdir</command
243
 
> command is used to create a new directory. (<acronym
244
 
>mkdir</acronym
245
 
> stands for <quote
246
 
>make directory</quote
247
 
>). To create a new directory named <filename class="directory"
248
 
>foobar</filename
249
 
>, type: <screen
250
 
>mkdir foobar</screen>
251
 
</para>
252
 
</sect2>
253
 
<sect2 id="cp">
254
 
<title
255
 
>cp - copy files or directories</title>
256
 
<para
257
 
>The <command
258
 
>cp</command
259
 
> command makes a copy of a file or directory. (<acronym
260
 
>cp</acronym
261
 
> is short for <quote
262
 
>copy</quote
263
 
>). To make an exact copy of <filename
264
 
>foo</filename
265
 
> and name it <filename
266
 
>bar</filename
267
 
>, type: <screen
268
 
>cp foo bar</screen
269
 
> To make an exact copy of the <filename class="directory"
270
 
>foo_dir</filename
271
 
> directory and name it <filename class="directory"
272
 
>bar_dir</filename
273
 
>, type: <screen
274
 
>cp -r foo_dir bar_dir</screen>
275
 
</para>
276
 
</sect2>
277
 
<sect2 id="mv">
278
 
<title
279
 
>mv - move files or directories</title>
280
 
<para
281
 
>The <command
282
 
>mv</command
283
 
> command moves a file or directory to a different location or will rename a file or directory. (<acronym
284
 
>mv</acronym
285
 
> is short for <quote
286
 
>move</quote
287
 
>). To rename the file <filename
288
 
>foo</filename
289
 
> to <filename
290
 
>bar</filename
291
 
>, type: <screen
292
 
>mv foo bar</screen
293
 
> To move the file <filename
294
 
>foo</filename
295
 
> into the current user's <filename class="directory"
296
 
>Desktop</filename
297
 
> directory, type: <screen
298
 
>mv foo ~/Desktop</screen
299
 
> This will not rename <filename
300
 
>foo</filename
301
 
> to <filename
302
 
>Desktop</filename
303
 
> because <filename
304
 
>foo</filename
305
 
> is a file and <filename class="directory"
306
 
>Desktop</filename
307
 
> is a directory. </para>
308
 
</sect2>
309
 
<sect2 id="rm">
310
 
<title
311
 
>rm - remove files or directories</title>
312
 
<para
313
 
>The <command
314
 
>rm</command
315
 
> command is used to delete files and directories. (<acronym
316
 
>rm</acronym
317
 
> is short for <quote
318
 
>remove</quote
319
 
>). To delete the file <filename
320
 
>foo</filename
321
 
> for the current directory, type: <screen
322
 
>rm foo</screen>
323
 
</para>
324
 
<para
325
 
>By default, <command
326
 
>rm</command
327
 
> will not remove directories. To remove a directory, you must use the <command
328
 
>-r</command
329
 
> option (also can be entered as either <command
330
 
>-R</command
331
 
> or <command
332
 
>--recursive</command
333
 
>). For example, <screen
334
 
>rm -r foobar</screen
335
 
> or <screen
336
 
>rm -R foobar</screen
337
 
> or <screen
338
 
>rm --recursive foobar</screen
339
 
> will remove the directory <filename class="directory"
340
 
>foobar</filename
341
 
>, <emphasis role="strong"
342
 
> and all of its contents!</emphasis
343
 
> </para>
344
 
</sect2>
345
 
 
346
 
</sect1>
347
 
 
348
 
<!-- SYSTEM INFORMATION COMMANDS -->
349
 
<sect1 id="sysinfo">
350
 
<title
351
 
>System Information Commands</title>
352
 
<sect2 id="df">
353
 
<title
354
 
>df - display amount of disk space</title>
355
 
<para
356
 
>The <command
357
 
>df</command
358
 
> command displays filesystem disk space usage for all partitions. (<acronym
359
 
>df</acronym
360
 
> stands for <quote
361
 
>disk free</quote
362
 
>). <screen
363
 
>df -h</screen
364
 
> will give information using megabytes (<abbrev
365
 
>M</abbrev
366
 
>) and gigabytes (<abbrev
367
 
>G</abbrev
368
 
>) instead of blocks (<command
369
 
>-h</command
370
 
> means <quote
371
 
>human readable</quote
372
 
>). </para>
373
 
</sect2>
374
 
<sect2 id="free">
375
 
<title
376
 
>free - display amount of free and used memory</title>
377
 
<para
378
 
>The <command
379
 
>free</command
380
 
> command displays the amount of free and used memory in the system. <screen
381
 
>free -m</screen
382
 
> will give the information using megabytes, which is probably the most useful for current computers. </para>
383
 
</sect2>
384
 
<sect2 id="top">
385
 
<title
386
 
>top - display top consuming processes</title>
387
 
<para
388
 
>The <command
389
 
>top</command
390
 
> command displays information on the Linux system - processes that are running, system resources including <acronym
391
 
>CPU</acronym
392
 
>, <acronym
393
 
>RAM</acronym
394
 
> &amp; swap usage, and the total number of tasks being run. To exit <command
395
 
>top</command
396
 
>, press <keycap
397
 
>q</keycap
398
 
>. </para>
399
 
</sect2>
400
 
<sect2 id="uname">
401
 
<title
402
 
>uname - print details about the current machine</title>
403
 
<para
404
 
>The <command
405
 
>uname</command
406
 
> command with the <command
407
 
>-a</command
408
 
> options displays all system information, including machine name, kernel name &amp; version, and other details. This command is useful for checking which kernel is in use. (<abbrev
409
 
>uname</abbrev
410
 
> is short for <quote
411
 
>unix name</quote
412
 
>). </para>
413
 
</sect2>
414
 
<sect2 id="lsb_release">
415
 
<title
416
 
>lsb_release - print details about current Linux release</title>
417
 
<para
418
 
>The <command
419
 
>lsb_release</command
420
 
> with the <command
421
 
>-a</command
422
 
> option prints version information for the Linux release in use. For example, typing: <screen
423
 
>lsb_release -a</screen
424
 
> will display: <screen
425
 
>No LSB modules are available.
426
 
Distributor ID: Ubuntu
427
 
Description:    Ubuntu &distro-rev;
428
 
Release:        &distro-rev;
429
 
Codename:       &distro-short-codename;
430
 
</screen>
431
 
</para>
432
 
</sect2>
433
 
</sect1>
434
 
 
435
 
<!-- ELEVATED PRIVS -->
436
 
<sect1 id="elevated-privileges">
437
 
<title
438
 
>Executing Commands with Elevated Privileges</title>
439
 
<para
440
 
>The following commands must be prefaced with the <command
441
 
>sudo</command
442
 
> command. Please see <ulink url="https://help.ubuntu.com/community/RootSudo"
443
 
>RootSudo</ulink
444
 
> for information on using <command
445
 
>sudo</command
446
 
>. (<abbrev
447
 
>sudo</abbrev
448
 
> is short for <quote
449
 
>superuser do</quote
450
 
>). </para>
451
 
<sect2 id="add-group">
452
 
<title
453
 
>Adding a New Group</title>
454
 
<para
455
 
>The <command
456
 
>addgroup</command
457
 
> command is used to create a new group in the system. To create a new group, type: <screen
458
 
>sudo addgroup foobar</screen
459
 
> The above command will create a new group called <emphasis role="strong"
460
 
>foobar</emphasis
461
 
>. </para>
462
 
</sect2>
463
 
<sect2 id="add-user">
464
 
<title
465
 
>Adding a New User</title>
466
 
<para
467
 
>The <command
468
 
>adduser</command
469
 
> command is used to create a new user on the system. To create a new user, type: <screen
470
 
>adduser foobar</screen
471
 
> which will create a new user called <emphasis role="strong"
472
 
>foobar</emphasis
473
 
>. </para>
474
 
</sect2>
475
 
<sect2 id="passwd">
476
 
<title
477
 
>Add or Change a User Password</title>
478
 
<para
479
 
>The <command
480
 
>passwd</command
481
 
> command is used to assign a new password to a new user or to change the current password for an existing user. To add a password or change the password for the user <emphasis role="strong"
482
 
>foobar</emphasis
483
 
>, type: <screen
484
 
>passwd foobar</screen
485
 
> For new users, this will generate a prompt to enter the new password. For an existing user, there will be a prompt for the existing password before the prompt for a new password. </para>
486
 
</sect2>
487
 
<sect2 id="assign-user-group">
488
 
<title
489
 
>Assign User to Group</title>
490
 
<para
491
 
>To assign the user <emphasis role="strong"
492
 
>foobar</emphasis
493
 
> to the group <emphasis role="strong"
494
 
>barfoo</emphasis
495
 
>, type: <screen
496
 
>adduser foobar barfoo</screen>
497
 
</para>
498
 
</sect2>
499
 
</sect1>
500
 
 
501
 
<!-- OPTIONS -->
502
 
<sect1 id="options">
503
 
<title
504
 
>Options</title>
505
 
<para
506
 
>The default behavior for a command may usually be modified by adding <command
507
 
>--option</command
508
 
> to the command. For example, the <link linkend="ls"
509
 
><command
510
 
>ls</command
511
 
></link
512
 
> command has an <command
513
 
>-s</command
514
 
> option. The <command
515
 
>ls -s</command
516
 
> will include file sizes in the listing. There is also a <command
517
 
>-h</command
518
 
> option to display file sizes in a <quote
519
 
>human readable</quote
520
 
> format. </para>
521
 
<para
522
 
>Options can be grouped in clusters, so <screen
523
 
>ls -sh</screen
524
 
> is the same command as <screen
525
 
> ls -s -h</screen
526
 
> Most options have a long version, prefixed with two dashes instead of one, so <screen
527
 
>ls --size --human-readable</screen
528
 
> is also the same command as <screen
529
 
>ls -sh</screen>
530
 
</para>
531
 
</sect1>
532
 
 
533
 
<!-- MANPAGES AND GETTING HELP -->
534
 
<sect1 id="man-help">
535
 
<title
536
 
><quote
537
 
>Man</quote
538
 
> and Getting Help</title>
539
 
<para
540
 
><emphasis role="strong"
541
 
><emphasis
542
 
>command</emphasis
543
 
> --help</emphasis
544
 
> and <command
545
 
>man</command
546
 
> <emphasis role="strong"
547
 
><emphasis
548
 
>command</emphasis
549
 
></emphasis
550
 
> are the two most important tools at the command line. </para>
551
 
<para
552
 
>Virtually all commands understand the <command
553
 
>-h</command
554
 
> (or <command
555
 
>--help</command
556
 
>) option which will produce a short usage description of the command and its options, then exit back to the command prompt. Type: <screen
557
 
>man -h</screen
558
 
> or <screen
559
 
>man --help</screen
560
 
> to see this in action. </para>
561
 
<para
562
 
>Every command and nearly every application in Linux has a <abbrev
563
 
>man</abbrev
564
 
> (manual) file. It is as simple as typing <command
565
 
>man command</command
566
 
> to bring up a longer manual entry for the specified command. For example: <screen
567
 
>man mv</screen
568
 
> brings up the <command
569
 
>mv</command
570
 
> manual. </para>
571
 
<para
572
 
>Move up and down the man file with the arrow keys, and quit back to the command prompt with <keycap
573
 
>q</keycap
574
 
>. </para>
575
 
<para>
576
 
<screen
577
 
>man man</screen>
578
 
brings up the manual entry for the <command
579
 
>man</command
580
 
> command, which is a good place to start. </para>
581
 
<para>
582
 
<screen
583
 
>man intro</screen>
584
 
is especially useful. It displays the <quote
585
 
>introduction to user commands</quote
586
 
> which is a well-written, brief introduction to the Linux command line. </para>
587
 
<para
588
 
>There are also <command
589
 
>info</command
590
 
> pages, which generally go into more detail than <command
591
 
>man</command
592
 
> pages. Try: <screen
593
 
>info info</screen
594
 
> for the introduction to info pages. </para>
595
 
<sect2 id="searching-for-man-files">
596
 
<title
597
 
>Searching for man files</title>
598
 
<para
599
 
>If you aren't sure which command or application you need to use, you can search the <command
600
 
>man</command
601
 
> files. </para>
602
 
<para
603
 
>To search the <command
604
 
>man</command
605
 
> files for <command
606
 
>konsole</command
607
 
>, try: <screen
608
 
>man -k konsole</screen>
609
 
</para>
610
 
<note>
611
 
<para
612
 
>This is the same as the <command
613
 
>apropos</command
614
 
> command. </para>
615
 
</note>
616
 
<para
617
 
>To search only the titles of your system's <command
618
 
>man</command
619
 
> files, try: <screen
620
 
>man -f kde</screen>
621
 
</para>
622
 
<note>
623
 
<para
624
 
>This is the same as the <command
625
 
>whatis</command
626
 
> command. </para>
627
 
</note>
628
 
</sect2>
629
 
</sect1>
630
 
 
631
 
<!-- CUTTING AND PASTING -->
632
 
<sect1 id="cut-and-paste">
633
 
<title
634
 
>Cutting and Pasting</title>
635
 
<para
636
 
>There are often situations that require text to be pasted into the terminal. </para>
637
 
<para
638
 
>Text copied from a web page using <keycombo
639
 
><keycap
640
 
>Ctrl</keycap
641
 
><keycap
642
 
>C</keycap
643
 
></keycombo
644
 
> won't paste with <keycombo
645
 
><keycap
646
 
>Ctrl</keycap
647
 
><keycap
648
 
>V</keycap
649
 
></keycombo
650
 
> as it does in other applications because the terminal uses a different combination for paste, <keycombo
651
 
><keycap
652
 
>Shift</keycap
653
 
><keycap
654
 
>Insert</keycap
655
 
></keycombo
656
 
>. Pasting can also be done using the mouse by <mousebutton
657
 
>right-clicking</mousebutton
658
 
> in the terminal and selecting <guimenuitem
659
 
>Paste</guimenuitem
660
 
> from the menu. </para>
661
 
<para
662
 
>Text can also be copied by selecting (highlighting) the text to be copied. Clicking the <mousebutton
663
 
>middle</mousebutton
664
 
> button on the mouse (or both buttons simultaneously on a two-button mouse) in the terminal pastes the selected text. </para>
665
 
<note>
666
 
<para
667
 
>These actions may work differently in other terminal emulators than <application
668
 
>Konsole</application
669
 
>. Consult your terminal emulator's documentation for details. </para>
670
 
</note>
671
 
</sect1>
672
 
 
673
 
<!-- TIPS -->
674
 
<sect1 id="tips">
675
 
<title
676
 
>Tips</title>
677
 
<variablelist
678
 
><title
679
 
>Save on Typing</title>
680
 
<varlistentry>
681
 
<term
682
 
><keycap
683
 
>Up Arrow</keycap
684
 
> or <keycombo
685
 
><keycap
686
 
>Ctrl</keycap
687
 
><keycap
688
 
>p</keycap
689
 
></keycombo
690
 
> </term>
691
 
<listitem>
692
 
<para
693
 
>Scrolls backwards through the commands entered previously </para>
694
 
</listitem>
695
 
</varlistentry>
696
 
<varlistentry>
697
 
<term
698
 
><keycap
699
 
>Down Arrow</keycap
700
 
> or <keycombo
701
 
><keycap
702
 
>Ctrl</keycap
703
 
><keycap
704
 
>n</keycap
705
 
></keycombo
706
 
> </term>
707
 
<listitem>
708
 
<para
709
 
>Scrolls forward through previous commands </para>
710
 
</listitem>
711
 
</varlistentry>
712
 
<varlistentry>
713
 
<term>
714
 
<keycap
715
 
>Enter</keycap>
716
 
</term>
717
 
<listitem>
718
 
<para
719
 
>Executes the command selected </para>
720
 
</listitem>
721
 
</varlistentry>
722
 
<varlistentry>
723
 
<term>
724
 
<keycap
725
 
>Tab</keycap>
726
 
</term>
727
 
<listitem>
728
 
<para
729
 
>Tab is a useful feature. It autocompletes any commands or filenames if there is one option, otherwise it displays a list of options that fit the information entered. Using tab in this way reduces typing errors. </para>
730
 
</listitem>
731
 
</varlistentry>
732
 
</variablelist>
733
 
 
734
 
<variablelist
735
 
><title
736
 
>Change the Text</title>
737
 
<note>
738
 
<para
739
 
>The mouse won't work to position the cursor in a command line entry. Use the <keycap
740
 
>Left Arrow</keycap
741
 
> or the <keycap
742
 
>Right Arrow</keycap
743
 
> keys to move within the line. </para>
744
 
</note>
745
 
<note>
746
 
<para
747
 
>Typing at the cursor <emphasis
748
 
>inserts</emphasis
749
 
> text there. It doesn't overwrite what is already there. </para>
750
 
</note>
751
 
<varlistentry>
752
 
<term
753
 
><keycombo
754
 
><keycap
755
 
>Ctrl</keycap
756
 
><keycap
757
 
>a</keycap
758
 
></keycombo
759
 
> or <keycap
760
 
>Home</keycap
761
 
> </term>
762
 
<listitem>
763
 
<para
764
 
>Moves the cursor to the <emphasis
765
 
>start</emphasis
766
 
> of the line </para>
767
 
</listitem>
768
 
</varlistentry>
769
 
<varlistentry>
770
 
<term
771
 
><keycombo
772
 
><keycap
773
 
>Ctrl</keycap
774
 
><keycap
775
 
>e</keycap
776
 
></keycombo
777
 
> or <keycap
778
 
>End</keycap
779
 
> </term>
780
 
<listitem>
781
 
<para
782
 
>Moves the cursor to the <emphasis
783
 
>end</emphasis
784
 
> of the line </para>
785
 
</listitem>
786
 
</varlistentry>
787
 
<varlistentry>
788
 
<term>
789
 
<keycombo
790
 
><keycap
791
 
>Ctrl</keycap
792
 
><keycap
793
 
>k</keycap
794
 
></keycombo>
795
 
</term>
796
 
<listitem>
797
 
<para
798
 
>Deletes from the current cursor position to the end of the line </para>
799
 
</listitem>
800
 
</varlistentry>
801
 
<varlistentry>
802
 
<term>
803
 
<keycombo
804
 
><keycap
805
 
>Ctrl</keycap
806
 
><keycap
807
 
>u</keycap
808
 
></keycombo>
809
 
</term>
810
 
<listitem>
811
 
<para
812
 
>Deletes the entire current line </para>
813
 
</listitem>
814
 
</varlistentry>
815
 
<varlistentry>
816
 
<term>
817
 
<keycombo
818
 
><keycap
819
 
>Ctrl</keycap
820
 
><keycap
821
 
>w</keycap
822
 
></keycombo>
823
 
</term>
824
 
<listitem>
825
 
<para
826
 
>Deletes the word before the cursor </para>
827
 
</listitem>
828
 
</varlistentry>
829
 
</variablelist>
830
 
</sect1>
831
 
 
832
 
<!-- MORE INFORMATION -->
833
 
<sect1 id="more-information">
834
 
<title
835
 
>More Information</title>
836
 
<para
837
 
>The following online guides are available: </para>
838
 
<itemizedlist>
839
 
<listitem>
840
 
<para
841
 
><ulink url="https://help.ubuntu.com/community/AptGetHowto"
842
 
>AptGetHowto</ulink
843
 
> - using <command
844
 
>apt-get</command
845
 
> to install packages from the command line. </para>
846
 
</listitem>
847
 
<listitem>
848
 
<para
849
 
><ulink url="https://help.ubuntu.com/community/Repositories/CommandLine"
850
 
>Commandline Repository Editing</ulink
851
 
> - managing software repositories through the command line. </para>
852
 
</listitem>
853
 
<listitem>
854
 
<para
855
 
><ulink url="https://help.ubuntu.com/community/grep"
856
 
><command
857
 
>grep</command
858
 
> Howto</ulink
859
 
> - <command
860
 
>grep</command
861
 
> is a powerful command line search tool. </para>
862
 
</listitem>
863
 
<listitem>
864
 
<para
865
 
><ulink url="https://help.ubuntu.com/community/find"
866
 
><command
867
 
>find</command
868
 
></ulink
869
 
> - locate files from the command line. </para>
870
 
</listitem>
871
 
<listitem>
872
 
<para
873
 
><ulink url="https://help.ubuntu.com/community/CommandlineHowto"
874
 
>Commandline Howto</ulink
875
 
> - longer and more complete than this basic guide; still not finished however. </para>
876
 
</listitem>
877
 
<listitem>
878
 
<para
879
 
><ulink url="https://help.ubuntu.com/community/HowToReadline"
880
 
>Howto Readline</ulink
881
 
> - information on more advanced customization for the command line. </para>
882
 
</listitem>
883
 
</itemizedlist>
884
 
<para
885
 
>For more detailed tutorials on the Linux command line, please see: </para>
886
 
<itemizedlist>
887
 
<listitem>
888
 
<para
889
 
><ulink url="http://ss64.com/bash/"
890
 
></ulink
891
 
> - an A-Z index of the Bash command line for Linux. </para>
892
 
</listitem>
893
 
<listitem>
894
 
<para
895
 
><ulink url="http://linuxcommand.org/"
896
 
></ulink
897
 
> - basic <acronym
898
 
>BASH</acronym
899
 
> tutorials, including <acronym
900
 
>BASH</acronym
901
 
> scripting. </para>
902
 
</listitem>
903
 
<listitem>
904
 
<para
905
 
><ulink url="http://linuxsurvival.com/index.php"
906
 
></ulink
907
 
> - Java-based tutorials. </para>
908
 
</listitem>
909
 
<listitem>
910
 
<para
911
 
><ulink url="http://rute.2038bug.com/index.html.gz"
912
 
></ulink
913
 
> - a massive online book about system administration, almost all from the command line. </para>
914
 
</listitem>
915
 
<listitem>
916
 
<para
917
 
><ulink url="http://www.commandlinefu.com/"
918
 
></ulink
919
 
> - a place to record command-line favorites and view other's gems as well. </para>
920
 
</listitem>
921
 
</itemizedlist>
922
 
</sect1>
923
 
 
924
 
</article>
925
 
<!--
926
 
Local Variables:
927
 
mode: xml
928
 
sgml-minimize-attributes:nil
929
 
sgml-general-insert-case:lower
930
 
sgml-indent-step:0
931
 
sgml-indent-data:nil
932
 
End:
933
 
 
934
 
vim: tabstop=2:shiftwidth=2:expandtab:indentexpr=:tw=80:
935
 
kate: space-indent on; indent-width 2; tab-width 2; indent-mode none;
936
 
-->