chiark / gitweb /
finalise changelog
[bash.git] / debian / README.commands
1    This is a jumping-off reference point for new users who may be
2    completely unfamiliar with Linux commands. It does not contain all
3    the information you need about using the Linux console, but instead
4    just gives you enough information to get started finding the
5    information you need.
6
7 Linux Commands
8
9    To run a command, type the command at the prompt, followed by any
10    necessary options, and then press the Enter or Return key. 
11
12    Most commands operate silently unless they are specifically asked to
13    say what they are doing. If there is no error message, the command
14    should have worked.
15
16    The operation of most commands can be changed by putting command
17    options immediately after the command name. There are several styles
18    of options used, and you have to check the documentation for each
19    command to know what options it can take, and what they do.
20
21    Linux commands are case-sensitive, and almost always are all
22    lower-case. ls is a valid command; LS is not.
23
24    In most cases you can use the tab key to ask the command shell to
25    auto-complete the command, directory or filename you have started
26    to type. If a unique completion exists, the shell will type it. If
27    not, you can press tab a second time to obtain a list of the
28    possible auto-completions.
29
30 Commands for Reading Documentation
31
32    In the following command examples, the [ ] characters are not
33    typed, they mean that whatever is enclosed is optional. For
34    example, you can also start `info' without any subject at all.
35
36    When a given keyboard shortcut is preceded by ctrl- or alt- , that
37    means hold the control or alt key down, and type the given key
38    while holding it down (the same way you use the shift key). A
39    shorthand notation for ctrl- is ^ (^C means ctrl-C).
40
41    man subject
42           man shows the manual page on the command (use q or ctrl-C to
43           get out of it if it doesn't terminate at the end of the
44           text).
45
46    info [subject]
47           A lot of Debian Linux documentation is provided in info
48           format. This is similar to a hypertext format, in that you
49           can jump to other sections of the documentation by following
50           links embedded in the text. An info tutorial is available
51           within info, using ctrl-h followed by h. 
52
53    help [subject]
54           Use help for on-line help about the shell's built-in commands.
55           help by itself prints a list of subjects for which you can
56           ask for help.
57
58    pager filename
59           pager displays a plain text file one screen at a time.
60           Additional screens can be displayed by pressing the space
61           bar, and previous screens can be displayed by pressing the b
62           key. When finished viewing the help, press q to return to
63           the prompt.
64
65    Using -h --help with | pager
66           Most commands offer very brief built-in help by typing the
67           command followed by 
68
69             -h or --help
70          
71           If the help scrolls up beyond the top of the screen before 
72           you can read it, add 
73
74             | pager 
75
76           to the end of the command.
77
78    zmore document.gz
79           zmore is a document pager -- it displays the contents of
80           compressed documentation on your disk, one screenful at a
81           time. Compression is signified by filenames ending in .gz .
82
83    lynx [document]  or  lynx [directory]  or  lynx [url]
84           lynx is a text-based web browser. It can display documents
85           (plain-text, compressed, or html), directory listings, and
86           urls such as www.google.com. It does not display images.
87
88 Commands for Navigating Directories
89
90    pwd
91           Displays your current working directory. The p stands for
92           print, which is a carryover from when unix was designed,
93           before the advent of computer screens. Interactive computer
94           responses were printed on paper by a connected electric
95           typewriter instead of being displayed electronically.
96
97    cd [directory]
98           Change your current directory to the named directory. If you
99           don't specify directory, you will be returned to your home
100           directory. The `root' directory is signified by / at the
101           beginning of the directory path ( / also separates directory
102           and file names within the path). Thus paths beginning with /
103           are `absolute' paths; cd will take you to an absolute path
104           no matter what your current directory is. Paths not
105           beginning with / specify paths relative to your
106           current directory. cd .. means change to the parent
107           directory of your current working directory.
108
109    ls [directory]
110           ls lists the contents of directory. If you don't specify a
111           directory name, the current working directory's list is
112           displayed.
113
114    find directory -name filename
115           find tells you where filename is in the tree starting at
116           directory. This command has many other useful options.
117
118 Documentation Indices
119
120    The standard doc-linux-text package installs compressed text linux
121    HOWTOs in
122
123         /usr/share/doc/HOWTO/en-txt/
124
125    Particularly helpful HOWTOs for new users are
126
127         /usr/share/doc/HOWTO/en-txt/Unix-and-Internet-Fundamentals-HOWTO.gz
128         /usr/share/doc/HOWTO/en-txt/mini/INDEX.gz
129         /usr/share/doc/HOWTO/en-txt/Reading-List-HOWTO.gz
130         /usr/share/doc/HOWTO/en-txt/META-FAQ.gz        
131
132    Individual package documentation is installed in
133
134         /usr/share/doc/<package-name> 
135
136    New user website references include
137
138        http://www.debian.org/doc/FAQ
139        http://www.linuxdoc.org/LDP/gs/gs.html
140
141 Recording User Sessions
142
143    script filename
144           Use script to record everything that appears on the screen
145           (until the next exit) in filename. This is useful if you
146           need to record what's going on in order to include it in
147           your message when you ask for help. Use exit, logout or
148           ctrl-D to stop the recording session.
149
150 Turning Echo On/Off
151
152    To turn off echoing of characters to the screen, you can use
153    ctrl-S. ctrl-Q starts the echo again. If your terminal suddenly
154    seems to become unresponsive, try ctrl-Q; you may have accidentally
155    typed ctrl-S which activated echo-off.
156
157 Virtual Consoles
158
159    By default, six virtual consoles are provided. If you want to
160    execute another command without interrupting the operation of a
161    command you previously started, you can switch to another virtual
162    console (similar to a separate window). This is very handy for
163    displaying the documentation for a command in one console while
164    actually trying the command in another. Switch consoles 1 through 6
165    by using alt-F1 through alt-F6. 
166
167 Logging Out
168
169    exit   or   logout
170
171           Use exit or logout to terminate your session and log
172           out. You should be returned to the log-in prompt.
173
174 Turning Off the Computer
175
176    Turning the computer on and off is really a system administration
177    subject, but I include it here because it is something that every
178    user who is his own administrator needs to know.
179
180    halt   or   shutdown -t 0 -h now
181           This command shuts the computer down safely. You can also
182           use ctrl-alt-del if your system is set up for that. (If you
183           are in X, ctrl-alt-del will be intercepted by X. Get out of
184           X first by using ctrl-alt-backspace.)
185
186
187 To display this file one screen at a time, type 
188
189 pager /usr/share/doc/doc-linux-text/README.commands