xref: /openbsd-src/share/man/man1/help.1 (revision 95529bf2e394ae219358fcac6abc509fc63f6b34)
1*95529bf2Sjca.\"	$OpenBSD: help.1,v 1.4 2017/07/13 08:29:36 jca Exp $
262a9e408Sschwarze.\"
362a9e408Sschwarze.\" Copyright (c) 1999 Aaron Campbell
462a9e408Sschwarze.\" All rights reserved.
562a9e408Sschwarze.\"
662a9e408Sschwarze.\" Redistribution and use in source and binary forms, with or without
762a9e408Sschwarze.\" modification, are permitted provided that the following conditions
862a9e408Sschwarze.\" are met:
962a9e408Sschwarze.\"
1062a9e408Sschwarze.\" 1. Redistributions of source code must retain the above copyright
1162a9e408Sschwarze.\"    notice, this list of conditions and the following disclaimer.
1262a9e408Sschwarze.\" 2. Redistributions in binary form must reproduce the above copyright
1362a9e408Sschwarze.\"    notice, this list of conditions and the following disclaimer in the
1462a9e408Sschwarze.\"    documentation and/or other materials provided with the distribution.
1562a9e408Sschwarze.\"
1662a9e408Sschwarze.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
1762a9e408Sschwarze.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
1862a9e408Sschwarze.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
1962a9e408Sschwarze.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
2062a9e408Sschwarze.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
2162a9e408Sschwarze.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2262a9e408Sschwarze.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2362a9e408Sschwarze.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2462a9e408Sschwarze.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
2562a9e408Sschwarze.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2662a9e408Sschwarze.\"
27*95529bf2Sjca.Dd $Mdocdate: July 13 2017 $
2862a9e408Sschwarze.Dt HELP 1
2962a9e408Sschwarze.Os
3062a9e408Sschwarze.Sh NAME
3162a9e408Sschwarze.Nm help
3262a9e408Sschwarze.Nd help for new users and administrators
3362a9e408Sschwarze.Sh DESCRIPTION
3462a9e408SschwarzeThis document is meant to familiarize new users and system administrators with
3562a9e408Sschwarze.Ox
3662a9e408Sschwarzeand, if necessary,
3762a9e408Sschwarze.Ux
3862a9e408Sschwarzein general.
3962a9e408Sschwarze.Pp
4062a9e408SschwarzeFirstly, a wealth of information is contained within the system manual pages.
4162a9e408SschwarzeIn
4262a9e408Sschwarze.Ux ,
4362a9e408Sschwarzethe
4462a9e408Sschwarze.Xr man 1
4562a9e408Sschwarzecommand is used to view them.
4662a9e408SschwarzeType
4762a9e408Sschwarze.Ic man man
4862a9e408Sschwarzefor instructions on how to use it properly.
4962a9e408SschwarzePay especially close attention to the
5062a9e408Sschwarze.Fl k
5162a9e408Sschwarzeoption.
5262a9e408Sschwarze.Pp
5362a9e408SschwarzeOther
5462a9e408Sschwarze.Ox
5562a9e408Sschwarzereferences include the FAQ (Frequently Asked Questions) located at
56*95529bf2Sjca.Lk https://www.openbsd.org/faq/ ,
5762a9e408Sschwarzewhich is mostly intended for administrators and assumes the reader possesses
5862a9e408Sschwarzea working knowledge of
5962a9e408Sschwarze.Ux .
6062a9e408SschwarzeThere are also mailing lists in place where questions are fielded by
6162a9e408Sschwarze.Ox
6262a9e408Sschwarzedevelopers and other users; see
633b5157d9Stb.Lk https://www.openbsd.org/mail.html .
6462a9e408Sschwarze.Pp
6562a9e408SschwarzeSystem administrators should have already read the
6662a9e408Sschwarze.Xr afterboot 8
6762a9e408Sschwarzeman page which explains a variety of tasks that are typically performed
6862a9e408Sschwarzeafter the first system boot.
6962a9e408SschwarzeWhen configuring any aspect of the system, first consider any possible security
7062a9e408Sschwarzeimplications your changes may have.
7162a9e408Sschwarze.Ss The Unix shell
7262a9e408SschwarzeAfter logging in, some system messages are typically displayed, and then the
7362a9e408Sschwarzeuser is able to enter commands to be processed by the shell program.
7462a9e408SschwarzeThe shell is a command-line interpreter that reads user input (normally from
7562a9e408Sschwarzea terminal) and executes commands.
7662a9e408SschwarzeThere are many different shells available;
7762a9e408Sschwarze.Ox
7862a9e408Sschwarzeships with
7962a9e408Sschwarze.Xr csh 1 ,
8062a9e408Sschwarze.Xr ksh 1 ,
8162a9e408Sschwarzeand
8262a9e408Sschwarze.Xr sh 1 .
8362a9e408SschwarzeEach user's shell is indicated by the last field of their corresponding entry
8462a9e408Sschwarzein the system password file
8562a9e408Sschwarze.Pf ( Pa /etc/passwd ) .
8662a9e408Sschwarze.Ss Basic Unix commands
8762a9e408Sschwarze.Bl -tag -width "chmodXXX"
8862a9e408Sschwarze.It Cm man
8962a9e408SschwarzeInterface to the system manual pages.
9062a9e408SschwarzeFor any of the commands listed below, type
9104c0846fSjmc.Ic man Ar command
9262a9e408Sschwarzefor detailed information on what it does and how to use it.
9362a9e408Sschwarze.It Cm pwd
9462a9e408SschwarzePrint working directory.
9562a9e408SschwarzeFiles are organized in a hierarchy (see
9662a9e408Sschwarze.Xr hier 7 )
9762a9e408Sschwarzecalled a tree.
9862a9e408SschwarzeThis command will indicate in which directory you are currently located.
9962a9e408Sschwarze.It Cm cd
10062a9e408SschwarzeChange working directory.
10162a9e408SschwarzeUse this command to navigate throughout the file hierarchy.
10262a9e408SschwarzeFor example, type
10362a9e408Sschwarze.Ic cd /
10462a9e408Sschwarzeto change the working directory to the root.
10562a9e408Sschwarze.It Cm ls
10662a9e408SschwarzeList directory contents.
10762a9e408SschwarzeType
10862a9e408Sschwarze.Ic ls -l
10962a9e408Sschwarzefor a detailed listing.
11062a9e408Sschwarze.It Cm cat
11162a9e408SschwarzeAlthough it has many more uses,
11204c0846fSjmc.Ic cat Ar filename
11362a9e408Sschwarzewill print the contents of a plain-text file to the screen.
11404c0846fSjmc.It Cm vi
11504c0846fSjmcEdit text files.
11604c0846fSjmcFor example,
11704c0846fSjmc.Ic vi Ar filename .
11804c0846fSjmcSee also
11904c0846fSjmc.Xr mg 1 .
12062a9e408Sschwarze.It Cm mkdir
12162a9e408SschwarzeMake a directory.
12262a9e408SschwarzeFor example,
12304c0846fSjmc.Ic mkdir Ar dirname .
12462a9e408Sschwarze.It Cm rmdir
12562a9e408SschwarzeRemove a directory.
12662a9e408Sschwarze.It Cm rm
12762a9e408SschwarzeRemove files.
12862a9e408SschwarzeFiles are generally only removable by their owners.
12962a9e408SschwarzeSee the
13062a9e408Sschwarze.Xr chmod 1
13162a9e408Sschwarzecommand for information on file permissions.
13262a9e408Sschwarze.It Cm chmod
13362a9e408SschwarzeChange file modes, including permissions.
13462a9e408SschwarzeIt is not immediately obvious how to use this command; please read its manual
13562a9e408Sschwarzepage carefully, as proper file permissions, especially on system files, are
13662a9e408Sschwarzevital in maintaining security and integrity.
13762a9e408Sschwarze.It Cm cp
13862a9e408SschwarzeCopy files.
13962a9e408Sschwarze.It Cm mv
14062a9e408SschwarzeMove and rename files.
14162a9e408Sschwarze.It Cm ps
14262a9e408SschwarzeList active processes.
14362a9e408SschwarzeMost
14462a9e408Sschwarze.Ux Ns -based
14562a9e408Sschwarzeoperating systems, including
14662a9e408Sschwarze.Ox ,
14762a9e408Sschwarzeare multitasking, meaning many programs share system resources at the same
14862a9e408Sschwarzetime.
14962a9e408SschwarzeA common usage is
15062a9e408Sschwarze.Ic ps -auxw ,
15162a9e408Sschwarzewhich will display information about all active processes.
15262a9e408Sschwarze.It Cm kill
15362a9e408SschwarzeKill processes.
15462a9e408SschwarzeUsed mostly for terminating run-away/unresponsive programs, but also used to
15562a9e408Sschwarzesignal programs for requesting certain operations (e.g., re-read their
15662a9e408Sschwarzeconfiguration).
15762a9e408Sschwarze.It Cm date
15862a9e408SschwarzePrint the current system date and time.
15962a9e408Sschwarze.It Cm mail
16062a9e408SschwarzeAccess mailbox.
16162a9e408Sschwarze.It Cm exit
16262a9e408SschwarzeLog out of the system.
16362a9e408Sschwarze.El
16462a9e408Sschwarze.Pp
16562a9e408SschwarzeWhen a command is entered, it is first checked to see if it is built-in to the
16662a9e408Sschwarzeshell.
16762a9e408SschwarzeIf not, the shell looks for the command in any directories contained within the
16862a9e408Sschwarze.Ev PATH
16962a9e408Sschwarzeenvironment variable (see
17062a9e408Sschwarze.Xr environ 7 ) .
17162a9e408SschwarzeIf the command is not found, an error message is printed.
17262a9e408SschwarzeOtherwise, the shell runs the command, passing it any arguments specified on
17362a9e408Sschwarzethe command line.
17462a9e408Sschwarze.Pp
17562a9e408SschwarzeShell built-in commands do not have their own manual page,
17662a9e408Sschwarzeso it's necessary to read the manual page for the user's shell.
17762a9e408SschwarzeTools such as
17862a9e408Sschwarze.Xr which 1
17962a9e408Sschwarzeand
18062a9e408Sschwarze.Dq whence ,
18162a9e408Sschwarzea
18262a9e408Sschwarze.Xr ksh 1
18362a9e408Sschwarzebuilt-in command,
18462a9e408Sschwarzecan be used to see what commands are being executed.
18562a9e408Sschwarze.Sh SEE ALSO
18662a9e408Sschwarze.Xr csh 1 ,
18762a9e408Sschwarze.Xr ksh 1 ,
18862a9e408Sschwarze.Xr man 1 ,
18962a9e408Sschwarze.Xr whatis 1 ,
19062a9e408Sschwarze.Xr whereis 1 ,
19162a9e408Sschwarze.Xr which 1 ,
19262a9e408Sschwarze.Xr afterboot 8
19362a9e408Sschwarze.Sh HISTORY
19462a9e408SschwarzeThis manual page was written by
19562a9e408Sschwarze.An Aaron Campbell Aq Mt aaron@openbsd.org
19662a9e408Sschwarzeand first appeared in
19762a9e408Sschwarze.Ox 2.6 .
198