help.1 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  1. .\" $OpenBSD: help.1,v 1.3 2016/09/02 12:17:32 tb 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: September 2 2016 $
  28. .Dt HELP 1
  29. .Os
  30. .Sh NAME
  31. .Nm help
  32. .Nd help for new users and administrators
  33. .Sh DESCRIPTION
  34. This document is meant to familiarize new users and system administrators with
  35. LibertyBSD
  36. and, if necessary,
  37. .Ux
  38. in general.
  39. .Pp
  40. Firstly, a wealth of information is contained within the system manual pages.
  41. In
  42. .Ux ,
  43. the
  44. .Xr man 1
  45. command is used to view them.
  46. Type
  47. .Ic man man
  48. for instructions on how to use it properly.
  49. Pay especially close attention to the
  50. .Fl k
  51. option.
  52. .Pp
  53. System administrators should have already read the
  54. .Xr afterboot 8
  55. man page which explains a variety of tasks that are typically performed
  56. after the first system boot.
  57. When configuring any aspect of the system, first consider any possible security
  58. implications your changes may have.
  59. .Ss The Unix shell
  60. After logging in, some system messages are typically displayed, and then the
  61. user is able to enter commands to be processed by the shell program.
  62. The shell is a command-line interpreter that reads user input (normally from
  63. a terminal) and executes commands.
  64. There are many different shells available;
  65. LibertyBSD
  66. ships with
  67. .Xr csh 1 ,
  68. .Xr ksh 1 ,
  69. and
  70. .Xr sh 1 .
  71. Each user's shell is indicated by the last field of their corresponding entry
  72. in the system password file
  73. .Pf ( Pa /etc/passwd ) .
  74. .Ss Basic Unix commands
  75. .Bl -tag -width "chmodXXX"
  76. .It Cm man
  77. Interface to the system manual pages.
  78. For any of the commands listed below, type
  79. .Ic man Ar command
  80. for detailed information on what it does and how to use it.
  81. .It Cm pwd
  82. Print working directory.
  83. Files are organized in a hierarchy (see
  84. .Xr hier 7 )
  85. called a tree.
  86. This command will indicate in which directory you are currently located.
  87. .It Cm cd
  88. Change working directory.
  89. Use this command to navigate throughout the file hierarchy.
  90. For example, type
  91. .Ic cd /
  92. to change the working directory to the root.
  93. .It Cm ls
  94. List directory contents.
  95. Type
  96. .Ic ls -l
  97. for a detailed listing.
  98. .It Cm cat
  99. Although it has many more uses,
  100. .Ic cat Ar filename
  101. will print the contents of a plain-text file to the screen.
  102. .It Cm vi
  103. Edit text files.
  104. For example,
  105. .Ic vi Ar filename .
  106. See also
  107. .Xr mg 1 .
  108. .It Cm mkdir
  109. Make a directory.
  110. For example,
  111. .Ic mkdir Ar dirname .
  112. .It Cm rmdir
  113. Remove a directory.
  114. .It Cm rm
  115. Remove files.
  116. Files are generally only removable by their owners.
  117. See the
  118. .Xr chmod 1
  119. command for information on file permissions.
  120. .It Cm chmod
  121. Change file modes, including permissions.
  122. It is not immediately obvious how to use this command; please read its manual
  123. page carefully, as proper file permissions, especially on system files, are
  124. vital in maintaining security and integrity.
  125. .It Cm cp
  126. Copy files.
  127. .It Cm mv
  128. Move and rename files.
  129. .It Cm ps
  130. List active processes.
  131. Most
  132. .Ux Ns -based
  133. operating systems, including
  134. LibertyBSD,
  135. are multitasking, meaning many programs share system resources at the same
  136. time.
  137. A common usage is
  138. .Ic ps -auxw ,
  139. which will display information about all active processes.
  140. .It Cm kill
  141. Kill processes.
  142. Used mostly for terminating run-away/unresponsive programs, but also used to
  143. signal programs for requesting certain operations (e.g., re-read their
  144. configuration).
  145. .It Cm date
  146. Print the current system date and time.
  147. .It Cm mail
  148. Access mailbox.
  149. .It Cm exit
  150. Log out of the system.
  151. .El
  152. .Pp
  153. When a command is entered, it is first checked to see if it is built-in to the
  154. shell.
  155. If not, the shell looks for the command in any directories contained within the
  156. .Ev PATH
  157. environment variable (see
  158. .Xr environ 7 ) .
  159. If the command is not found, an error message is printed.
  160. Otherwise, the shell runs the command, passing it any arguments specified on
  161. the command line.
  162. .Pp
  163. Shell built-in commands do not have their own manual page,
  164. so it's necessary to read the manual page for the user's shell.
  165. Tools such as
  166. .Xr which 1
  167. and
  168. .Dq whence ,
  169. a
  170. .Xr ksh 1
  171. built-in command,
  172. can be used to see what commands are being executed.
  173. .Sh SEE ALSO
  174. .Xr csh 1 ,
  175. .Xr ksh 1 ,
  176. .Xr man 1 ,
  177. .Xr whatis 1 ,
  178. .Xr whereis 1 ,
  179. .Xr which 1 ,
  180. .Xr afterboot 8
  181. .Sh HISTORY
  182. This manual page was written by
  183. .An Aaron Campbell Aq Mt aaron@openbsd.org
  184. and first appeared in
  185. .Ox 2.6 .