xref: /openbsd-src/share/man/man1/help.1 (revision cb39b41371628601fbe4c618205356d538b9d08a)
1.\"	$OpenBSD: help.1,v 1.1 2015/03/27 01:59:26 schwarze Exp $
2.\"
3.\" Copyright (c) 1999 Aaron Campbell
4.\" All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\"
10.\" 1. Redistributions of source code must retain the above copyright
11.\"    notice, this list of conditions and the following disclaimer.
12.\" 2. Redistributions in binary form must reproduce the above copyright
13.\"    notice, this list of conditions and the following disclaimer in the
14.\"    documentation and/or other materials provided with the distribution.
15.\"
16.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
17.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
19.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26.\"
27.Dd $Mdocdate: March 27 2015 $
28.Dt HELP 1
29.Os
30.Sh NAME
31.Nm help
32.Nd help for new users and administrators
33.Sh DESCRIPTION
34This document is meant to familiarize new users and system administrators with
35.Ox
36and, if necessary,
37.Ux
38in general.
39.Pp
40Firstly, a wealth of information is contained within the system manual pages.
41In
42.Ux ,
43the
44.Xr man 1
45command is used to view them.
46Type
47.Ic man man
48for instructions on how to use it properly.
49Pay especially close attention to the
50.Fl k
51option.
52.Pp
53Other
54.Ox
55references include the FAQ (Frequently Asked Questions) located at
56.Lk http://www.openbsd.org/faq ,
57which is mostly intended for administrators and assumes the reader possesses
58a working knowledge of
59.Ux .
60There are also mailing lists in place where questions are fielded by
61.Ox
62developers and other users; see
63.Lk http://www.openbsd.org/mail.html .
64.Pp
65System administrators should have already read the
66.Xr afterboot 8
67man page which explains a variety of tasks that are typically performed
68after the first system boot.
69When configuring any aspect of the system, first consider any possible security
70implications your changes may have.
71.Ss The Unix shell
72After logging in, some system messages are typically displayed, and then the
73user is able to enter commands to be processed by the shell program.
74The shell is a command-line interpreter that reads user input (normally from
75a terminal) and executes commands.
76There are many different shells available;
77.Ox
78ships with
79.Xr csh 1 ,
80.Xr ksh 1 ,
81and
82.Xr sh 1 .
83Each user's shell is indicated by the last field of their corresponding entry
84in the system password file
85.Pf ( Pa /etc/passwd ) .
86.Ss Basic Unix commands
87.Bl -tag -width "chmodXXX"
88.It Cm man
89Interface to the system manual pages.
90For any of the commands listed below, type
91.Ic man <command>
92for detailed information on what it does and how to use it.
93.It Cm pwd
94Print working directory.
95Files are organized in a hierarchy (see
96.Xr hier 7 )
97called a tree.
98This command will indicate in which directory you are currently located.
99.It Cm cd
100Change working directory.
101Use this command to navigate throughout the file hierarchy.
102For example, type
103.Ic cd /
104to change the working directory to the root.
105.It Cm ls
106List directory contents.
107Type
108.Ic ls -l
109for a detailed listing.
110.It Cm cat
111Although it has many more uses,
112.Ic cat filename
113will print the contents of a plain-text file to the screen.
114.It Cm mkdir
115Make a directory.
116For example,
117.Ic mkdir foobar .
118.It Cm rmdir
119Remove a directory.
120.It Cm rm
121Remove files.
122Files are generally only removable by their owners.
123See the
124.Xr chmod 1
125command for information on file permissions.
126.It Cm chmod
127Change file modes, including permissions.
128It is not immediately obvious how to use this command; please read its manual
129page carefully, as proper file permissions, especially on system files, are
130vital in maintaining security and integrity.
131.It Cm cp
132Copy files.
133.It Cm mv
134Move and rename files.
135.It Cm ps
136List active processes.
137Most
138.Ux Ns -based
139operating systems, including
140.Ox ,
141are multitasking, meaning many programs share system resources at the same
142time.
143A common usage is
144.Ic ps -auxw ,
145which will display information about all active processes.
146.It Cm kill
147Kill processes.
148Used mostly for terminating run-away/unresponsive programs, but also used to
149signal programs for requesting certain operations (e.g., re-read their
150configuration).
151.It Cm date
152Print the current system date and time.
153.It Cm mail
154Access mailbox.
155.It Cm exit
156Log out of the system.
157.El
158.Pp
159When a command is entered, it is first checked to see if it is built-in to the
160shell.
161If not, the shell looks for the command in any directories contained within the
162.Ev PATH
163environment variable (see
164.Xr environ 7 ) .
165If the command is not found, an error message is printed.
166Otherwise, the shell runs the command, passing it any arguments specified on
167the command line.
168.Pp
169Shell built-in commands do not have their own manual page,
170so it's necessary to read the manual page for the user's shell.
171Tools such as
172.Xr which 1
173and
174.Dq whence ,
175a
176.Xr ksh 1
177built-in command,
178can be used to see what commands are being executed.
179.Sh SEE ALSO
180.Xr csh 1 ,
181.Xr ksh 1 ,
182.Xr man 1 ,
183.Xr whatis 1 ,
184.Xr whereis 1 ,
185.Xr which 1 ,
186.Xr afterboot 8
187.Sh HISTORY
188This manual page was written by
189.An Aaron Campbell Aq Mt aaron@openbsd.org
190and first appeared in
191.Ox 2.6 .
192