1.\" $OpenBSD: help.1,v 1.4 2017/07/13 08:29:36 jca 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: July 13 2017 $ 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 https://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 https://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 Ar 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 Ar filename 113will print the contents of a plain-text file to the screen. 114.It Cm vi 115Edit text files. 116For example, 117.Ic vi Ar filename . 118See also 119.Xr mg 1 . 120.It Cm mkdir 121Make a directory. 122For example, 123.Ic mkdir Ar dirname . 124.It Cm rmdir 125Remove a directory. 126.It Cm rm 127Remove files. 128Files are generally only removable by their owners. 129See the 130.Xr chmod 1 131command for information on file permissions. 132.It Cm chmod 133Change file modes, including permissions. 134It is not immediately obvious how to use this command; please read its manual 135page carefully, as proper file permissions, especially on system files, are 136vital in maintaining security and integrity. 137.It Cm cp 138Copy files. 139.It Cm mv 140Move and rename files. 141.It Cm ps 142List active processes. 143Most 144.Ux Ns -based 145operating systems, including 146.Ox , 147are multitasking, meaning many programs share system resources at the same 148time. 149A common usage is 150.Ic ps -auxw , 151which will display information about all active processes. 152.It Cm kill 153Kill processes. 154Used mostly for terminating run-away/unresponsive programs, but also used to 155signal programs for requesting certain operations (e.g., re-read their 156configuration). 157.It Cm date 158Print the current system date and time. 159.It Cm mail 160Access mailbox. 161.It Cm exit 162Log out of the system. 163.El 164.Pp 165When a command is entered, it is first checked to see if it is built-in to the 166shell. 167If not, the shell looks for the command in any directories contained within the 168.Ev PATH 169environment variable (see 170.Xr environ 7 ) . 171If the command is not found, an error message is printed. 172Otherwise, the shell runs the command, passing it any arguments specified on 173the command line. 174.Pp 175Shell built-in commands do not have their own manual page, 176so it's necessary to read the manual page for the user's shell. 177Tools such as 178.Xr which 1 179and 180.Dq whence , 181a 182.Xr ksh 1 183built-in command, 184can be used to see what commands are being executed. 185.Sh SEE ALSO 186.Xr csh 1 , 187.Xr ksh 1 , 188.Xr man 1 , 189.Xr whatis 1 , 190.Xr whereis 1 , 191.Xr which 1 , 192.Xr afterboot 8 193.Sh HISTORY 194This manual page was written by 195.An Aaron Campbell Aq Mt aaron@openbsd.org 196and first appeared in 197.Ox 2.6 . 198