diff --git a/documentation/content/en/books/fdp-primer/doc-build/_index.po b/documentation/content/en/books/fdp-primer/doc-build/_index.po index 81ef0896f6..406f5cdc09 100644 --- a/documentation/content/en/books/fdp-primer/doc-build/_index.po +++ b/documentation/content/en/books/fdp-primer/doc-build/_index.po @@ -1,1178 +1,1205 @@ # SOME DESCRIPTIVE TITLE # Copyright (C) YEAR The FreeBSD Project # This file is distributed under the same license as the FreeBSD Documentation package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: FreeBSD Documentation VERSION\n" -"POT-Creation-Date: 2023-01-21 20:00-0300\n" +"POT-Creation-Date: 2023-01-24 17:44-0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. type: YAML Front Matter: description #: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:1 #, no-wrap msgid "Describes the FreeBSD Documentation Build Process" msgstr "" #. type: YAML Front Matter: title #: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:1 #, no-wrap msgid "Chapter 5. The FreeBSD Documentation Build Process" msgstr "" #. type: Title = #: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:13 #, no-wrap msgid "The FreeBSD Documentation Build Process" msgstr "" #. type: Plain text #: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:51 msgid "" "This chapter covers organization of the documentation build process and how " "man:make[1] is used to control it." msgstr "" #. type: Title == #: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:53 #, no-wrap msgid "Rendering AsciiDoc into Output" msgstr "" #. type: Plain text #: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:56 msgid "" "Different types of output can be produced from a single AsciiDoc source file." msgstr "" #. type: Table #: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:60 #, no-wrap msgid "Formats" msgstr "" #. type: Table #: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:61 #, no-wrap msgid "File Type" msgstr "" #. type: Table #: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:63 #, no-wrap msgid "Description" msgstr "" #. type: Table #: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:64 #, no-wrap msgid "`html`" msgstr "" #. type: Table #: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:65 #, no-wrap msgid "HTML" msgstr "" #. type: Table #: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:67 #, no-wrap msgid "An `article` or `book` chapter." msgstr "" #. type: Table #: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:68 #, no-wrap msgid "`pdf`" msgstr "" #. type: Table #: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:69 #, no-wrap msgid "PDF" msgstr "" #. type: Table #: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:71 #, no-wrap msgid "Portable Document Format." msgstr "" #. type: Table #: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:72 #, no-wrap msgid "`epub`" msgstr "" #. type: Table #: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:73 #, no-wrap msgid "EPUB" msgstr "" #. type: Table #: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:75 #, no-wrap msgid "" "Electronic Publication.\n" "ePub file format." msgstr "" #. type: Title === #: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:78 #, no-wrap msgid "Rendering to html" msgstr "" #. type: Plain text #: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:81 msgid "" "To render the documentation and the website to `html` use one of the " "following examples." msgstr "" #. type: Block title #: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:83 #, no-wrap msgid "Build the documentation" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:90 #, no-wrap msgid "" "% cd ~/doc/documentation\n" "% make\n" msgstr "" #. type: Block title #: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:94 #, no-wrap msgid "Build the website" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:101 #, no-wrap msgid "" "% cd ~/doc/website\n" "% make\n" msgstr "" #. type: Block title #: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:105 #, no-wrap msgid "Build the entire documentation project" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:112 #, no-wrap msgid "" "% cd ~/doc\n" "% make -j2\n" msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:116 msgid "Advanced build examples are given below:" msgstr "" #. type: Block title #: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:118 #, no-wrap msgid "Build English and Spanish documentation with verbose and debug messages" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:125 #, no-wrap msgid "" "% cd ~/doc/documentation\n" "% make DOC_LANG=\"en es\" HUGO_ARGS=\"--verbose --debug\"\n" msgstr "" #. type: Block title #: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:129 #, no-wrap msgid "Build and serve the content with Hugo’s internal webserver" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:136 #, no-wrap msgid "" "% cd ~/doc/documentation\n" "% make run\n" msgstr "" #. type: Plain text #: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:138 msgid "This webserver runs on `localhost`, port `1313` by default." msgstr "" #. type: Plain text #: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:140 msgid "" "To serve the content with Hugo’s internal webserver binding a specific IP " "address:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:144 #, no-wrap msgid "% make run BIND=192.168.15.10\n" msgstr "" #. type: Plain text #: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:147 msgid "A `hostname` can also be set as base url to Hugo’s internal webserver:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:151 #, no-wrap msgid "% make run BIND=192.168.15.10 HOSTNAME=example.com\n" msgstr "" -#. type: Title === +#. type: Block title #: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:155 #, no-wrap +msgid "Build documentation in html for offline usage" +msgstr "" + +#. type: delimited block . 4 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:162 +#, no-wrap +msgid "" +"% cd ~/doc/documentation\n" +"% make html\n" +msgstr "" + +#. type: Plain text +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:165 +msgid "To compress the html output, add `DOC_HTML_ARCHIVE=1`:" +msgstr "" + +#. type: delimited block . 4 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:170 +#, no-wrap +msgid "" +"% cd ~/doc/documentation\n" +"% DOC_HTML_ARCHIVE=1 make html\n" +msgstr "" + +#. type: Title === +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:174 +#, no-wrap msgid "Rendering to pdf" msgstr "" #. type: delimited block = 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:158 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:177 msgid "" "To render the documentation to `pdf`, use one of the following examples." msgstr "" #. type: Block title -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:160 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:179 #, no-wrap msgid "Build all documents in pdf" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:167 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:186 #, no-wrap msgid "" "% cd ~/doc/documentation\n" "% make pdf\n" msgstr "" #. type: Block title -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:171 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:190 #, no-wrap msgid "Build all articles in pdf" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:178 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:197 #, no-wrap msgid "" "% cd ~/doc/documentation\n" "% make pdf-articles\n" msgstr "" #. type: Block title -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:182 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:201 #, no-wrap msgid "Build all books in pdf" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:189 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:208 #, no-wrap msgid "" "% cd ~/doc/documentation\n" "% make pdf-books\n" msgstr "" #. type: Block title -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:193 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:212 #, no-wrap msgid "Build documents in pdf for specific languages" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:200 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:219 #, no-wrap msgid "" "% cd ~/doc/documentation\n" "% make DOC_LANG=\"en\" pdf\n" msgstr "" #. type: Plain text -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:202 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:221 msgid "This will build all English documents in pdf." msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:207 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:226 #, no-wrap msgid "" "% cd ~/doc/documentation\n" "% make DOC_LANG=\"en fr\" pdf-books\n" msgstr "" #. type: Plain text -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:209 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:228 msgid "This will build all English and French books in pdf." msgstr "" #. type: Title == -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:212 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:231 #, no-wrap msgid "The FreeBSD Documentation Build Toolset" msgstr "" #. type: delimited block = 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:215 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:234 msgid "These are the tools used to build and install the FDP documentation." msgstr "" #. type: delimited block = 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:217 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:236 msgid "The primary build tool is man:make[1], specifically Berkeley Make." msgstr "" #. type: delimited block = 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:218 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:237 msgid "Hugo" msgstr "" #. type: delimited block = 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:219 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:238 msgid "AsciiDoctor" msgstr "" #. type: delimited block = 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:220 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:239 msgid "Git" msgstr "" #. type: Title == -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:222 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:241 #, no-wrap msgid "Understanding the Makefile in the Documentation Tree" msgstr "" #. type: delimited block = 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:225 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:244 msgid "" "There are three [.filename]#Makefile# files for building some or all of the " "documentation project." msgstr "" #. type: delimited block = 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:227 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:246 msgid "" "The [.filename]#Makefile# in the [.filename]#documentation# directory will " "build only the documentation." msgstr "" #. type: delimited block = 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:228 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:247 msgid "" "The [.filename]#Makefile# in the [.filename]#website# directory will build " "only the website." msgstr "" #. type: delimited block = 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:229 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:248 msgid "" "The [.filename]#Makefile# at the top of the tree will build both the " "documentation and the website." msgstr "" #. type: delimited block = 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:232 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:251 msgid "" "The [.filename]#Makefile# appearing in subdirectories also support `make " "run` to serve built content with Hugo's internal webserver. This webserver " "runs on port 1313 by default." msgstr "" #. type: Title === -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:234 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:253 #, no-wrap msgid "Documentation Makefile" msgstr "" #. type: delimited block = 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:237 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:256 msgid "This [.filename]#Makefile# takes the following form:" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:262 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:281 #, no-wrap msgid "" "# Generate the FreeBSD documentation\n" "#\n" "# Copyright (c) 2020-2021, The FreeBSD Documentation Project\n" "# Copyright (c) 2020-2021, Sergio Carlavilla \n" "#\n" "# Targets intended for use on the command line\n" "#\n" "# all (default)\t-\tgenerate the books TOC and compile all the documentation\n" "# clean\t\t- \tremoves generated files\n" "# run\t\t-\tserves the built documentation site for local browsing\n" "# pdf\t\t-\tbuild PDF versions of the articles and books.\n" "# html\t\t-\tbuild HTML versions of the articles and books for\n" "#\t\t\toffline use.\n" "#\t\t\tIf variable DOC_HTML_ARCHIVE is set, all documents will be\n" "#\t\t\tarchived/compressed, and only these files will be kept in the public\n" "#\t\t\tdirectory.\n" "# epub\t\t-\tbuild EPUB versions of the articles and books (Experimental).\n" "#\n" "# The run target uses hugo's built-in webserver to make the documentation site\n" "# available for local browsing. The documentation should have been built prior\n" "# to attempting to use the `run` target. By default, hugo will start its\n" "# webserver on port 1313.\n" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:264 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:546 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:283 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:565 #, no-wrap msgid "MAINTAINER=carlavilla@FreeBSD.org <.>\n" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:269 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:288 #, no-wrap msgid "" "# List of languages without book translations\n" "ARTICLEONLY_LANGS=\tbn-bd da ko tr\n" "# List of languages without article translations\n" "BOOKONLY_LANGS=\t\tmn\n" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:272 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:291 #, no-wrap msgid "" "# List of all languages we have content for\n" "ALL_LANGUAGES=\tbn-bd da de el en es fr hu it ja ko mn nl pl pt-br ru tr zh-cn zh-tw <.>\n" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:274 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:551 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:293 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:570 #, no-wrap msgid "LOCALBASE?=\t/usr/local\n" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:281 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:300 #, no-wrap msgid "" "RUBY_CMD =\t${LOCALBASE}/bin/ruby <.>\n" "HUGO_CMD =\t${LOCALBASE}/bin/hugo <.>\n" "HUGO_ARGS?=\t--verbose --minify\n" "HUGO_OFFLINE_ARGS?= \t--environment offline --verbose --minify\n" "ASCIIDOCTOR_CMD=\t${LOCALBASE}/bin/asciidoctor\n" "ASCIIDOCTORPDF_CMD=\t${LOCALBASE}/bin/asciidoctor-pdf\n" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:291 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:310 #, no-wrap msgid "" ".if defined(DOC_LANG) && !empty(DOC_LANG)\n" "LANGUAGES=\t${DOC_LANG:S/,/ /g}\n" ".if ${LANGUAGES:Men} == \"\" && ${.TARGETS:Mpdf*} == \"\" && ${.TARGETS:Mhtml*} == \"\"\n" ".warning \"Warning: cannot skip 'en'; adding it back\"\n" "LANGUAGES+=\ten\n" ".endif\n" ".else\n" "LANGUAGES=\t${ALL_LANGUAGES}\n" ".endif\n" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:294 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:313 #, no-wrap msgid "" "RUBYLIB =\t../shared/lib\n" ".export\tRUBYLIB\n" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:298 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:317 #, no-wrap msgid "" "RUN_DEPENDS=\t${HUGO_CMD} \\\n" "\t\t${LOCALBASE}/bin/asciidoctor \\\n" "\t\t${LOCALBASE}/bin/rougify\n" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:308 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:567 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:327 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:586 #, no-wrap msgid "" ".ifndef HOSTNAME\n" ". ifdef BIND\n" ".HOST=$(BIND)\n" ". else\n" ".HOST=localhost\n" ". endif\n" ".else\n" ".HOST=$(HOSTNAME)\n" ".endif\n" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:315 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:334 #, no-wrap msgid "" "# Strip the languages with only articles from the list of languages we\n" "# will use to build books.\n" "BOOK_LANGS= ${LANGUAGES}\n" ".for a in ${ARTICLEONLY_LANGS}\n" "BOOK_LANGS:=\t${BOOK_LANGS:N${a}}\n" ".endfor\n" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:322 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:341 #, no-wrap msgid "" "# Strip the languages with only books from the list of languages we\n" "# will use to build articles.\n" "ARTICLE_LANGS= ${LANGUAGES}\n" ".for a in ${BOOKONLY_LANGS}\n" "ARTICLE_LANGS:=\t${ARTICLE_LANGS:N${a}}\n" ".endfor\n" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:331 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:350 #, no-wrap msgid "" "# Take the list of all languages, and take out the ones we have been\n" "# asked for. We'll feed this to hugo.\n" "SKIP_LANGS=\n" ".for a in ${ALL_LANGUAGES}\n" ".if ${LANGUAGES:M${a}} == \"\"\n" "SKIP_LANGS+= ${a}\n" ".endif\n" ".endfor\n" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:333 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:588 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:352 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:607 #, no-wrap msgid ".ORDER: all run <.>\n" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:338 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:357 #, no-wrap msgid "" ".ORDER: requirements <.>\n" ".ORDER: starting-message\n" ".ORDER: starting-message build\n" ".ORDER: build\n" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:341 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:360 #, no-wrap msgid "" "all: requirements starting-message generate-pgpkeys-txt build\n" "run: requirements starting-message generate-pgpkeys-txt run-local\n" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:344 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:363 #, no-wrap msgid "" "# clean does not call pdf-clean as that is a subset of hugo-clean\n" "clean: hugo-clean pgp-clean\n" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:351 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:370 #, no-wrap msgid "" "requirements:\n" ".for dep in ${RUN_DEPENDS}\n" ".if !exists(${dep})\n" "\t@(echo ${dep} not found, please run 'pkg install docproj'; exit 1)\n" ".endif\n" ".endfor\n" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:356 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:375 #, no-wrap msgid "" "requirements-pdf:\n" ".if !exists(${LOCALBASE}/bin/asciidoctor-pdf)\n" "\t@(echo ${LOCALBASE}/bin/asciidoctor-pdf not found, please run 'pkg install rubygem-asciidoctor-pdf'; exit 1)\n" ".endif\n" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:361 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:380 #, no-wrap msgid "" "requirements-epub:\n" ".if !exists(${LOCALBASE}/bin/asciidoctor-epub3)\n" "\t@(echo ${LOCALBASE}/bin/asciidoctor-epub3 not found, please run 'pkg install rubygem-asciidoctor-epub3'; exit 1)\n" ".endif\n" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:368 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:387 #, no-wrap msgid "" "starting-message: .PHONY <.>\n" "\t@echo ---------------------------------------------------------------\n" "\t@echo Building the documentation\n" "\t@echo included languages: ${LANGUAGES}\n" "\t@echo excluded languages: ${SKIP_LANGS}\n" "\t@echo ---------------------------------------------------------------\n" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:370 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:389 #, no-wrap msgid "generate-pgpkeys-txt: static/pgpkeys/pgpkeys.txt\n" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:373 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:392 #, no-wrap msgid "" "static/pgpkeys/pgpkeys.txt: static/pgpkeys/*key\n" "\t${RUBY_CMD} ./tools/global-pgpkeys-creator.rb\n" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:377 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:396 #, no-wrap msgid "" "run-local: .PHONY <.>\n" "\tHUGO_DISABLELANGUAGES=\"${SKIP_LANGS}\" ${HUGO_CMD} server \\\n" "\t\t${HUGO_ARGS} -D $(BIND:D--bind=$(BIND)) --baseURL=\"http://$(.HOST):1313\"\n" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:380 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:622 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:399 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:641 #, no-wrap msgid "" "build: .PHONY <.>\n" "\tHUGO_DISABLELANGUAGES=\"${SKIP_LANGS}\" ${HUGO_CMD} ${HUGO_ARGS}\n" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:383 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:402 #, no-wrap msgid "" "build-offline: .PHONY\n" "\tHUGO_DISABLELANGUAGES=\"${SKIP_LANGS}\" ${HUGO_CMD} ${HUGO_OFFLINE_ARGS}\n" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:386 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:405 #, no-wrap msgid "" "pgp-clean: .PHONY\n" "\trm -f static/pgpkeys/pgpkeys.txt\n" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:389 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:408 #, no-wrap msgid "" "hugo-clean: .PHONY\n" "\trm -rf resources public\n" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:395 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:414 #, no-wrap msgid "" "#\n" "# PDF targets\n" "# Use DOC_LANG to choose the language, e.g., make DOC_LANG=\"en fr\" pdf-books\n" "#\n" "pdf: pdf-articles pdf-books\n" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:400 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:419 #, no-wrap msgid "" "pdf-books: requirements-pdf\n" ".for _lang in ${BOOK_LANGS}\n" "\t./tools/asciidoctor.sh books ${_lang} pdf\n" ".endfor\n" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:405 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:424 #, no-wrap msgid "" "pdf-articles: requirements-pdf\n" ".for _lang in ${ARTICLE_LANGS}\n" "\t./tools/asciidoctor.sh articles ${_lang} pdf\n" ".endfor\n" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:407 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:426 #, no-wrap msgid "pdf-clean: pdf-articles-clean pdf-books-clean\n" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:414 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:433 #, no-wrap msgid "" "pdf-books-clean:\n" ".for _lang in ${BOOK_LANGS}\n" "\trm -fr ${.CURDIR}/public/${_lang}/books\n" "\t-rmdir ${.CURDIR}/public/${_lang}\n" ".endfor\n" "\t-rmdir ${.CURDIR}/public/\n" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:423 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:442 #, no-wrap msgid "" "pdf-articles-clean:\n" ".for _lang in ${ARTICLE_LANGS}\n" "\trm -fr ${.CURDIR}/public/${_lang}/articles\n" ".if !exists(${.CURDIR}/public/${_lang}/books)\n" "\trm -fr ${.CURDIR}/public/${_lang}\n" ".endif\n" ".endfor\n" "\t-rmdir ${.CURDIR}/public\n" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:428 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:447 #, no-wrap msgid "" "#\n" "# HTML targets\n" "#\n" "html: build-offline html-clean-global html-clean-articles html-clean-books html-archive html-archive-clean-files\n" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:430 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:449 #, no-wrap msgid "html-clean: hugo-clean\n" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:434 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:453 #, no-wrap msgid "" "html-clean-global:\n" "\trm -fr ${.CURDIR}/public/index.html\n" "\trm -rf pgpkeys js\n" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:440 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:459 #, no-wrap msgid "" "html-clean-articles:\n" ".for _lang in ${ARTICLE_LANGS}\n" "\trm -fr ${.CURDIR}/public/${_lang}/index.html\n" "\trm -fr ${.CURDIR}/public/${_lang}/articles/index.html\n" ".endfor\n" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:445 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:464 #, no-wrap msgid "" "html-clean-books:\n" ".for _lang in ${BOOK_LANGS}\n" "\trm -fr ${.CURDIR}/public/${_lang}/books/index.html\n" ".endfor\n" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:455 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:474 #, no-wrap msgid "" "html-archive:\n" ".if defined(DOC_HTML_ARCHIVE)\n" ".for _lang in ${ARTICLE_LANGS}\n" "\t./tools/asciidoctor.sh articles ${_lang} archive\n" ".endfor\n" ".for _lang in ${BOOK_LANGS}\n" "\t./tools/asciidoctor.sh books ${_lang} archive\n" ".endfor\n" ".endif\n" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:461 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:480 #, no-wrap msgid "" "html-archive-clean-files:\n" ".if defined(DOC_HTML_ARCHIVE)\n" "\tfind ${.CURDIR}/public/ ! -name '*.pdf' ! -name '*.tar.gz' -type f -delete\n" "\tfind ${.CURDIR}/public/ -type d -empty -delete\n" ".endif\n" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:467 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:486 #, no-wrap msgid "" "#\n" "# EPUB targets\n" "# Use DOC_LANG to choose the language, e.g., make DOC_LANG=\"en fr\" epub-books\n" "#\n" "epub: epub-articles epub-books\n" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:480 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:499 #, no-wrap msgid "" "epub-books: requirements-epub\n" "\t@echo ---------------------------------------------------------------\n" "\t@echo !!! EPUB output is experimental !!!\n" "\t@echo\n" "\t@echo Asciidoctor EPUB3 is currently alpha software. Use accordingly. Although the\n" "\t@echo bulk of AsciiDoc content is converted, there’s still work needed to fill in\n" "\t@echo gaps where conversion is incomplete or unstyled.\n" "\t@echo https://docs.asciidoctor.org/epub3-converter/latest/#project-status\n" "\t@echo ---------------------------------------------------------------\n" ".for _lang in ${BOOK_LANGS}\n" "\t./tools/asciidoctor.sh books ${_lang} epub\n" ".endfor\n" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:493 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:512 #, no-wrap msgid "" "epub-articles: requirements-epub\n" "\t@echo ---------------------------------------------------------------\n" "\t@echo !!! EPUB output is experimental !!!\n" "\t@echo\n" "\t@echo Asciidoctor EPUB3 is currently alpha software. Use accordingly. Although the\n" "\t@echo bulk of AsciiDoc content is converted, there’s still work needed to fill in\n" "\t@echo gaps where conversion is incomplete or unstyled.\n" "\t@echo https://docs.asciidoctor.org/epub3-converter/latest/#project-status\n" "\t@echo ---------------------------------------------------------------\n" ".for _lang in ${ARTICLE_LANGS}\n" "\t./tools/asciidoctor.sh articles ${_lang} epub\n" ".endfor\n" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:495 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:514 #, no-wrap msgid "epub-clean: epub-articles-clean epub-books-clean\n" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:502 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:521 #, no-wrap msgid "" "epub-books-clean:\n" ".for _lang in ${BOOK_LANGS}\n" "\trm -fr ${.CURDIR}/public/${_lang}/books\n" "\t-rmdir ${.CURDIR}/public/${_lang}\n" ".endfor\n" "\t-rmdir ${.CURDIR}/public/\n" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:511 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:530 #, no-wrap msgid "" "epub-articles-clean:\n" ".for _lang in ${ARTICLE_LANGS}\n" "\trm -fr ${.CURDIR}/public/${_lang}/articles\n" ".if !exists(${.CURDIR}/public/${_lang}/books)\n" "\trm -fr ${.CURDIR}/public/${_lang}\n" ".endif\n" ".endfor\n" "\t-rmdir ${.CURDIR}/public\n" msgstr "" #. type: Plain text -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:514 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:636 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:533 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:655 msgid "The `MAINTAINER` flag specifies who is the maintainer of this Makefile." msgstr "" #. type: Plain text -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:515 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:534 msgid "" "`ALL_LANGUAGES` flag specifies in which languages the table of contents has " "to be generated." msgstr "" #. type: Plain text -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:516 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:637 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:535 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:656 msgid "`RUBY_CMD` flag specifies the location of the Ruby binary." msgstr "" #. type: Plain text -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:517 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:638 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:536 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:657 msgid "`HUGO_CMD` flag specifies the location of the Hugo binary." msgstr "" #. type: Plain text -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:518 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:639 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:537 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:658 msgid "" "`.ORDER` directives are used to ensure multiple make jobs may run without " "problem." msgstr "" #. type: Plain text -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:519 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:538 msgid "" "`all` target builds the documentation and puts the result in *~/doc/" "documentation/public*." msgstr "" #. type: Plain text -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:520 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:641 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:539 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:660 msgid "" "`starting-message` shows a message in the CLI to show the user that the " "process is running." msgstr "" #. type: Plain text -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:521 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:644 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:540 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:663 msgid "" "`run-local` runs hugo webserver on port 1313, or a random free port if that " "is already in use." msgstr "" #. type: Plain text -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:522 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:541 msgid "" "`build` builds the documentation and puts the result in the *~/doc/" "documentation/public*." msgstr "" #. type: Title === -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:524 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:543 #, no-wrap msgid "Website Makefile" msgstr "" #. type: Plain text -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:527 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:546 msgid "This [.filename]#Makefile# takes the form of:" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:544 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:563 #, no-wrap msgid "" "# Generate the FreeBSD website\n" "#\n" "# Copyright (c) 2020-2021, The FreeBSD Documentation Project\n" "# Copyright (c) 2020-2021, Sergio Carlavilla \n" "#\n" "# Targets intended for use on the command line\n" "#\n" "# all (default)\t-\tgenerate the releases.toml and compile all the website\n" "# run\t-\t\t\tserves the built website for local browsing\n" "#\n" "# The run target uses hugo's built-in webserver to make the built website\n" "# available for local browsing. The website should have been built prior\n" "# to attempting to use the `run` target. By default, hugo will start its\n" "# webserver on port 1313.\n" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:549 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:568 #, no-wrap msgid "" "# List of all languages we have content for\n" "ALL_LANGUAGES=\tde el en es fr hu it ja nl ru tr zh-cn zh-tw\n" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:557 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:576 #, no-wrap msgid "" "RUBY_CMD =\t${LOCALBASE}/bin/ruby <.>\n" "HUGO_CMD =\t${LOCALBASE}/bin/hugo <.>\n" "HUGO_ARGS?=\t--verbose\n" "RUBYLIB =\t../shared/lib\n" ".export\tRUBYLIB\n" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:577 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:596 #, no-wrap msgid "" ".if defined(DOC_LANG) && !empty(DOC_LANG)\n" "LANGUAGES= ${DOC_LANG:S/,/ /g}\n" ".if ${LANGUAGES:Men} == \"\"\n" ".warning \"Warning: cannot skip 'en'; adding it back\"\n" "LANGUAGES+=\ten\n" ".endif\n" ".else\n" "LANGUAGES=\t${ALL_LANGUAGES}\n" ".endif\n" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:586 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:605 #, no-wrap msgid "" "# Take the list of all languages, and take out the ones we have been\n" "# asked for via DOC_LANG. We'll feed this to hugo.\n" "SKIP_LANGS=\n" ".for a in ${ALL_LANGUAGES}\n" ".if ${LANGUAGES:M${a}} == \"\"\n" "SKIP_LANGS+=\t${a}\n" ".endif\n" ".endfor\n" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:594 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:613 #, no-wrap msgid "" ".ORDER: starting-message generate-releases\n" ".ORDER: starting-message build\n" ".ORDER: generate-releases build\n" ".ORDER: build post-build\n" ".ORDER: post-build end-message\n" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:598 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:617 #, no-wrap msgid "" "all: starting-message generate-releases build post-build end-message <.>\n" "run: starting-message generate-releases run-local\n" "clean: hugo-clean releases-clean\n" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:605 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:624 #, no-wrap msgid "" "starting-message: .PHONY <.>\n" "\t@echo \"---------------------------------------------------------------\"\n" "\t@echo \"Building the website started on $$(date)\"\n" "\t@echo \" included languages: ${LANGUAGES}\"\n" "\t@echo \" excluded languages: ${SKIP_LANGS}\"\n" "\t@echo \"---------------------------------------------------------------\"\n" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:610 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:629 #, no-wrap msgid "" "end-message: .PHONY\n" "\t@echo \"---------------------------------------------------------------\"\n" "\t@echo \"Building the website completed on $$(date)\"\n" "\t@echo \"---------------------------------------------------------------\"\n" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:612 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:631 #, no-wrap msgid "generate-releases: data/releases.toml <.>\n" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:615 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:634 #, no-wrap msgid "" "data/releases.toml:\n" "\t${RUBY_CMD} ./tools/releases-toml.rb\n" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:619 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:638 #, no-wrap msgid "" "run-local: .PHONY <.>\n" "\tHUGO_DISABLELANGUAGES=\"${SKIP_LANGS}\" ${HUGO_CMD} server \\\n" "\t ${HUGO_ARGS} -D $(BIND:D--bind=$(BIND)) --baseURL=\"http://$(.HOST):1313\"\n" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:624 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:643 #, no-wrap msgid "post-build: cgi-permissions\n" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:627 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:646 #, no-wrap msgid "" "cgi-permissions:\n" "\t@chmod 555 ./public/cgi/*.cgi\n" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:630 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:649 #, no-wrap msgid "" "hugo-clean:\n" "\trm -fr public resources\n" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:633 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:652 #, no-wrap msgid "" "releases-clean:\n" "\trm -f data/releases.toml\n" msgstr "" #. type: Plain text -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:640 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:659 msgid "" "`all` target builds the website and puts the result in *~/doc/website/" "public*." msgstr "" #. type: Plain text -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:643 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:662 msgid "" "`generate-releases` calls the script used to convert from AsciiDoc variables " "to TOML variables. With this conversion, the releases variables can be used " "in AsciiDoc and in the Hugo custom templates." msgstr "" #. type: Plain text -#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:644 +#: documentation/content/en/books/fdp-primer/doc-build/_index.adoc:663 msgid "" "`build` builds the website and puts the result in the *~/doc/website/public*." msgstr "" diff --git a/documentation/content/en/books/handbook/basics/_index.po b/documentation/content/en/books/handbook/basics/_index.po index 9a598d8cf5..b1f5c4f880 100644 --- a/documentation/content/en/books/handbook/basics/_index.po +++ b/documentation/content/en/books/handbook/basics/_index.po @@ -1,4435 +1,4462 @@ # SOME DESCRIPTIVE TITLE # Copyright (C) YEAR The FreeBSD Project # This file is distributed under the same license as the FreeBSD Documentation package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: FreeBSD Documentation VERSION\n" -"POT-Creation-Date: 2023-01-21 20:00-0300\n" +"POT-Creation-Date: 2023-01-24 17:44-0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. type: YAML Front Matter: description #: documentation/content/en/books/handbook/basics/_index.adoc:1 #, no-wrap msgid "Basic commands and functionality of the FreeBSD operating system" msgstr "" #. type: YAML Front Matter: part #: documentation/content/en/books/handbook/basics/_index.adoc:1 #, no-wrap msgid "Part I. Getting Started" msgstr "" #. type: YAML Front Matter: title #: documentation/content/en/books/handbook/basics/_index.adoc:1 #, no-wrap msgid "Chapter 3. FreeBSD Basics" msgstr "" #. type: Title = #: documentation/content/en/books/handbook/basics/_index.adoc:15 #, no-wrap msgid "FreeBSD Basics" msgstr "" #. type: Title == #: documentation/content/en/books/handbook/basics/_index.adoc:53 #, no-wrap msgid "Synopsis" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:58 msgid "" "This chapter covers the basic commands and functionality of the FreeBSD " "operating system. Much of this material is relevant for any UNIX(R)-like " "operating system. New FreeBSD users are encouraged to read through this " "chapter carefully." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:60 msgid "After reading this chapter, you will know:" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:62 msgid "How to use and configure virtual consoles." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:63 msgid "How to create and manage users and groups on FreeBSD." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:64 msgid "How UNIX(R) file permissions and FreeBSD file flags work." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:65 msgid "The default FreeBSD file system layout." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:66 msgid "The FreeBSD disk organization." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:67 msgid "How to mount and unmount file systems." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:68 msgid "What processes, daemons, and signals are." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:69 msgid "What a shell is, and how to change the default login environment." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:70 msgid "How to use basic text editors." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:71 msgid "What devices and device nodes are." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:72 msgid "How to read manual pages for more information." msgstr "" #. type: Title == #: documentation/content/en/books/handbook/basics/_index.adoc:74 #, no-wrap msgid "Virtual Consoles and Terminals" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:77 msgid "" "Unless FreeBSD has been configured to automatically start a graphical " "environment during startup, the system will boot into a command line login " "prompt, as seen in this example:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/basics/_index.adoc:81 #, no-wrap msgid "FreeBSD/amd64 (pc3.example.org) (ttyv0)\n" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/basics/_index.adoc:83 #, no-wrap msgid "login:\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:89 msgid "" "The first line contains some information about the system. The `amd64` " "indicates that the system in this example is running a 64-bit version of " "FreeBSD. The hostname is `pc3.example.org`, and `ttyv0` indicates that this " "is the \"system console\". The second line is the login prompt." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:93 msgid "" "Since FreeBSD is a multiuser system, it needs some way to distinguish " "between different users. This is accomplished by requiring every user to " "log into the system before gaining access to the programs on the system. " "Every user has a unique \"username\" and a personal \"password\"." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:97 msgid "" "To log into the system console, type the username that was configured during " "system installation, as described in crossref:bsdinstall[bsdinstall-addusers," "Add Users], and press kbd:[Enter]. Then enter the password associated with " "the username and press kbd:[Enter]. The password is _not echoed_ for " "security reasons." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:101 msgid "" "Once the correct password is input, the message of the day (MOTD) will be " "displayed followed by a command prompt. Depending upon the shell that was " "selected when the user was created, this prompt will be a `+#+`, `$`, or `%` " "character. The prompt indicates that the user is now logged into the " "FreeBSD system console and ready to try the available commands." msgstr "" #. type: Title === #: documentation/content/en/books/handbook/basics/_index.adoc:103 #, no-wrap msgid "Virtual Consoles" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:108 msgid "" "While the system console can be used to interact with the system, a user " "working from the command line at the keyboard of a FreeBSD system will " "typically instead log into a virtual console. This is because system " "messages are configured by default to display on the system console. These " "messages will appear over the command or file that the user is working on, " "making it difficult to concentrate on the work at hand." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:112 msgid "" "By default, FreeBSD is configured to provide several virtual consoles for " "inputting commands. Each virtual console has its own login prompt and shell " "and it is easy to switch between virtual consoles. This essentially " "provides the command line equivalent of having several windows open at the " "same time in a graphical environment." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:116 msgid "" "The key combinations kbd:[Alt+F1] through kbd:[Alt+F8] have been reserved by " "FreeBSD for switching between virtual consoles. Use kbd:[Alt+F1] to switch " "to the system console (`ttyv0`), kbd:[Alt+F2] to access the first virtual " "console (`ttyv1`), kbd:[Alt+F3] to access the second virtual console " "(`ttyv2`), and so on. When using Xorg as a graphical console, the " "combination becomes kbd:[Ctrl+Alt+F1] to return to a text-based virtual " "console." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:120 msgid "" "When switching from one console to the next, FreeBSD manages the screen " "output. The result is an illusion of having multiple virtual screens and " "keyboards that can be used to type commands for FreeBSD to run. The " "programs that are launched in one virtual console do not stop running when " "the user switches to a different virtual console." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:122 msgid "" "Refer to man:kbdcontrol[1], man:vidcontrol[1], man:atkbd[4], man:syscons[4], " "and man:vt[4] for a more technical description of the FreeBSD console and " "its keyboard drivers." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:124 msgid "" "In FreeBSD, the number of available virtual consoles is configured in this " "section of `/etc/ttys`:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/basics/_index.adoc:139 #, no-wrap msgid "" "# name getty type status comments\n" "#\n" "ttyv0 \"/usr/libexec/getty Pc\" xterm on secure\n" "# Virtual terminals\n" "ttyv1 \"/usr/libexec/getty Pc\" xterm on secure\n" "ttyv2 \"/usr/libexec/getty Pc\" xterm on secure\n" "ttyv3 \"/usr/libexec/getty Pc\" xterm on secure\n" "ttyv4 \"/usr/libexec/getty Pc\" xterm on secure\n" "ttyv5 \"/usr/libexec/getty Pc\" xterm on secure\n" "ttyv6 \"/usr/libexec/getty Pc\" xterm on secure\n" "ttyv7 \"/usr/libexec/getty Pc\" xterm on secure\n" "ttyv8 \"/usr/X11R6/bin/xdm -nodaemon\" xterm off secure\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:145 msgid "" "To disable a virtual console, put a comment symbol (`+#+`) at the beginning " "of the line representing that virtual console. For example, to reduce the " "number of available virtual consoles from eight to four, put a `+#+` in " "front of the last four lines representing virtual consoles `ttyv5` through " "`ttyv8`. _Do not_ comment out the line for the system console `ttyv0`. " "Note that the last virtual console (`ttyv8`) is used to access the graphical " "environment if Xorg has been installed and configured as described in " "crossref:x11[x11,The X Window System]." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:147 msgid "" "For a detailed description of every column in this file and the available " "options for the virtual consoles, refer to man:ttys[5]." msgstr "" #. type: Title === #: documentation/content/en/books/handbook/basics/_index.adoc:149 #, no-wrap msgid "Single User Mode" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:157 msgid "" "The FreeBSD boot menu provides an option labelled as \"Boot Single User\". " "If this option is selected, the system will boot into a special mode known " "as \"single user mode\". This mode is typically used to repair a system " "that will not boot or to reset the `root` password when it is not known. " "While in single user mode, networking and other virtual consoles are not " "available. However, full `root` access to the system is available, and by " "default, the `root` password is not needed. For these reasons, physical " "access to the keyboard is needed to boot into this mode and determining who " "has physical access to the keyboard is something to consider when securing a " "FreeBSD system." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:159 msgid "" "The settings which control single user mode are found in this section of `/" "etc/ttys`:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/basics/_index.adoc:167 #, no-wrap msgid "" "# name getty type status comments\n" "#\n" "# If console is marked \"insecure\", then init will ask for the root password\n" "# when going to single-user mode.\n" "console none unknown off secure\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:173 msgid "" "By default, the status is set to `secure`. This assumes that who has " "physical access to the keyboard is either not important or it is controlled " "by a physical security policy. If this setting is changed to `insecure`, " "the assumption is that the environment itself is insecure because anyone can " "access the keyboard. When this line is changed to `insecure`, FreeBSD will " "prompt for the `root` password when a user selects to boot into single user " "mode." msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/handbook/basics/_index.adoc:177 msgid "" "_Be careful when changing this setting to `insecure`!_ If the `root` " "password is forgotten, booting into single user mode is still possible, but " "may be difficult for someone who is not familiar with the FreeBSD booting " "process." msgstr "" #. type: Title === #: documentation/content/en/books/handbook/basics/_index.adoc:180 #, no-wrap msgid "Changing Console Video Modes" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:184 msgid "" "The FreeBSD console default video mode may be adjusted to 1024x768, " "1280x1024, or any other size supported by the graphics chip and monitor. To " "use a different video mode load the `VESA` module:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/basics/_index.adoc:188 #, no-wrap msgid "# kldload vesa\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:192 msgid "" "To determine which video modes are supported by the hardware, use man:" "vidcontrol[1]. To get a list of supported video modes issue the following:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/basics/_index.adoc:196 #, no-wrap msgid "# vidcontrol -i mode\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:200 msgid "" "The output of this command lists the video modes that are supported by the " "hardware. To select a new video mode, specify the mode using man:" "vidcontrol[1] as the `root` user:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/basics/_index.adoc:204 #, no-wrap msgid "# vidcontrol MODE_279\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:207 msgid "" "If the new video mode is acceptable, it can be permanently set on boot by " "adding it to `/etc/rc.conf`:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/basics/_index.adoc:211 #, no-wrap msgid "allscreens_flags=\"MODE_279\"\n" msgstr "" #. type: Title == #: documentation/content/en/books/handbook/basics/_index.adoc:214 #, no-wrap msgid "Users and Basic Account Management" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:219 msgid "" "FreeBSD allows multiple users to use the computer at the same time. While " "only one user can sit in front of the screen and use the keyboard at any one " "time, any number of users can log in to the system through the network. To " "use the system, each user should have their own user account." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:221 msgid "This chapter describes:" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:223 msgid "The different types of user accounts on a FreeBSD system." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:224 msgid "How to add, remove, and modify user accounts." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:225 msgid "" "How to set limits to control the resources that users and groups are allowed " "to access." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:226 msgid "How to create groups and add users as members of a group." msgstr "" #. type: Title === #: documentation/content/en/books/handbook/basics/_index.adoc:228 #, no-wrap msgid "Account Types" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:231 msgid "" "Since all access to the FreeBSD system is achieved using accounts and all " "processes are run by users, user and account management is important." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:233 msgid "" "There are three main types of accounts: system accounts, user accounts, and " "the superuser account." msgstr "" #. type: Title ==== #: documentation/content/en/books/handbook/basics/_index.adoc:235 #, no-wrap msgid "System Accounts" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:239 msgid "" "System accounts are used to run services such as DNS, mail, and web " "servers. The reason for this is security; if all services ran as the " "superuser, they could act without restriction." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:241 msgid "" "Examples of system accounts are `daemon`, `operator`, `bind`, `news`, and " "`www`." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:244 msgid "" "`nobody` is the generic unprivileged system account. However, the more " "services that use `nobody`, the more files and processes that user will " "become associated with, and hence the more privileged that user becomes." msgstr "" #. type: Title ==== #: documentation/content/en/books/handbook/basics/_index.adoc:246 #, no-wrap msgid "User Accounts" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:251 msgid "" "User accounts are assigned to real people and are used to log in and use the " "system. Every person accessing the system should have a unique user " "account. This allows the administrator to find out who is doing what and " "prevents users from clobbering the settings of other users." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:253 msgid "" "Each user can set up their own environment to accommodate their use of the " "system, by configuring their default shell, editor, key bindings, and " "language settings." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:255 msgid "" "Every user account on a FreeBSD system has certain information associated " "with it:" msgstr "" #. type: Labeled list #: documentation/content/en/books/handbook/basics/_index.adoc:256 #, no-wrap msgid "User name" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:261 msgid "" "The user name is typed at the `login:` prompt. Each user must have a unique " "user name. There are a number of rules for creating valid user names which " "are documented in man:passwd[5]. It is recommended to use user names that " "consist of eight or fewer, all lower case characters in order to maintain " "backwards compatibility with applications." msgstr "" #. type: Labeled list #: documentation/content/en/books/handbook/basics/_index.adoc:262 #, no-wrap msgid "Password" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:264 msgid "Each account has an associated password." msgstr "" #. type: Labeled list #: documentation/content/en/books/handbook/basics/_index.adoc:265 #, no-wrap msgid "User ID (UID)" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:269 msgid "" "The User ID (UID) is a number used to uniquely identify the user to the " "FreeBSD system. Commands that allow a user name to be specified will first " "convert it to the UID. It is recommended to use a UID less than 65535, " "since higher values may cause compatibility issues with some software." msgstr "" #. type: Labeled list #: documentation/content/en/books/handbook/basics/_index.adoc:270 #, no-wrap msgid "Group ID (GID)" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:275 msgid "" "The Group ID (GID) is a number used to uniquely identify the primary group " "that the user belongs to. Groups are a mechanism for controlling access to " "resources based on a user's GID rather than their UID. This can " "significantly reduce the size of some configuration files and allows users " "to be members of more than one group. It is recommended to use a GID of " "65535 or lower as higher GIDs may break some software." msgstr "" #. type: Labeled list #: documentation/content/en/books/handbook/basics/_index.adoc:276 #, no-wrap msgid "Login class" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:279 msgid "" "Login classes are an extension to the group mechanism that provide " "additional flexibility when tailoring the system to different users. Login " "classes are discussed further in crossref:security[users-limiting," "Configuring Login Classes]." msgstr "" #. type: Labeled list #: documentation/content/en/books/handbook/basics/_index.adoc:280 #, no-wrap msgid "Password change time" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:283 msgid "" "By default, passwords do not expire. However, password expiration can be " "enabled on a per-user basis, forcing some or all users to change their " "passwords after a certain amount of time has elapsed." msgstr "" #. type: Labeled list #: documentation/content/en/books/handbook/basics/_index.adoc:284 #, no-wrap msgid "Account expiration time" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:288 msgid "" "By default, FreeBSD does not expire accounts. When creating accounts that " "need a limited lifespan, such as student accounts in a school, specify the " "account expiry date using man:pw[8]. After the expiry time has elapsed, the " "account cannot be used to log in to the system, although the account's " "directories and files will remain." msgstr "" #. type: Labeled list #: documentation/content/en/books/handbook/basics/_index.adoc:289 #, no-wrap msgid "User's full name" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:292 msgid "" "The user name uniquely identifies the account to FreeBSD, but does not " "necessarily reflect the user's real name. Similar to a comment, this " "information can contain spaces, uppercase characters, and be more than 8 " "characters long." msgstr "" #. type: Labeled list #: documentation/content/en/books/handbook/basics/_index.adoc:293 #, no-wrap msgid "Home directory" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:298 msgid "" "The home directory is the full path to a directory on the system. This is " "the user's starting directory when the user logs in. A common convention is " "to put all user home directories under `/home/username` or `/usr/home/" "username`. Each user stores their personal files and subdirectories in " "their own home directory." msgstr "" #. type: Labeled list #: documentation/content/en/books/handbook/basics/_index.adoc:299 #, no-wrap msgid "User shell" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:302 msgid "" "The shell provides the user's default environment for interacting with the " "system. There are many different kinds of shells and experienced users will " "have their own preferences, which can be reflected in their account settings." msgstr "" #. type: Title ==== #: documentation/content/en/books/handbook/basics/_index.adoc:304 #, no-wrap msgid "The Superuser Account" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:308 msgid "" "The superuser account, usually called `root`, is used to manage the system " "with no limitations on privileges. For this reason, it should not be used " "for day-to-day tasks like sending and receiving mail, general exploration of " "the system, or programming." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:311 msgid "" "The superuser, unlike other user accounts, can operate without limits, and " "misuse of the superuser account may result in spectacular disasters. User " "accounts are unable to destroy the operating system by mistake, so it is " "recommended to login as a user account and to only become the superuser when " "a command requires extra privilege." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:313 msgid "" "Always double and triple-check any commands issued as the superuser, since " "an extra space or missing character can mean irreparable data loss." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:316 msgid "" "There are several ways to gain superuser privilege. While one can log in as " "`root`, this is highly discouraged." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:321 msgid "" "Instead, use man:su[1] to become the superuser. If `-` is specified when " "running this command, the user will also inherit the root user's " "environment. The user running this command must be in the `wheel` group or " "else the command will fail. The user must also know the password for the " "`root` user account." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:324 msgid "" "In this example, the user only becomes superuser in order to run `make " "install` as this step requires superuser privilege. Once the command " "completes, the user types `exit` to leave the superuser account and return " "to the privilege of their user account." msgstr "" #. type: Block title #: documentation/content/en/books/handbook/basics/_index.adoc:325 #, no-wrap msgid "Install a Program As the Superuser" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/basics/_index.adoc:337 #, no-wrap msgid "" "% configure\n" "% make\n" "% su -\n" "Password:\n" "# make install\n" "# exit\n" "%\n" msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/handbook/basics/_index.adoc:343 msgid "" "The built-in man:su[1] framework works well for single systems or small " "networks with just one system administrator. An alternative is to install " "the package:security/sudo[] package or port. This software provides " "activity logging and allows the administrator to configure which users can " "run which commands as the superuser." msgstr "" #. type: Title === #: documentation/content/en/books/handbook/basics/_index.adoc:345 #, no-wrap msgid "Managing Accounts" msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/handbook/basics/_index.adoc:350 msgid "" "FreeBSD provides a variety of different commands to manage user accounts. " "The most common commands are summarized in <>, " "followed by some examples of their usage. See the manual page for each " "utility for more details and usage examples." msgstr "" #. type: Block title #: documentation/content/en/books/handbook/basics/_index.adoc:352 #, no-wrap msgid "Utilities for Managing User Accounts" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:356 #, no-wrap msgid "Command" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:358 #, no-wrap msgid "Summary" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:359 #, no-wrap msgid "man:adduser[8]" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:361 #, no-wrap msgid "The recommended command-line application for adding new users." msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:362 #, no-wrap msgid "man:rmuser[8]" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:364 #, no-wrap msgid "The recommended command-line application for removing users." msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:365 #, no-wrap msgid "man:chpass[1]" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:367 #, no-wrap msgid "A flexible tool for changing user database information." msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:368 #, no-wrap msgid "man:passwd[1]" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:370 #, no-wrap msgid "The command-line tool to change user passwords." msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:371 #, no-wrap msgid "man:pw[8]" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:373 #, no-wrap msgid "A powerful and flexible tool for modifying all aspects of user accounts." msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:374 #, no-wrap msgid "man:bsdconfig[8]" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:375 #, no-wrap msgid "A system configuration utility with account management support." msgstr "" #. type: Title ==== #: documentation/content/en/books/handbook/basics/_index.adoc:378 #, no-wrap msgid "Adding a user" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:384 msgid "" "The recommended program for adding new users is man:adduser[8]. When a new " "user is added, this program automatically updates `/etc/passwd` and `/etc/" "group`. It also creates a home directory for the new user, copies in the " "default configuration files from `/usr/share/skel`, and can optionally mail " "the new user a welcome message. This utility must be run as the superuser." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:389 msgid "" "The man:adduser[8] utility is interactive and walks through the steps for " "creating a new user account. As seen in <>, either " "input the required information or press kbd:[Return] to accept the default " "value shown in square brackets. In this example, the user has been invited " "into the `wheel` group, allowing them to become the superuser with man:" "su[1]. When finished, the utility will prompt to either create another user " "or to exit." msgstr "" #. type: Block title #: documentation/content/en/books/handbook/basics/_index.adoc:391 #, no-wrap msgid "Adding a User on FreeBSD" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/basics/_index.adoc:425 #, no-wrap msgid "" "# adduser\n" "Username: jru\n" "Full name: J. Random User\n" "Uid (Leave empty for default):\n" "Login group [jru]:\n" "Login group is jru. Invite jru into other groups? []: wheel\n" "Login class [default]:\n" "Shell (sh csh tcsh zsh nologin) [sh]: zsh\n" "Home directory [/home/jru]:\n" "Home directory permissions (Leave empty for default):\n" "Use password-based authentication? [yes]:\n" "Use an empty password? (yes/no) [no]:\n" "Use a random password? (yes/no) [no]:\n" "Enter password:\n" "Enter password again:\n" "Lock out the account after creation? [no]:\n" "Username : jru\n" "Password : ****\n" "Full Name : J. Random User\n" "Uid : 1001\n" "Class :\n" "Groups : jru wheel\n" "Home : /home/jru\n" "Shell : /usr/local/bin/zsh\n" "Locked : no\n" "OK? (yes/no): yes\n" "adduser: INFO: Successfully added (jru) to the user database.\n" "Add another user? (yes/no): no\n" "Goodbye!\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:431 msgid "" "Since the password is not echoed when typed, be careful to not mistype the " "password when creating the user account." msgstr "" #. type: Title ==== #: documentation/content/en/books/handbook/basics/_index.adoc:434 #, no-wrap msgid "Removing a user" msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/handbook/basics/_index.adoc:438 msgid "" "To completely remove a user from the system, run man:rmuser[8] as the " "superuser. This command performs the following steps:" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:442 msgid "Removes the user's man:crontab[1] entry, if one exists." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:443 msgid "Removes any man:at[1] jobs belonging to the user." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:444 msgid "Sends a SIGKILL signal to all processes owned by the user." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:445 msgid "Removes the user from the system's local password file." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:446 msgid "" "Removes the user's home directory (if it is owned by the user), including " "handling of symbolic links in the path to the actual home directory." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:447 msgid "Removes the incoming mail files belonging to the user from `/var/mail`." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:448 msgid "" "Removes all files owned by the user from `/tmp`, `/var/tmp`, and `/var/tmp/" "vi.recover`." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:449 msgid "" "Removes the username from all groups to which it belongs in `/etc/group`. " "(If a group becomes empty and the group name is the same as the username, " "the group is removed; this complements man:adduser[8]'s per-user unique " "groups.)" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:450 msgid "" "Removes all message queues, shared memory segments and semaphores owned by " "the user." msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/handbook/basics/_index.adoc:453 msgid "" "man:rmuser[8] cannot be used to remove superuser accounts since that is " "almost always an indication of massive destruction." msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/handbook/basics/_index.adoc:455 msgid "" "By default, an interactive mode is used, as shown in the following example." msgstr "" #. type: Block title #: documentation/content/en/books/handbook/basics/_index.adoc:456 #, no-wrap msgid "`rmuser` Interactive Account Removal" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/basics/_index.adoc:467 #, no-wrap msgid "" "# rmuser jru\n" "Matching password entry:\n" "jru:*:1001:1001::0:0:J. Random User:/home/jru:/usr/local/bin/zsh\n" "Is this the entry you wish to remove? y\n" "Remove user's home directory (/home/jru)? y\n" "Removing user (jru): mailspool home passwd.\n" msgstr "" #. type: Title ==== #: documentation/content/en/books/handbook/basics/_index.adoc:471 #, no-wrap msgid "Change user information" msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/handbook/basics/_index.adoc:475 msgid "" "Any user can use man:chpass[1] to change their default shell and personal " "information associated with their user account. The superuser can use this " "utility to change additional account information for any user." msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/handbook/basics/_index.adoc:478 msgid "" "When passed no options, aside from an optional username, man:chpass[1] " "displays an editor containing user information. When the user exits from " "the editor, the user database is updated with the new information." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:482 msgid "" "This utility will prompt for the user's password when exiting the editor, " "unless the utility is run as the superuser." msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/handbook/basics/_index.adoc:487 msgid "" "In <>, the superuser has typed `chpass jru` and " "is now viewing the fields that can be changed for this user. If `jru` runs " "this command instead, only the last six fields will be displayed and " "available for editing. This is shown in <>." msgstr "" #. type: Block title #: documentation/content/en/books/handbook/basics/_index.adoc:489 #, no-wrap msgid "Using `chpass` as Superuser" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/basics/_index.adoc:509 #, no-wrap msgid "" "#Changing user database information for jru.\n" "Login: jru\n" "Password: *\n" "Uid [#]: 1001\n" "Gid [# or name]: 1001\n" "Change [month day year]:\n" "Expire [month day year]:\n" "Class:\n" "Home directory: /home/jru\n" "Shell: /usr/local/bin/zsh\n" "Full Name: J. Random User\n" "Office Location:\n" "Office Phone:\n" "Home Phone:\n" "Other information:\n" msgstr "" #. type: Block title #: documentation/content/en/books/handbook/basics/_index.adoc:513 #, no-wrap msgid "Using `chpass` as Regular User" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/basics/_index.adoc:525 #, no-wrap msgid "" "#Changing user database information for jru.\n" "Shell: /usr/local/bin/zsh\n" "Full Name: J. Random User\n" "Office Location:\n" "Office Phone:\n" "Home Phone:\n" "Other information:\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:533 msgid "" "The commands man:chfn[1] and man:chsh[1] are links to man:chpass[1], as are " "man:ypchpass[1], man:ypchfn[1], and man:ypchsh[1]. Since NIS support is " "automatic, specifying the `yp` before the command is not necessary. How to " "configure NIS is covered in crossref:network-servers[network-servers,Network " "Servers]." msgstr "" #. type: Title ==== #: documentation/content/en/books/handbook/basics/_index.adoc:536 #, no-wrap msgid "Change user password" msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/handbook/basics/_index.adoc:540 msgid "" "Any user can easily change their password using man:passwd[1]. To prevent " "accidental or unauthorized changes, this command will prompt for the user's " "original password before a new password can be set:" msgstr "" #. type: Block title #: documentation/content/en/books/handbook/basics/_index.adoc:541 #, no-wrap msgid "Changing Your Password" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/basics/_index.adoc:553 #, no-wrap msgid "" "% passwd\n" "Changing local password for jru.\n" "Old password:\n" "New password:\n" "Retype new password:\n" "passwd: updating the database...\n" "passwd: done\n" msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/handbook/basics/_index.adoc:559 msgid "" "The superuser can change any user's password by specifying the username when " "running man:passwd[1]. When this utility is run as the superuser, it will " "not prompt for the user's current password. This allows the password to be " "changed when a user cannot remember the original password." msgstr "" #. type: Block title #: documentation/content/en/books/handbook/basics/_index.adoc:560 #, no-wrap msgid "Changing Another User's Password as the Superuser" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/basics/_index.adoc:571 #, no-wrap msgid "" "# passwd jru\n" "Changing local password for jru.\n" "New password:\n" "Retype new password:\n" "passwd: updating the database...\n" "passwd: done\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:577 msgid "" "As with man:chpass[1], man:yppasswd[1] is a link to man:passwd[1], so NIS " "works with either command." msgstr "" #. type: Title ==== #: documentation/content/en/books/handbook/basics/_index.adoc:580 #, no-wrap msgid "Create, remove, modify and display system users and groups" msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/handbook/basics/_index.adoc:585 msgid "" "The man:pw[8] utility can create, remove, modify, and display users and " "groups. It functions as a front end to the system user and group files. " "man:pw[8] has a very powerful set of command line options that make it " "suitable for use in shell scripts, but new users may find it more " "complicated than the other commands presented in this section." msgstr "" #. type: Title === #: documentation/content/en/books/handbook/basics/_index.adoc:587 #, no-wrap msgid "Managing Groups" msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/handbook/basics/_index.adoc:592 msgid "" "A group is a list of users. A group is identified by its group name and " "GID. In FreeBSD, the kernel uses the UID of a process, and the list of " "groups it belongs to, to determine what the process is allowed to do. Most " "of the time, the GID of a user or process usually means the first group in " "the list." msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/handbook/basics/_index.adoc:597 msgid "" "The group name to GID mapping is listed in `/etc/group`. This is a plain " "text file with four colon-delimited fields. The first field is the group " "name, the second is the encrypted password, the third the GID, and the " "fourth the comma-delimited list of members. For a more complete description " "of the syntax, refer to man:group[5]." msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/handbook/basics/_index.adoc:601 msgid "" "The superuser can modify `/etc/group` using a text editor, although editing " "the group file using man:vigr[8] is preferred because it can catch some " "common mistakes. Alternatively, man:pw[8] can be used to add and edit " "groups. For example, to add a group called `teamtwo` and then confirm that " "it exists:" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:605 msgid "" "Care must be taken when using the operator group, as unintended superuser-" "like access privileges may be granted, including but not limited to " "shutdown, reboot, and access to all items in `/dev` in the group." msgstr "" #. type: Block title #: documentation/content/en/books/handbook/basics/_index.adoc:607 #, no-wrap msgid "Adding a Group Using man:pw[8]" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/basics/_index.adoc:615 #, no-wrap msgid "" "# pw groupadd teamtwo\n" "# pw groupshow teamtwo\n" "teamtwo:*:1100:\n" msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/handbook/basics/_index.adoc:621 msgid "" "In this example, `1100` is the GID of `teamtwo`. Right now, `teamtwo` has " "no members. This command will add `jru` as a member of `teamtwo`." msgstr "" #. type: Block title #: documentation/content/en/books/handbook/basics/_index.adoc:622 #, no-wrap msgid "Adding User Accounts to a New Group Using man:pw[8]" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/basics/_index.adoc:630 #, no-wrap msgid "" "# pw groupmod teamtwo -M jru\n" "# pw groupshow teamtwo\n" "teamtwo:*:1100:jru\n" msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/handbook/basics/_index.adoc:637 msgid "" "The argument to `-M` is a comma-delimited list of users to be added to a new " "(empty) group or to replace the members of an existing group. To the user, " "this group membership is different from (and in addition to) the user's " "primary group listed in the password file. This means that the user will " "not show up as a member when using `groupshow` with man:pw[8], but will show " "up when the information is queried via man:id[1] or a similar tool. When " "man:pw[8] is used to add a user to a group, it only manipulates `/etc/group` " "and does not attempt to read additional data from `/etc/passwd`." msgstr "" #. type: Block title #: documentation/content/en/books/handbook/basics/_index.adoc:638 #, no-wrap msgid "Adding a New Member to a Group Using man:pw[8]" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/basics/_index.adoc:646 #, no-wrap msgid "" "# pw groupmod teamtwo -m db\n" "# pw groupshow teamtwo\n" "teamtwo:*:1100:jru,db\n" msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/handbook/basics/_index.adoc:651 msgid "" "In this example, the argument to `-m` is a comma-delimited list of users who " "are to be added to the group. Unlike the previous example, these users are " "appended to the group and do not replace existing users in the group." msgstr "" #. type: Block title #: documentation/content/en/books/handbook/basics/_index.adoc:652 #, no-wrap msgid "Using man:id[1] to Determine Group Membership" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/basics/_index.adoc:659 #, no-wrap msgid "" "% id jru\n" "uid=1001(jru) gid=1001(jru) groups=1001(jru), 1100(teamtwo)\n" msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/handbook/basics/_index.adoc:663 msgid "In this example, `jru` is a member of the groups `jru` and `teamtwo`." msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/handbook/basics/_index.adoc:665 msgid "" "For more information about this command and the format of `/etc/group`, " "refer to man:pw[8] and man:group[5]." msgstr "" #. type: Title == #: documentation/content/en/books/handbook/basics/_index.adoc:667 #, no-wrap msgid "Permissions" msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/handbook/basics/_index.adoc:671 msgid "" "In FreeBSD, every file and directory has an associated set of permissions " "and several utilities are available for viewing and modifying these " "permissions. Understanding how permissions work is necessary to make sure " "that users are able to access the files that they need and are unable to " "improperly access the files used by the operating system or owned by other " "users." msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/handbook/basics/_index.adoc:674 msgid "" "This section discusses the traditional UNIX(R) permissions used in FreeBSD. " "For finer-grained file system access control, refer to crossref:security[fs-" "acl,Access Control Lists]." msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/handbook/basics/_index.adoc:680 msgid "" "In UNIX(R), basic permissions are assigned using three types of access: " "read, write, and execute. These access types are used to determine file " "access to the file's owner, group, and others (everyone else). The read, " "write, and execute permissions can be represented as the letters `r`, `w`, " "and `x`. They can also be represented as binary numbers as each permission " "is either on or off (`0`). When represented as a number, the order is " "always read as `rwx`, where `r` has an on value of `4`, `w` has an on value " "of `2` and `x` has an on value of `1`." msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/handbook/basics/_index.adoc:683 msgid "" "Table 4.1 summarizes the possible numeric and alphabetic possibilities. " "When reading the \"Directory Listing\" column, a `-` is used to represent a " "permission that is set to off." msgstr "" #. type: Block title #: documentation/content/en/books/handbook/basics/_index.adoc:684 #, no-wrap msgid "UNIX(R) Permissions" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:688 #, no-wrap msgid "Value" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:689 #, no-wrap msgid "Permission" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:691 #, no-wrap msgid "Directory Listing" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:692 #, no-wrap msgid "0" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:693 #, no-wrap msgid "No read, no write, no execute" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:695 #, no-wrap msgid "`---`" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:696 #, no-wrap msgid "1" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:697 #, no-wrap msgid "No read, no write, execute" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:699 #, no-wrap msgid "`--x`" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:700 #, no-wrap msgid "2" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:701 #, no-wrap msgid "No read, write, no execute" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:703 #, no-wrap msgid "`-w-`" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:704 #, no-wrap msgid "3" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:705 #, no-wrap msgid "No read, write, execute" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:707 #, no-wrap msgid "`-wx`" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:708 #, no-wrap msgid "4" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:709 #, no-wrap msgid "Read, no write, no execute" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:711 #, no-wrap msgid "`r--`" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:712 #, no-wrap msgid "5" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:713 #, no-wrap msgid "Read, no write, execute" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:715 #, no-wrap msgid "`r-x`" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:716 #, no-wrap msgid "6" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:717 #, no-wrap msgid "Read, write, no execute" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:719 #, no-wrap msgid "`rw-`" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:720 #, no-wrap msgid "7" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:721 #, no-wrap msgid "Read, write, execute" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:722 #, no-wrap msgid "`rwx`" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:726 msgid "" "Use the `-l` argument with man:ls[1] to view a long directory listing that " "includes a column of information about a file's permissions for the owner, " "group, and everyone else. For example, `ls -l` in an arbitrary directory " "may show:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/basics/_index.adoc:734 #, no-wrap msgid "" "% ls -l\n" "total 530\n" "-rw-r--r-- 1 root wheel 512 Sep 5 12:31 myfile\n" "-rw-r--r-- 1 root wheel 512 Sep 5 12:31 otherfile\n" "-rw-r--r-- 1 root wheel 7680 Sep 5 12:31 email.txt\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:744 msgid "" "Focusing on the line for `myfile`, the first `(leftmost)` character " "indicates whether this file is a regular file, a directory, a special " "character device, a socket, or any other special pseudo-file device. In " "this example, the `-` indicates a regular file. The next three characters, " "`rw-` in this example, give the permissions for the owner of the file. The " "next three characters, `r--`, give the permissions for the group that the " "file belongs to. The final three characters, `r--`, give the permissions " "for the rest of the world. A dash means that the permission is turned off. " "In this example, the permissions are set so the owner can read and write to " "the file, the group can read the file, and the rest of the world can only " "read the file. According to the table above, the permissions for this file " "would be `644`, where each digit represents the three parts of the file's " "permission." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:747 msgid "" "How does the system control permissions on devices? FreeBSD treats most " "hardware devices as a file that programs can open, read, and write data to. " "These special device files are stored in `/dev/`." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:753 msgid "" "Directories are also treated as files. They have read, write, and execute " "permissions. The executable bit for a directory has a slightly different " "meaning than that of files. When a directory is marked executable, it means " "it is possible to change into that directory using man:cd[1]. This also " "means that it is possible to access the files within that directory, subject " "to the permissions on the files themselves." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:756 msgid "" "In order to perform a directory listing, the read permission must be set on " "the directory. In order to delete a file that one knows the name of, it is " "necessary to have write _and_ execute permissions to the directory " "containing the file." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:759 msgid "" "There are more permission bits, but they are primarily used in special " "circumstances such as setuid binaries and sticky directories. For more " "information on file permissions and how to set them, refer to man:chmod[1]." msgstr "" #. type: Title === #: documentation/content/en/books/handbook/basics/_index.adoc:760 #, no-wrap msgid "Symbolic Permissions" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:764 msgid "" "Symbolic permissions use characters instead of octal values to assign " "permissions to files or directories. Symbolic permissions use the syntax of " "(who) (action) (permissions), where the following values are available:" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:769 #, no-wrap msgid "Option" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:770 #, no-wrap msgid "Letter" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:772 #, no-wrap msgid "Represents" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:773 #: documentation/content/en/books/handbook/basics/_index.adoc:777 #: documentation/content/en/books/handbook/basics/_index.adoc:781 #: documentation/content/en/books/handbook/basics/_index.adoc:785 #, no-wrap msgid "(who)" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:774 #, no-wrap msgid "u" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:776 #, no-wrap msgid "User" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:778 #, no-wrap msgid "g" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:780 #, no-wrap msgid "Group owner" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:782 #, no-wrap msgid "o" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:784 #, no-wrap msgid "Other" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:786 #, no-wrap msgid "a" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:788 #, no-wrap msgid "All (\"world\")" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:789 #: documentation/content/en/books/handbook/basics/_index.adoc:793 #: documentation/content/en/books/handbook/basics/_index.adoc:797 #, no-wrap msgid "(action)" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:790 #, no-wrap msgid "+" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:792 #, no-wrap msgid "Adding permissions" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:794 #, no-wrap msgid "-" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:796 #, no-wrap msgid "Removing permissions" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:798 #, no-wrap msgid "=" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:800 #, no-wrap msgid "Explicitly set permissions" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:801 #: documentation/content/en/books/handbook/basics/_index.adoc:805 #: documentation/content/en/books/handbook/basics/_index.adoc:809 #: documentation/content/en/books/handbook/basics/_index.adoc:813 #: documentation/content/en/books/handbook/basics/_index.adoc:817 #, no-wrap msgid "(permissions)" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:802 #, no-wrap msgid "r" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:804 #, no-wrap msgid "Read" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:806 #, no-wrap msgid "w" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:808 #, no-wrap msgid "Write" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:810 #, no-wrap msgid "x" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:812 #, no-wrap msgid "Execute" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:814 #, no-wrap msgid "t" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:816 #, no-wrap msgid "Sticky bit" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:818 #, no-wrap msgid "s" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:819 #, no-wrap msgid "Set UID or GID" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:823 msgid "" "These values are used with man:chmod[1], but with letters instead of " "numbers. For example, the following command would block both members of the " "group associated with _FILE_ and all other users from accessing _FILE_:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/basics/_index.adoc:827 #, no-wrap msgid "% chmod go= FILE\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:831 msgid "" "A comma separated list can be provided when more than one set of changes to " "a file must be made. For example, the following command removes the group " "and \"world\" write permission on _FILE_, and adds the execute permissions " "for everyone:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/basics/_index.adoc:835 #, no-wrap msgid "% chmod go-w,a+x FILE\n" msgstr "" #. type: Title === #: documentation/content/en/books/handbook/basics/_index.adoc:837 #, no-wrap msgid "FreeBSD File Flags" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:842 msgid "" "In addition to file permissions, FreeBSD supports the use of \"file " "flags\". These flags add an additional level of security and control over " "files, but not directories. With file flags, even `root` can be prevented " "from removing or altering files." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:845 msgid "" "File flags are modified using man:chflags[1]. For example, to enable the " "system undeletable flag on the file `file1`, issue the following command:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/basics/_index.adoc:849 #, no-wrap msgid "# chflags sunlink file1\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:852 msgid "" "To disable the system undeletable flag, put a \"no\" in front of the " "`sunlink`:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/basics/_index.adoc:856 #, no-wrap msgid "# chflags nosunlink file1\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:859 msgid "To view the flags of a file, use `-lo` with man:ls[1]:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/basics/_index.adoc:863 #, no-wrap msgid "# ls -lo file1\n" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/basics/_index.adoc:868 #, no-wrap msgid "-rw-r--r-- 1 trhodes trhodes sunlnk 0 Mar 1 05:54 file1\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:873 msgid "" "Several file flags may only be added or removed by the `root` user. In " "other cases, the file owner may set its file flags. Refer to man:chflags[1] " "and man:chflags[2] for more information." msgstr "" #. type: Title === #: documentation/content/en/books/handbook/basics/_index.adoc:874 #, no-wrap msgid "The setuid, setgid, and sticky Permissions" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:878 msgid "" "Other than the permissions already discussed, there are three other specific " "settings that all administrators should know about. They are the `setuid`, " "`setgid`, and `sticky` permissions." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:881 msgid "" "These settings are important for some UNIX(R) operations as they provide " "functionality not normally granted to normal users. To understand them, the " "difference between the real user ID and effective user ID must be noted." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:887 msgid "" "The real user ID is the UID who owns or starts the process. The effective " "UID is the user ID the process runs as. As an example, man:passwd[1] runs " "with the real user ID when a user changes their password. However, in order " "to update the password database, the command runs as the effective ID of the " "`root` user. This allows users to change their passwords without seeing a " "`Permission Denied` error." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:889 msgid "" "The setuid permission may be added symbolically by adding the `s` permission " "for the user as in the following example:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/basics/_index.adoc:893 #, no-wrap msgid "# chmod u+s suidexample.sh\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:896 msgid "" "The setuid permission may also be set by prefixing a permission set with the " "number four (4) as shown in the following example:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/basics/_index.adoc:900 #, no-wrap msgid "# chmod 4755 suidexample.sh\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:903 msgid "The permissions on `suidexample.sh` now look like the following:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/basics/_index.adoc:907 #, no-wrap msgid "-rwsr-xr-x 1 trhodes trhodes 63 Aug 29 06:36 suidexample.sh\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:911 msgid "" "Note that a `s` is now part of the permission set designated for the file " "owner, replacing the executable bit. This allows utilities which need " "elevated permissions, such as man:passwd[1]." msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/handbook/basics/_index.adoc:916 msgid "" "The `nosuid` man:mount[8] option will cause such binaries to silently fail " "without alerting the user. That option is not completely reliable as a " "`nosuid` wrapper may be able to circumvent it." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:921 msgid "" "To view this in real time, open two terminals. On one, type `passwd` as a " "normal user. While it waits for a new password, check the process table and " "look at the user information for man:passwd[1]:" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:923 msgid "In terminal A:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/basics/_index.adoc:928 #, no-wrap msgid "" "Changing local password for trhodes\n" "Old Password:\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:931 msgid "In terminal B:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/basics/_index.adoc:935 #, no-wrap msgid "# ps aux | grep passwd\n" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/basics/_index.adoc:941 #, no-wrap msgid "" "trhodes 5232 0.0 0.2 3420 1608 0 R+ 2:10AM 0:00.00 grep passwd\n" "root 5211 0.0 0.2 3620 1724 2 I+ 2:09AM 0:00.01 passwd\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:944 msgid "" "Although man:passwd[1] is run as a normal user, it is using the effective " "UID of `root`." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:947 msgid "" "The `setgid` permission performs the same function as the `setuid` " "permission; except that it alters the group settings. When an application " "or utility executes with this setting, it will be granted the permissions " "based on the group that owns the file, not the user who started the process." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:949 msgid "" "To set the `setgid` permission on a file symbolically, add the `s` " "permission for the group with man:chmod[1]:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/basics/_index.adoc:953 #, no-wrap msgid "# chmod g+s sgidexample.sh\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:956 msgid "Alternatively, provide man:chmod[1] with a leading two (2):" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/basics/_index.adoc:960 #, no-wrap msgid "# chmod 2755 sgidexample.sh\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:963 msgid "" "In the following listing, notice that the `s` is now in the field designated " "for the group permission settings:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/basics/_index.adoc:967 #, no-wrap msgid "-rwxr-sr-x 1 trhodes trhodes 44 Aug 31 01:49 sgidexample.sh\n" msgstr "" #. type: delimited block = 4 #: documentation/content/en/books/handbook/basics/_index.adoc:973 msgid "" "In these examples, even though the shell script in question is an executable " "file, it will not run with a different EUID or effective user ID. This is " "because shell scripts may not access the man:setuid[2] system calls." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:977 msgid "" "The `setuid` and `setgid` permission bits may lower system security, by " "allowing for elevated permissions. The third special permission, the " "`sticky bit`, can strengthen the security of a system." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:981 msgid "" "When the `sticky bit` is set on a directory, it allows file deletion only by " "the file owner. This is useful to prevent file deletion in public " "directories, such as `/tmp`, by users who do not own the file. To utilize " "this permission, add the `t` mode to the file:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/basics/_index.adoc:985 #, no-wrap msgid "# chmod +t /tmp\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:988 msgid "Alternatively, prefix the permission set with a one (1):" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/basics/_index.adoc:992 #, no-wrap msgid "# chmod 1777 /tmp\n" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:995 msgid "" "The `sticky bit` permission will display as a `t` at the very end of the " "permission set:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/basics/_index.adoc:999 #, no-wrap msgid "# ls -al / | grep tmp\n" msgstr "" #. type: delimited block . 4 #: documentation/content/en/books/handbook/basics/_index.adoc:1004 #, no-wrap msgid "drwxrwxrwt 10 root wheel 512 Aug 31 01:49 tmp\n" msgstr "" #. type: Title == #: documentation/content/en/books/handbook/basics/_index.adoc:1007 #, no-wrap msgid "Directory Structure" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:1013 msgid "" "The FreeBSD directory hierarchy is fundamental to obtaining an overall " "understanding of the system. The most important directory is root or, \"/" "\". This directory is the first one mounted at boot time and it contains " "the base system necessary to prepare the operating system for multi-user " "operation. The root directory also contains mount points for other file " "systems that are mounted during the transition to multi-user operation." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:1021 msgid "" "A mount point is a directory where additional file systems can be grafted " "onto a parent file system (usually the root file system). This is further " "described in <>. Standard mount points include `/usr/`, " "`/var/`, `/tmp/`, `/mnt/`, and `/cdrom/`. These directories are usually " "referenced to entries in `/etc/fstab`. This file is a table of various file " "systems and mount points and is read by the system. Most of the file " "systems in `/etc/fstab` are mounted automatically at boot time from the " "script man:rc[8] unless their entry includes `noauto`. Details can be found " "in <>." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:1024 msgid "" "A complete description of the file system hierarchy is available in man:" "hier[7]. The following table provides a brief overview of the most common " "directories." msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:1028 #, no-wrap msgid "Directory" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:1030 -#: documentation/content/en/books/handbook/basics/_index.adoc:1603 +#: documentation/content/en/books/handbook/basics/_index.adoc:1623 #, no-wrap msgid "Description" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:1031 #, no-wrap msgid "`/`" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:1033 #, no-wrap msgid "Root directory of the file system." msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:1034 #, no-wrap msgid "`/bin/`" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:1036 #, no-wrap msgid "User utilities fundamental to both single-user and multi-user environments." msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:1037 #, no-wrap msgid "`/boot/`" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:1039 #, no-wrap msgid "Programs and configuration files used during operating system bootstrap." msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:1040 #, no-wrap msgid "`/boot/defaults/`" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:1042 #, no-wrap msgid "Default boot configuration files. Refer to man:loader.conf[5] for details." msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:1043 #, no-wrap msgid "`/dev/`" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:1045 #, no-wrap msgid "Device special files managed by man:devfs[5]" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:1046 #, no-wrap msgid "`/etc/`" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:1048 #, no-wrap msgid "System configuration files and scripts." msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:1049 #, no-wrap msgid "`/etc/defaults/`" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:1051 #, no-wrap msgid "Default system configuration files. Refer to man:rc[8] for details." msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:1052 #, no-wrap msgid "`/etc/periodic/`" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:1054 #, no-wrap msgid "Scripts that run daily, weekly, and monthly, via man:cron[8]. Refer to man:periodic[8] for details." msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:1055 #, no-wrap msgid "`/lib/`" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:1057 #, no-wrap msgid "Critical system libraries needed for binaries in `/bin` and `/sbin`" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:1058 #, no-wrap msgid "`/libexec/`" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:1060 #, no-wrap msgid "Critical system files" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:1061 #, no-wrap msgid "`/media/`" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:1063 #, no-wrap msgid "Contains subdirectories to be used as mount points for removable media such as CDs, USB drives, and floppy disks" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:1064 #, no-wrap msgid "`/mnt/`" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:1066 #, no-wrap msgid "Empty directory commonly used by system administrators as a temporary mount point." msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:1067 #, no-wrap msgid "`/net/`" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:1069 #, no-wrap msgid "Automounted NFS shares; see man:auto_master[5]" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:1070 #, no-wrap msgid "`/proc/`" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:1072 #, no-wrap msgid "Process file system. Refer to man:procfs[5], man:mount_procfs[8] for details." msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:1073 #, no-wrap msgid "`/rescue/`" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:1075 #, no-wrap msgid "Statically linked programs for emergency recovery as described in man:rescue[8]." msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:1076 #, no-wrap msgid "`/root/`" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:1078 #, no-wrap msgid "Home directory for the `root` account." msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:1079 #, no-wrap msgid "`/sbin/`" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:1081 #, no-wrap msgid "System programs and administration utilities fundamental to both single-user and multi-user environments." msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:1082 #, no-wrap msgid "`/tmp/`" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:1084 #, no-wrap msgid "Temporary files which are usually _not_ preserved across a system reboot. A memory-based file system is often mounted at `/tmp`. This can be automated using the tmpmfs-related variables of man:rc.conf[5] or with an entry in `/etc/fstab`; refer to man:mdmfs[8] for details." msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:1085 #, no-wrap msgid "`/usr/`" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:1087 #, no-wrap msgid "The majority of user utilities and applications." msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:1088 #, no-wrap msgid "`/usr/bin/`" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:1090 #, no-wrap msgid "Common utilities, programming tools, and applications." msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:1091 #, no-wrap msgid "`/usr/include/`" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:1093 #, no-wrap msgid "Standard C include files." msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:1094 #, no-wrap msgid "`/usr/lib/`" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:1096 #, no-wrap msgid "Archive libraries." msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:1097 #, no-wrap msgid "`/usr/libdata/`" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:1099 #, no-wrap msgid "Miscellaneous utility data files." msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:1100 #, no-wrap msgid "`/usr/libexec/`" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:1102 #, no-wrap msgid "System daemons and system utilities executed by other programs." msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:1103 #, no-wrap msgid "`/usr/local/`" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:1105 #, no-wrap msgid "Local executables and libraries. Also used as the default destination for the FreeBSD ports framework. Within `/usr/local`, the general layout sketched out by man:hier[7] for `/usr` should be used. Exceptions are the man directory, which is directly under `/usr/local` rather than under `/usr/local/share`, and the ports documentation is in `share/doc/port`." msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:1106 #, no-wrap msgid "`/usr/ports/`" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:1108 #, no-wrap msgid "The FreeBSD Ports Collection (optional)." msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:1109 #, no-wrap msgid "`/usr/sbin/`" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:1111 #, no-wrap msgid "System daemons and system utilities executed by users." msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:1112 #, no-wrap msgid "`/usr/share/`" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:1114 #, no-wrap msgid "Architecture-independent files." msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:1115 #, no-wrap msgid "`/usr/src/`" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:1117 #, no-wrap msgid "BSD and/or local source files." msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:1118 #, no-wrap msgid "`/var/`" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:1120 #, no-wrap msgid "Multi-purpose log, temporary, transient, and spool files." msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:1121 #, no-wrap msgid "`/var/log/`" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:1123 #, no-wrap msgid "Miscellaneous system log files." msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:1124 #, no-wrap msgid "`/var/tmp/`" msgstr "" #. type: Table #: documentation/content/en/books/handbook/basics/_index.adoc:1126 #, no-wrap msgid "Temporary files which are usually preserved across a system reboot." msgstr "" #. type: Title == #: documentation/content/en/books/handbook/basics/_index.adoc:1129 #, no-wrap msgid "Disk Organization" msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:1134 msgid "" "The smallest unit of organization that FreeBSD uses to find files is the " "filename. Filenames are case-sensitive, which means that `readme.txt` and " "`README.TXT` are two separate files. FreeBSD does not use the extension of " "a file to determine whether the file is a program, document, or some other " "form of data." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:1138 msgid "" "Files are stored in directories. A directory may contain no files, or it " "may contain many hundreds of files. A directory can also contain other " "directories, allowing a hierarchy of directories within one another in order " "to organize data." msgstr "" #. type: Plain text #: documentation/content/en/books/handbook/basics/_index.adoc:1144 msgid "" "Files and directories are referenced by giving the file or directory name, " "followed by a forward slash, `/`, followed by any other directory names that " "are necessary. For example, if the directory `foo` contains a directory " "`bar` which contains the file `readme.txt`, the full name, or _path_, to the " "file is `foo/bar/readme.txt`. Note that this is different from Windows(R) " "which uses `\\` to separate file and directory names. FreeBSD does not use " "drive letters, or other drive names in the path. For example, one would not " "type `c:\\foo\\bar\\readme.txt` on FreeBSD." msgstr "" +#. type: Title === +#: documentation/content/en/books/handbook/basics/_index.adoc:1146 +#, no-wrap +msgid "File systems" +msgstr "" + #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1151 +#: documentation/content/en/books/handbook/basics/_index.adoc:1154 msgid "" "Directories and files are stored in a file system. Each file system " "contains exactly one directory at the very top level, called the _root " "directory_ for that file system. This root directory can contain other " "directories. One file system is designated the _root file system_ or `/`. " "Every other file system is _mounted_ under the root file system. No matter " "how many disks are on the FreeBSD system, every directory appears to be part " "of the same disk." msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1154 +#: documentation/content/en/books/handbook/basics/_index.adoc:1157 msgid "" "Consider three file systems, called `A`, `B`, and `C`. Each file system has " "one root directory, which contains two other directories, called `A1`, `A2` " "(and likewise `B1`, `B2` and `C1`, `C2`)." msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1158 +#: documentation/content/en/books/handbook/basics/_index.adoc:1161 msgid "" "Call `A` the root file system. If man:ls[1] is used to view the contents of " "this directory, it will show two subdirectories, `A1` and `A2`. The " "directory tree looks like this:" msgstr "" #. type: Positional ($1) AttributeList argument for macro 'image' -#: documentation/content/en/books/handbook/basics/_index.adoc:1159 -#: documentation/content/en/books/handbook/basics/_index.adoc:1164 -#: documentation/content/en/books/handbook/basics/_index.adoc:1172 +#: documentation/content/en/books/handbook/basics/_index.adoc:1162 +#: documentation/content/en/books/handbook/basics/_index.adoc:1167 +#: documentation/content/en/books/handbook/basics/_index.adoc:1175 #, no-wrap msgid "Directory tree with the root directory and two subdirectories" msgstr "" #. type: Target for macro image -#: documentation/content/en/books/handbook/basics/_index.adoc:1159 +#: documentation/content/en/books/handbook/basics/_index.adoc:1162 #, no-wrap msgid "example-dir1.png" msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1163 +#: documentation/content/en/books/handbook/basics/_index.adoc:1166 msgid "" "A file system must be mounted on to a directory in another file system. " "When mounting file system `B` on to the directory `A1`, the root directory " "of `B` replaces `A1`, and the directories in `B` appear accordingly:" msgstr "" #. type: Target for macro image -#: documentation/content/en/books/handbook/basics/_index.adoc:1164 +#: documentation/content/en/books/handbook/basics/_index.adoc:1167 #, no-wrap msgid "example-dir2.png" msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1169 +#: documentation/content/en/books/handbook/basics/_index.adoc:1172 msgid "" "Any files that are in the `B1` or `B2` directories can be reached with the " "path `/A1/B1` or `/A1/B2` as necessary. Any files that were in `/A1` have " "been temporarily hidden. They will reappear if `B` is _unmounted_ from `A`." msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1171 +#: documentation/content/en/books/handbook/basics/_index.adoc:1174 msgid "If `B` had been mounted on `A2` then the diagram would look like this:" msgstr "" #. type: Target for macro image -#: documentation/content/en/books/handbook/basics/_index.adoc:1172 +#: documentation/content/en/books/handbook/basics/_index.adoc:1175 #, no-wrap msgid "example-dir3.png" msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1175 +#: documentation/content/en/books/handbook/basics/_index.adoc:1178 msgid "and the paths would be `/A2/B1` and `/A2/B2` respectively." msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1178 +#: documentation/content/en/books/handbook/basics/_index.adoc:1181 msgid "" "File systems can be mounted on top of one another. Continuing the last " "example, the `C` file system could be mounted on top of the `B1` directory " "in the `B` file system, leading to this arrangement:" msgstr "" #. type: Positional ($1) AttributeList argument for macro 'image' -#: documentation/content/en/books/handbook/basics/_index.adoc:1179 -#: documentation/content/en/books/handbook/basics/_index.adoc:1183 +#: documentation/content/en/books/handbook/basics/_index.adoc:1182 +#: documentation/content/en/books/handbook/basics/_index.adoc:1186 #, no-wrap msgid "A complex directory tree. With different subdirectories hanging from root." msgstr "" #. type: Target for macro image -#: documentation/content/en/books/handbook/basics/_index.adoc:1179 +#: documentation/content/en/books/handbook/basics/_index.adoc:1182 #, no-wrap msgid "example-dir4.png" msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1182 +#: documentation/content/en/books/handbook/basics/_index.adoc:1185 msgid "" "Or `C` could be mounted directly on to the `A` file system, under the `A1` " "directory:" msgstr "" #. type: Target for macro image -#: documentation/content/en/books/handbook/basics/_index.adoc:1183 +#: documentation/content/en/books/handbook/basics/_index.adoc:1186 #, no-wrap msgid "example-dir5.png" msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1187 +#: documentation/content/en/books/handbook/basics/_index.adoc:1190 msgid "" "It is entirely possible to have one large root file system, and not need to " "create any others. There are some drawbacks to this approach, and one " "advantage." msgstr "" #. type: Block title -#: documentation/content/en/books/handbook/basics/_index.adoc:1188 +#: documentation/content/en/books/handbook/basics/_index.adoc:1191 #, no-wrap msgid "Benefits of Multiple File Systems" msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1190 +#: documentation/content/en/books/handbook/basics/_index.adoc:1193 msgid "" "Different file systems can have different _mount options_. For example, the " "root file system can be mounted read-only, making it impossible for users to " "inadvertently delete or edit a critical file. Separating user-writable file " "systems, such as `/home`, from other file systems allows them to be mounted " "_nosuid_. This option prevents the _suid_/_guid_ bits on executables stored " "on the file system from taking effect, possibly improving security." msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1191 +#: documentation/content/en/books/handbook/basics/_index.adoc:1194 msgid "" "FreeBSD automatically optimizes the layout of files on a file system, " "depending on how the file system is being used. So a file system that " "contains many small files that are written frequently will have a different " "optimization to one that contains fewer, larger files. By having one big " "file system this optimization breaks down." msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1192 +#: documentation/content/en/books/handbook/basics/_index.adoc:1195 msgid "" "FreeBSD's file systems are robust if power is lost. However, a power loss at " "a critical point could still damage the structure of the file system. By " "splitting data over multiple file systems it is more likely that the system " "will still come up, making it easier to restore from backup as necessary." msgstr "" #. type: Block title -#: documentation/content/en/books/handbook/basics/_index.adoc:1193 +#: documentation/content/en/books/handbook/basics/_index.adoc:1196 #, no-wrap msgid "Benefit of a Single File System" msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1195 +#: documentation/content/en/books/handbook/basics/_index.adoc:1198 msgid "" "File systems are a fixed size. If you create a file system when you install " "FreeBSD and give it a specific size, you may later discover that you need to " "make the partition bigger. This is not easily accomplished without backing " "up, recreating the file system with the new size, and then restoring the " "backed up data." msgstr "" #. type: delimited block = 4 -#: documentation/content/en/books/handbook/basics/_index.adoc:1202 +#: documentation/content/en/books/handbook/basics/_index.adoc:1205 msgid "" "FreeBSD features the man:growfs[8] command, which makes it possible to " "increase the size of file system on the fly, removing this limitation. A " "file system can only be expanded into free space in the partition in which " "it resides. If there is space after the partition, the partition can be " "expanded with man:gpart[8]. If the partition is the last one on a virtual " "disk, and the disk is expanded, the partition can then be expanded." msgstr "" -#. type: Plain text +#. type: Title === #: documentation/content/en/books/handbook/basics/_index.adoc:1208 +#, no-wrap +msgid "Disk partitions" +msgstr "" + +#. type: Plain text +#: documentation/content/en/books/handbook/basics/_index.adoc:1221 +msgid "" +"File systems are contained in _partitions_. Disks are divided into " +"partitions using one of several partitioning schemes; see <>. The newer scheme is GPT; older BIOS-based computers use MBR. GPT " +"supports division of a disk into partitions with a size, offset, and type. " +"It supports a large number of partitions and partition types, and is " +"recommended whenever its use is possible. GPT partitions use the disk name " +"with a suffix, where the suffix is `p1` for the first partition, `p2` for " +"the second, and so on. MBR, however, supports only a small number of " +"partitions. The MBR partitions are known in FreeBSD as `slices`. Slices " +"may be used for different operating systems. FreeBSD slices are subdivided " +"into partitions using BSD labels (see man:bsdlabel[8])." +msgstr "" + +#. type: Plain text +#: documentation/content/en/books/handbook/basics/_index.adoc:1227 +msgid "" +"Slice numbers follow the device name, prefixed with an `s`, starting at 1. " +"So \"da0__s1__\" is the first slice on the first SCSI drive. There can only " +"be four physical slices on a disk, but there can be logical slices inside " +"physical slices of the appropriate type. These extended slices are numbered " +"starting at 5, so \"ada0__s5__\" is the first extended slice on the first " +"SATA disk. These devices are used by file systems that expect to occupy a " +"slice." +msgstr "" + +#. type: Plain text +#: documentation/content/en/books/handbook/basics/_index.adoc:1229 msgid "" -"File systems are contained in partitions. This does not have the same " -"meaning as the common usage of the term partition (for example, MS-DOS(R) " -"partition), because of FreeBSD's UNIX(R) heritage. Each partition is " -"identified by a letter from `a` through to `h`. Each partition can contain " -"only one file system, which means that file systems are often described by " -"either their typical mount point in the file system hierarchy, or the letter " -"of the partition they are contained in." +"Each GPT or BSD partition can contain only one file system, which means that " +"file systems are often described by either their typical mount point in the " +"file system hierarchy, or the name of the partition they are contained in." msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1212 +#: documentation/content/en/books/handbook/basics/_index.adoc:1234 msgid "" "FreeBSD also uses disk space for _swap space_ to provide _virtual memory_. " "This allows your computer to behave as though it has much more memory than " "it actually does. When FreeBSD runs out of memory, it moves some of the " "data that is not currently being used to the swap space, and moves it back " -"in (moving something else out) when it needs it." +"in (moving something else out) when it needs it. This is called _paging_." msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1214 -msgid "Some partitions have certain conventions associated with them." +#: documentation/content/en/books/handbook/basics/_index.adoc:1236 +msgid "Some BSD partitions have certain conventions associated with them." msgstr "" #. type: Table -#: documentation/content/en/books/handbook/basics/_index.adoc:1218 +#: documentation/content/en/books/handbook/basics/_index.adoc:1240 #, no-wrap msgid "Partition" msgstr "" #. type: Table -#: documentation/content/en/books/handbook/basics/_index.adoc:1220 +#: documentation/content/en/books/handbook/basics/_index.adoc:1242 #, no-wrap msgid "Convention" msgstr "" #. type: Table -#: documentation/content/en/books/handbook/basics/_index.adoc:1221 +#: documentation/content/en/books/handbook/basics/_index.adoc:1243 #, no-wrap msgid "`a`" msgstr "" #. type: Table -#: documentation/content/en/books/handbook/basics/_index.adoc:1223 +#: documentation/content/en/books/handbook/basics/_index.adoc:1245 #, no-wrap msgid "Normally contains the root file system." msgstr "" #. type: Table -#: documentation/content/en/books/handbook/basics/_index.adoc:1224 +#: documentation/content/en/books/handbook/basics/_index.adoc:1246 #, no-wrap msgid "`b`" msgstr "" #. type: Table -#: documentation/content/en/books/handbook/basics/_index.adoc:1226 +#: documentation/content/en/books/handbook/basics/_index.adoc:1248 #, no-wrap msgid "Normally contains swap space." msgstr "" #. type: Table -#: documentation/content/en/books/handbook/basics/_index.adoc:1227 +#: documentation/content/en/books/handbook/basics/_index.adoc:1249 #, no-wrap msgid "`c`" msgstr "" #. type: Table -#: documentation/content/en/books/handbook/basics/_index.adoc:1229 +#: documentation/content/en/books/handbook/basics/_index.adoc:1251 #, no-wrap msgid "Normally the same size as the enclosing slice. This allows utilities that need to work on the entire slice, such as a bad block scanner, to work on the `c` partition. A file system would not normally be created on this partition." msgstr "" #. type: Table -#: documentation/content/en/books/handbook/basics/_index.adoc:1230 +#: documentation/content/en/books/handbook/basics/_index.adoc:1252 #, no-wrap msgid "`d`" msgstr "" #. type: Table -#: documentation/content/en/books/handbook/basics/_index.adoc:1231 +#: documentation/content/en/books/handbook/basics/_index.adoc:1253 #, no-wrap msgid "Partition `d` used to have a special meaning associated with it, although that is now gone and `d` may work as any normal partition." msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1235 -msgid "" -"Disks in FreeBSD are divided into slices, referred to in Windows(R) as " -"partitions, which are numbered from 1 to 4. These are then divided into " -"partitions, which contain file systems, and are labeled using letters." -msgstr "" - -#. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1241 -msgid "" -"Slice numbers follow the device name, prefixed with an `s`, starting at 1. " -"So \"da0__s1__\" is the first slice on the first SCSI drive. There can only " -"be four physical slices on a disk, but there can be logical slices inside " -"physical slices of the appropriate type. These extended slices are numbered " -"starting at 5, so \"ada0__s5__\" is the first extended slice on the first " -"SATA disk. These devices are used by file systems that expect to occupy a " -"slice." -msgstr "" - -#. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1245 +#: documentation/content/en/books/handbook/basics/_index.adoc:1258 msgid "" -"Slices, \"dangerously dedicated\" physical drives, and other drives contain " -"_partitions_, which are represented as letters from `a` to `h`. This letter " -"is appended to the device name, so \"da0__a__\" is the `a` partition on the " -"first `da` drive, which is \"dangerously dedicated\". \"ada1s3__e__\" is " -"the fifth partition in the third slice of the second SATA disk drive." +"Slices and \"dangerously dedicated\" physical drives contain BSD partitions, " +"which are represented as letters from `a` to `h`. This letter is appended " +"to the device name, so \"da0__a__\" is the `a` partition on the first `da` " +"drive, which is \"dangerously dedicated\". \"ada1s3__e__\" is the fifth " +"partition in the third slice of the second SATA disk drive." msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1250 +#: documentation/content/en/books/handbook/basics/_index.adoc:1263 msgid "" "Finally, each disk on the system is identified. A disk name starts with a " "code that indicates the type of disk, and then a number, indicating which " -"disk it is. Unlike slices, disk numbering starts at 0. Common codes are " -"listed in <>." +"disk it is. Unlike partitions and slices, disk numbering starts at 0. " +"Common codes are listed in <>." msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1253 +#: documentation/content/en/books/handbook/basics/_index.adoc:1267 msgid "" -"When referring to a partition, include the disk name, `s`, the slice number, " -"and then the partition letter. Examples are shown in <>." +"When referring to a partition in a slice, include the disk name, `s`, the " +"slice number, and then the partition letter. Examples are shown in <>. GPT partitions include the disk name, `p`, and then the " +"partition number." msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1255 +#: documentation/content/en/books/handbook/basics/_index.adoc:1269 msgid "" -"<> shows a conceptual model of a disk layout." +"<> shows a conceptual model of a disk layout " +"using MBR slices." msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1257 +#: documentation/content/en/books/handbook/basics/_index.adoc:1274 msgid "" -"When installing FreeBSD, configure the disk slices, create partitions within " -"the slice to be used for FreeBSD, create a file system or swap space in each " -"partition, and decide where each file system will be mounted." +"When installing FreeBSD, configure the disk slices if using MBR, and create " +"partitions within the slice to be used for FreeBSD. If using GPT, configure " +"partitions for each file system. In either case, create a file system or " +"swap space in each partition, and decide where each file system will be " +"mounted. See man:gpart[8] for information on manipulating partitions." msgstr "" #. type: Block title -#: documentation/content/en/books/handbook/basics/_index.adoc:1259 +#: documentation/content/en/books/handbook/basics/_index.adoc:1276 #, no-wrap msgid "Disk Device Names" msgstr "" #. type: Table -#: documentation/content/en/books/handbook/basics/_index.adoc:1263 +#: documentation/content/en/books/handbook/basics/_index.adoc:1280 #, no-wrap msgid "Drive Type" msgstr "" #. type: Table -#: documentation/content/en/books/handbook/basics/_index.adoc:1265 +#: documentation/content/en/books/handbook/basics/_index.adoc:1282 #, no-wrap msgid "Drive Device Name" msgstr "" #. type: Table -#: documentation/content/en/books/handbook/basics/_index.adoc:1266 +#: documentation/content/en/books/handbook/basics/_index.adoc:1283 #, no-wrap msgid "SATA and IDE hard drives" msgstr "" #. type: Table -#: documentation/content/en/books/handbook/basics/_index.adoc:1268 +#: documentation/content/en/books/handbook/basics/_index.adoc:1285 #, no-wrap msgid "`ada`" msgstr "" #. type: Table -#: documentation/content/en/books/handbook/basics/_index.adoc:1269 +#: documentation/content/en/books/handbook/basics/_index.adoc:1286 #, no-wrap msgid "SCSI hard drives and USB storage devices" msgstr "" #. type: Table -#: documentation/content/en/books/handbook/basics/_index.adoc:1271 +#: documentation/content/en/books/handbook/basics/_index.adoc:1288 #, no-wrap msgid "`da`" msgstr "" #. type: Table -#: documentation/content/en/books/handbook/basics/_index.adoc:1272 +#: documentation/content/en/books/handbook/basics/_index.adoc:1289 #, no-wrap msgid "NVMe storage" msgstr "" #. type: Table -#: documentation/content/en/books/handbook/basics/_index.adoc:1274 +#: documentation/content/en/books/handbook/basics/_index.adoc:1291 #, no-wrap msgid "`nvd` or `nda`" msgstr "" #. type: Table -#: documentation/content/en/books/handbook/basics/_index.adoc:1275 +#: documentation/content/en/books/handbook/basics/_index.adoc:1292 #, no-wrap msgid "SATA and IDE CD-ROM drives" msgstr "" #. type: Table -#: documentation/content/en/books/handbook/basics/_index.adoc:1277 -#: documentation/content/en/books/handbook/basics/_index.adoc:1280 +#: documentation/content/en/books/handbook/basics/_index.adoc:1294 +#: documentation/content/en/books/handbook/basics/_index.adoc:1297 #, no-wrap msgid "`cd`" msgstr "" #. type: Table -#: documentation/content/en/books/handbook/basics/_index.adoc:1278 +#: documentation/content/en/books/handbook/basics/_index.adoc:1295 #, no-wrap -msgid "SCSICD-ROM drives" +msgid "SCSI CD-ROM drives" msgstr "" #. type: Table -#: documentation/content/en/books/handbook/basics/_index.adoc:1281 +#: documentation/content/en/books/handbook/basics/_index.adoc:1298 #, no-wrap msgid "Floppy drives" msgstr "" #. type: Table -#: documentation/content/en/books/handbook/basics/_index.adoc:1283 +#: documentation/content/en/books/handbook/basics/_index.adoc:1300 #, no-wrap msgid "`fd`" msgstr "" #. type: Table -#: documentation/content/en/books/handbook/basics/_index.adoc:1284 +#: documentation/content/en/books/handbook/basics/_index.adoc:1301 #, no-wrap msgid "SCSI tape drives" msgstr "" #. type: Table -#: documentation/content/en/books/handbook/basics/_index.adoc:1286 +#: documentation/content/en/books/handbook/basics/_index.adoc:1303 #, no-wrap msgid "`sa`" msgstr "" #. type: Table -#: documentation/content/en/books/handbook/basics/_index.adoc:1287 +#: documentation/content/en/books/handbook/basics/_index.adoc:1304 #, no-wrap msgid "RAID drives" msgstr "" #. type: Table -#: documentation/content/en/books/handbook/basics/_index.adoc:1288 +#: documentation/content/en/books/handbook/basics/_index.adoc:1305 #, no-wrap msgid "Examples include `aacd` for Adaptec(R) AdvancedRAID, `mlxd` and `mlyd` for Mylex(R), `amrd` for AMI MegaRAID(R), `idad` for Compaq Smart RAID, `twed` for 3ware(R) RAID." msgstr "" #. type: Block title -#: documentation/content/en/books/handbook/basics/_index.adoc:1293 +#: documentation/content/en/books/handbook/basics/_index.adoc:1310 #, no-wrap msgid "Sample Disk, Slice, and Partition Names" msgstr "" #. type: Table -#: documentation/content/en/books/handbook/basics/_index.adoc:1298 +#: documentation/content/en/books/handbook/basics/_index.adoc:1315 #, no-wrap msgid "Name" msgstr "" #. type: Table -#: documentation/content/en/books/handbook/basics/_index.adoc:1300 +#: documentation/content/en/books/handbook/basics/_index.adoc:1317 #, no-wrap msgid "Meaning" msgstr "" #. type: Table -#: documentation/content/en/books/handbook/basics/_index.adoc:1301 +#: documentation/content/en/books/handbook/basics/_index.adoc:1318 #, no-wrap msgid "`ada0s1a`" msgstr "" #. type: Table -#: documentation/content/en/books/handbook/basics/_index.adoc:1303 +#: documentation/content/en/books/handbook/basics/_index.adoc:1320 #, no-wrap msgid "The first partition (`a`) on the first slice (`s1`) on the first SATA disk (`ada0`)." msgstr "" #. type: Table -#: documentation/content/en/books/handbook/basics/_index.adoc:1304 +#: documentation/content/en/books/handbook/basics/_index.adoc:1321 #, no-wrap msgid "`da1s2e`" msgstr "" #. type: Table -#: documentation/content/en/books/handbook/basics/_index.adoc:1305 +#: documentation/content/en/books/handbook/basics/_index.adoc:1322 #, no-wrap msgid "The fifth partition (`e`) on the second slice (`s2`) on the second SCSI disk (`da1`)." msgstr "" #. type: Block title -#: documentation/content/en/books/handbook/basics/_index.adoc:1309 +#: documentation/content/en/books/handbook/basics/_index.adoc:1326 #, no-wrap msgid "Conceptual Model of a Disk" msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1316 +#: documentation/content/en/books/handbook/basics/_index.adoc:1333 msgid "" "This diagram shows FreeBSD's view of the first SATA disk attached to the " "system. Assume that the disk is 250 GB in size, and contains an 80 GB slice " "and a 170 GB slice (MS-DOS(R) partitions). The first slice contains a " "Windows(R) NTFS file system, `C:`, and the second slice contains a FreeBSD " "installation. This example FreeBSD installation has four data partitions " "and a swap partition." msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1320 +#: documentation/content/en/books/handbook/basics/_index.adoc:1337 msgid "" "The four partitions each hold a file system. Partition `a` is used for the " "root file system, `d` for `/var/`, `e` for `/tmp/`, and `f` for `/usr/`. " "Partition letter `c` refers to the entire slice, and so is not used for " "ordinary partitions." msgstr "" #. type: Positional ($1) AttributeList argument for macro 'image' -#: documentation/content/en/books/handbook/basics/_index.adoc:1321 +#: documentation/content/en/books/handbook/basics/_index.adoc:1338 #, no-wrap msgid "Layout of a shared drive between Windows and FreeBSD" msgstr "" #. type: Target for macro image -#: documentation/content/en/books/handbook/basics/_index.adoc:1321 +#: documentation/content/en/books/handbook/basics/_index.adoc:1338 #, no-wrap msgid "disk-layout.png" msgstr "" #. type: Title == -#: documentation/content/en/books/handbook/basics/_index.adoc:1325 +#: documentation/content/en/books/handbook/basics/_index.adoc:1342 #, no-wrap msgid "Mounting and Unmounting File Systems" msgstr "" #. type: delimited block = 4 -#: documentation/content/en/books/handbook/basics/_index.adoc:1328 +#: documentation/content/en/books/handbook/basics/_index.adoc:1345 msgid "" "The file system is best visualized as a tree, rooted, as it were, at `/`. `/" "dev`, `/usr`, and the other directories in the root directory are branches, " "which may have their own branches, such as `/usr/local`, and so on." msgstr "" #. type: delimited block = 4 -#: documentation/content/en/books/handbook/basics/_index.adoc:1332 +#: documentation/content/en/books/handbook/basics/_index.adoc:1349 msgid "" "There are various reasons to house some of these directories on separate " "file systems. `/var` contains the directories `log/`, `spool/`, and various " "types of temporary files, and as such, may get filled up. Filling up the " "root file system is not a good idea, so splitting `/var` from `/` is often " "favorable." msgstr "" #. type: delimited block = 4 -#: documentation/content/en/books/handbook/basics/_index.adoc:1334 +#: documentation/content/en/books/handbook/basics/_index.adoc:1351 msgid "" "Another common reason to contain certain directory trees on other file " "systems is if they are to be housed on separate physical disks, or are " "separate virtual disks, such as Network File System mounts, described in " "crossref:network-servers[network-nfs,“Network File System (NFS)”], or CDROM " "drives." msgstr "" #. type: Title === -#: documentation/content/en/books/handbook/basics/_index.adoc:1336 +#: documentation/content/en/books/handbook/basics/_index.adoc:1353 #, no-wrap msgid "The fstab File" msgstr "" #. type: delimited block = 4 -#: documentation/content/en/books/handbook/basics/_index.adoc:1340 +#: documentation/content/en/books/handbook/basics/_index.adoc:1357 msgid "" "During the boot process (crossref:boot[boot,The FreeBSD Booting Process]), " "file systems listed in `/etc/fstab` are automatically mounted except for the " "entries containing `noauto`. This file contains entries in the following " "format:" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/handbook/basics/_index.adoc:1344 +#: documentation/content/en/books/handbook/basics/_index.adoc:1361 #, no-wrap msgid "device /mount-point fstype options dumpfreq passno\n" msgstr "" #. type: Labeled list -#: documentation/content/en/books/handbook/basics/_index.adoc:1346 +#: documentation/content/en/books/handbook/basics/_index.adoc:1363 #, no-wrap msgid "`device`" msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1348 +#: documentation/content/en/books/handbook/basics/_index.adoc:1365 msgid "An existing device name as explained in <>." msgstr "" #. type: Labeled list -#: documentation/content/en/books/handbook/basics/_index.adoc:1349 +#: documentation/content/en/books/handbook/basics/_index.adoc:1366 #, no-wrap msgid "`mount-point`" msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1351 +#: documentation/content/en/books/handbook/basics/_index.adoc:1368 msgid "An existing directory on which to mount the file system." msgstr "" #. type: Labeled list -#: documentation/content/en/books/handbook/basics/_index.adoc:1352 +#: documentation/content/en/books/handbook/basics/_index.adoc:1369 #, no-wrap msgid "`fstype`" msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1355 +#: documentation/content/en/books/handbook/basics/_index.adoc:1372 msgid "" "The file system type to pass to man:mount[8]. The default FreeBSD file " "system is `ufs`." msgstr "" #. type: Labeled list -#: documentation/content/en/books/handbook/basics/_index.adoc:1356 +#: documentation/content/en/books/handbook/basics/_index.adoc:1373 #, no-wrap msgid "`options`" msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1360 +#: documentation/content/en/books/handbook/basics/_index.adoc:1377 msgid "" "Either `rw` for read-write file systems, or `ro` for read-only file systems, " "followed by any other options that may be needed. A common option is " "`noauto` for file systems not normally mounted during the boot sequence. " "Other options are listed in man:mount[8]." msgstr "" #. type: Labeled list -#: documentation/content/en/books/handbook/basics/_index.adoc:1361 +#: documentation/content/en/books/handbook/basics/_index.adoc:1378 #, no-wrap msgid "`dumpfreq`" msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1364 +#: documentation/content/en/books/handbook/basics/_index.adoc:1381 msgid "" "Used by man:dump[8] to determine which file systems require dumping. If the " "field is missing, a value of zero is assumed." msgstr "" #. type: Labeled list -#: documentation/content/en/books/handbook/basics/_index.adoc:1365 +#: documentation/content/en/books/handbook/basics/_index.adoc:1382 #, no-wrap msgid "`passno`" msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1371 +#: documentation/content/en/books/handbook/basics/_index.adoc:1388 msgid "" "Determines the order in which UFS file systems should be checked by man:" "fsck[8] after a reboot. File systems that should be skipped should have " "their `passno` set to zero. The root file system needs to be checked before " "everything else and should have its `passno` set to one. The other file " "systems should be set to values greater than one. If more than one file " "system has the same `passno`, man:fsck[8] will attempt to check file systems " "in parallel if possible." msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1373 +#: documentation/content/en/books/handbook/basics/_index.adoc:1390 msgid "" "Refer to man:fstab[5] for more information on the format of `/etc/fstab` and " "its options." msgstr "" #. type: Title === -#: documentation/content/en/books/handbook/basics/_index.adoc:1375 +#: documentation/content/en/books/handbook/basics/_index.adoc:1392 #, no-wrap msgid "Using man:mount[8]" msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1379 +#: documentation/content/en/books/handbook/basics/_index.adoc:1396 msgid "" "File systems are mounted using man:mount[8]. The most basic syntax is as " "follows:" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/handbook/basics/_index.adoc:1385 +#: documentation/content/en/books/handbook/basics/_index.adoc:1402 #, no-wrap msgid "# mount device mountpoint\n" msgstr "" #. type: delimited block = 4 -#: documentation/content/en/books/handbook/basics/_index.adoc:1389 +#: documentation/content/en/books/handbook/basics/_index.adoc:1406 +msgid "" +"A file system listed in `/etc/fstab` can also be mounted by providing just " +"the mountpoint." +msgstr "" + +#. type: delimited block = 4 +#: documentation/content/en/books/handbook/basics/_index.adoc:1409 msgid "" -"This command provides many options which are described in man:mount[8], The " +"This command provides many options which are described in man:mount[8]. The " "most commonly used options include:" msgstr "" #. type: Block title -#: documentation/content/en/books/handbook/basics/_index.adoc:1390 +#: documentation/content/en/books/handbook/basics/_index.adoc:1410 #, no-wrap msgid "Mount Options" msgstr "" #. type: Labeled list -#: documentation/content/en/books/handbook/basics/_index.adoc:1391 +#: documentation/content/en/books/handbook/basics/_index.adoc:1411 #, no-wrap msgid "`-a`" msgstr "" #. type: delimited block = 4 -#: documentation/content/en/books/handbook/basics/_index.adoc:1393 +#: documentation/content/en/books/handbook/basics/_index.adoc:1413 msgid "" "Mount all the file systems listed in `/etc/fstab`, except those marked as " "\"noauto\", excluded by the `-t` flag, or those that are already mounted." msgstr "" #. type: Labeled list -#: documentation/content/en/books/handbook/basics/_index.adoc:1394 +#: documentation/content/en/books/handbook/basics/_index.adoc:1414 #, no-wrap msgid "`-d`" msgstr "" #. type: delimited block = 4 -#: documentation/content/en/books/handbook/basics/_index.adoc:1397 +#: documentation/content/en/books/handbook/basics/_index.adoc:1417 msgid "" "Do everything except for the actual mount system call. This option is " "useful in conjunction with the `-v` flag to determine what man:mount[8] is " "actually trying to do." msgstr "" #. type: Labeled list -#: documentation/content/en/books/handbook/basics/_index.adoc:1398 +#: documentation/content/en/books/handbook/basics/_index.adoc:1418 #, no-wrap msgid "`-f`" msgstr "" #. type: delimited block = 4 -#: documentation/content/en/books/handbook/basics/_index.adoc:1400 +#: documentation/content/en/books/handbook/basics/_index.adoc:1420 msgid "" "Force the mount of an unclean file system (dangerous), or the revocation of " "write access when downgrading a file system's mount status from read-write " "to read-only." msgstr "" #. type: Labeled list -#: documentation/content/en/books/handbook/basics/_index.adoc:1401 +#: documentation/content/en/books/handbook/basics/_index.adoc:1421 #, no-wrap msgid "`-r`" msgstr "" #. type: delimited block = 4 -#: documentation/content/en/books/handbook/basics/_index.adoc:1404 +#: documentation/content/en/books/handbook/basics/_index.adoc:1424 msgid "Mount the file system read-only. This is identical to using `-o ro`." msgstr "" #. type: Labeled list -#: documentation/content/en/books/handbook/basics/_index.adoc:1405 +#: documentation/content/en/books/handbook/basics/_index.adoc:1425 #, no-wrap msgid "``-t _fstype_``" msgstr "" #. type: delimited block = 4 -#: documentation/content/en/books/handbook/basics/_index.adoc:1408 +#: documentation/content/en/books/handbook/basics/_index.adoc:1428 msgid "" "Mount the specified file system type or mount only file systems of the given " "type, if `-a` is included. \"ufs\" is the default file system type." msgstr "" #. type: Labeled list -#: documentation/content/en/books/handbook/basics/_index.adoc:1409 +#: documentation/content/en/books/handbook/basics/_index.adoc:1429 #, no-wrap msgid "`-u`" msgstr "" #. type: delimited block = 4 -#: documentation/content/en/books/handbook/basics/_index.adoc:1411 +#: documentation/content/en/books/handbook/basics/_index.adoc:1431 msgid "Update mount options on the file system." msgstr "" #. type: Labeled list -#: documentation/content/en/books/handbook/basics/_index.adoc:1412 +#: documentation/content/en/books/handbook/basics/_index.adoc:1432 #, no-wrap msgid "`-v`" msgstr "" #. type: delimited block = 4 -#: documentation/content/en/books/handbook/basics/_index.adoc:1414 +#: documentation/content/en/books/handbook/basics/_index.adoc:1434 msgid "Be verbose." msgstr "" #. type: Labeled list -#: documentation/content/en/books/handbook/basics/_index.adoc:1415 +#: documentation/content/en/books/handbook/basics/_index.adoc:1435 #, no-wrap msgid "`-w`" msgstr "" #. type: delimited block = 4 -#: documentation/content/en/books/handbook/basics/_index.adoc:1417 +#: documentation/content/en/books/handbook/basics/_index.adoc:1437 msgid "Mount the file system read-write." msgstr "" #. type: delimited block = 4 -#: documentation/content/en/books/handbook/basics/_index.adoc:1419 +#: documentation/content/en/books/handbook/basics/_index.adoc:1439 msgid "The following options can be passed to `-o` as a comma-separated list:" msgstr "" #. type: Labeled list -#: documentation/content/en/books/handbook/basics/_index.adoc:1420 +#: documentation/content/en/books/handbook/basics/_index.adoc:1440 #, no-wrap msgid "nosuid" msgstr "" #. type: delimited block = 4 -#: documentation/content/en/books/handbook/basics/_index.adoc:1423 +#: documentation/content/en/books/handbook/basics/_index.adoc:1443 msgid "" "Do not interpret setuid or setgid flags on the file system. This is also a " "useful security option." msgstr "" #. type: Title === -#: documentation/content/en/books/handbook/basics/_index.adoc:1425 +#: documentation/content/en/books/handbook/basics/_index.adoc:1445 #, no-wrap msgid "Using man:umount[8]" msgstr "" #. type: delimited block = 4 -#: documentation/content/en/books/handbook/basics/_index.adoc:1429 +#: documentation/content/en/books/handbook/basics/_index.adoc:1449 msgid "" "To unmount a file system use man:umount[8]. This command takes one " "parameter which can be a mountpoint, device name, `-a` or `-A`." msgstr "" #. type: delimited block = 4 -#: documentation/content/en/books/handbook/basics/_index.adoc:1432 +#: documentation/content/en/books/handbook/basics/_index.adoc:1452 msgid "" "All forms take `-f` to force unmounting, and `-v` for verbosity. Be warned " "that `-f` is not generally a good idea as it might crash the computer or " "damage data on the file system." msgstr "" #. type: delimited block = 4 -#: documentation/content/en/books/handbook/basics/_index.adoc:1435 +#: documentation/content/en/books/handbook/basics/_index.adoc:1455 msgid "" "To unmount all mounted file systems, or just the file system types listed " "after `-t`, use `-a` or `-A`. Note that `-A` does not attempt to unmount " "the root file system." msgstr "" #. type: Title == -#: documentation/content/en/books/handbook/basics/_index.adoc:1437 +#: documentation/content/en/books/handbook/basics/_index.adoc:1457 #, no-wrap msgid "Processes and Daemons" msgstr "" #. type: delimited block = 4 -#: documentation/content/en/books/handbook/basics/_index.adoc:1442 +#: documentation/content/en/books/handbook/basics/_index.adoc:1462 msgid "" "FreeBSD is a multi-tasking operating system. Each program running at any " "one time is called a _process_. Every running command starts at least one " "new process and there are a number of system processes that are run by " "FreeBSD." msgstr "" #. type: delimited block = 4 -#: documentation/content/en/books/handbook/basics/_index.adoc:1448 +#: documentation/content/en/books/handbook/basics/_index.adoc:1468 msgid "" "Each process is uniquely identified by a number called a _process ID_ " "(PID). Similar to files, each process has one owner and group, and the " "owner and group permissions are used to determine which files and devices " "the process can open. Most processes also have a parent process that " "started them. For example, the shell is a process, and any command started " "in the shell is a process which has the shell as its parent process. The " "exception is a special process called man:init[8] which is always the first " "process to start at boot time and which always has a PID of `1`." msgstr "" #. type: delimited block = 4 -#: documentation/content/en/books/handbook/basics/_index.adoc:1455 +#: documentation/content/en/books/handbook/basics/_index.adoc:1475 msgid "" "Some programs are not designed to be run with continuous user input and " "disconnect from the terminal at the first opportunity. For example, a web " "server responds to web requests, rather than user input. Mail servers are " "another example of this type of application. These types of programs are " "known as _daemons_. The term daemon comes from Greek mythology and " "represents an entity that is neither good nor evil, and which invisibly " "performs useful tasks. This is why the BSD mascot is the cheerful-looking " "daemon with sneakers and a pitchfork." msgstr "" #. type: delimited block = 4 -#: documentation/content/en/books/handbook/basics/_index.adoc:1461 +#: documentation/content/en/books/handbook/basics/_index.adoc:1481 msgid "" "There is a convention to name programs that normally run as daemons with a " "trailing \"d\". For example, BIND is the Berkeley Internet Name Domain, but " "the actual program that executes is `named`. The Apache web server program " "is `httpd` and the line printer spooling daemon is `lpd`. This is only a " "naming convention. For example, the main mail daemon for the Sendmail " "application is `sendmail`, and not `maild`." msgstr "" #. type: Title === -#: documentation/content/en/books/handbook/basics/_index.adoc:1462 +#: documentation/content/en/books/handbook/basics/_index.adoc:1482 #, no-wrap msgid "Viewing Processes" msgstr "" #. type: delimited block = 4 -#: documentation/content/en/books/handbook/basics/_index.adoc:1467 +#: documentation/content/en/books/handbook/basics/_index.adoc:1487 msgid "" "To see the processes running on the system, use man:ps[1] or man:top[1]. To " "display a static list of the currently running processes, their PIDs, how " "much memory they are using, and the command they were started with, use man:" "ps[1]. To display all the running processes and update the display every " "few seconds in order to interactively see what the computer is doing, use " "man:top[1]." msgstr "" #. type: delimited block = 4 -#: documentation/content/en/books/handbook/basics/_index.adoc:1470 +#: documentation/content/en/books/handbook/basics/_index.adoc:1490 msgid "" "By default, man:ps[1] only shows the commands that are running and owned by " "the user. For example:" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/handbook/basics/_index.adoc:1477 +#: documentation/content/en/books/handbook/basics/_index.adoc:1497 #, no-wrap msgid "" "% ps\n" " PID TT STAT TIME COMMAND\n" "8203 0 Ss 0:00.59 /bin/csh\n" "8895 0 R+ 0:00.00 ps\n" msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1487 +#: documentation/content/en/books/handbook/basics/_index.adoc:1507 msgid "" "The output from man:ps[1] is organized into a number of columns. The `PID` " "column displays the process ID. PIDs are assigned starting at 1, go up to " "99999, then wrap around back to the beginning. However, a PID is not " "reassigned if it is already in use. The `TT` column shows the tty the " "program is running on and `STAT` shows the program's state. `TIME` is the " "amount of time the program has been running on the CPU. This is usually not " "the elapsed time since the program was started, as most programs spend a lot " "of time waiting for things to happen before they need to spend time on the " "CPU. Finally, `COMMAND` is the command that was used to start the program." msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1490 +#: documentation/content/en/books/handbook/basics/_index.adoc:1510 msgid "" "A number of different options are available to change the information that " "is displayed. One of the most useful sets is `auxww`, where `a` displays " "information about all the running processes of all users, `u` displays the " "username and memory usage of the process' owner, `x` displays information " "about daemon processes, and `ww` causes man:ps[1] to display the full " "command line for each process, rather than truncating it once it gets too " "long to fit on the screen." msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1492 +#: documentation/content/en/books/handbook/basics/_index.adoc:1512 msgid "The output from man:top[1] is similar:" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/handbook/basics/_index.adoc:1502 +#: documentation/content/en/books/handbook/basics/_index.adoc:1522 #, no-wrap msgid "" "% top\n" "last pid: 9609; load averages: 0.56, 0.45, 0.36 up 0+00:20:03 10:21:46\n" "107 processes: 2 running, 104 sleeping, 1 zombie\n" "CPU: 6.2% user, 0.1% nice, 8.2% system, 0.4% interrupt, 85.1% idle\n" "Mem: 541M Active, 450M Inact, 1333M Wired, 4064K Cache, 1498M Free\n" "ARC: 992M Total, 377M MFU, 589M MRU, 250K Anon, 5280K Header, 21M Other\n" "Swap: 2048M Total, 2048M Free\n" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/handbook/basics/_index.adoc:1515 +#: documentation/content/en/books/handbook/basics/_index.adoc:1535 #, no-wrap msgid "" " PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COMMAND\n" " 557 root 1 -21 r31 136M 42296K select 0 2:20 9.96% Xorg\n" " 8198 dru 2 52 0 449M 82736K select 3 0:08 5.96% kdeinit4\n" " 8311 dru 27 30 0 1150M 187M uwait 1 1:37 0.98% firefox\n" " 431 root 1 20 0 14268K 1728K select 0 0:06 0.98% moused\n" " 9551 dru 1 21 0 16600K 2660K CPU3 3 0:01 0.98% top\n" " 2357 dru 4 37 0 718M 141M select 0 0:21 0.00% kdeinit4\n" " 8705 dru 4 35 0 480M 98M select 2 0:20 0.00% kdeinit4\n" " 8076 dru 6 20 0 552M 113M uwait 0 0:12 0.00% soffice.bin\n" " 2623 root 1 30 10 12088K 1636K select 3 0:09 0.00% powerd\n" " 2338 dru 1 20 0 440M 84532K select 1 0:06 0.00% kwin\n" " 1427 dru 5 22 0 605M 86412K select 1 0:05 0.00% kdeinit4\n" msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1521 +#: documentation/content/en/books/handbook/basics/_index.adoc:1541 msgid "" "The output is split into two sections. The header (the first five or six " "lines) shows the PID of the last process to run, the system load averages " "(which are a measure of how busy the system is), the system uptime (time " "since the last reboot) and the current time. The other figures in the " "header relate to how many processes are running, how much memory and swap " "space has been used, and how much time the system is spending in different " "CPU states. If the ZFS file system module has been loaded, an `ARC` line " "indicates how much data was read from the memory cache instead of from disk." msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1526 +#: documentation/content/en/books/handbook/basics/_index.adoc:1546 msgid "" "Below the header is a series of columns containing similar information to " "the output from man:ps[1], such as the PID, username, amount of CPU time, " "and the command that started the process. By default, man:top[1] also " "displays the amount of memory space taken by the process. This is split " "into two columns: one for total size and one for resident size. Total size " "is how much memory the application has needed and the resident size is how " "much it is actually using now." msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1529 +#: documentation/content/en/books/handbook/basics/_index.adoc:1549 msgid "" "man:top[1] automatically updates the display every two seconds. A different " "interval can be specified with `-s`." msgstr "" #. type: Title === -#: documentation/content/en/books/handbook/basics/_index.adoc:1531 +#: documentation/content/en/books/handbook/basics/_index.adoc:1551 #, no-wrap msgid "Killing Processes" msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1537 +#: documentation/content/en/books/handbook/basics/_index.adoc:1557 msgid "" "One way to communicate with any running process or daemon is to send a " "_signal_ using man:kill[1]. There are a number of different signals; some " "have a specific meaning while others are described in the application's " "documentation. A user can only send a signal to a process they own and " "sending a signal to someone else's process will result in a permission " "denied error. The exception is the `root` user, who can send signals to " "anyone's processes." msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1541 +#: documentation/content/en/books/handbook/basics/_index.adoc:1561 msgid "" "The operating system can also send a signal to a process. If an application " "is badly written and tries to access memory that it is not supposed to, " "FreeBSD will send the process the \"Segmentation Violation\" signal " "(`SIGSEGV`). If an application has been written to use the man:alarm[3] " "system call to be alerted after a period of time has elapsed, it will be " "sent the \"Alarm\" signal (`SIGALRM`)." msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1545 +#: documentation/content/en/books/handbook/basics/_index.adoc:1565 msgid "" "Two signals can be used to stop a process: `SIGTERM` and `SIGKILL`. " "`SIGTERM` is the polite way to kill a process as the process can read the " "signal, close any log files it may have open, and attempt to finish what it " "is doing before shutting down. In some cases, a process may ignore " "`SIGTERM` if it is in the middle of some task that cannot be interrupted." msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1548 +#: documentation/content/en/books/handbook/basics/_index.adoc:1568 msgid "" "`SIGKILL` cannot be ignored by a process. Sending a `SIGKILL` to a process " "will usually stop that process there and then. footnote:[There are a few " "tasks that cannot be interrupted. For example, if the process is trying to " "read from a file that is on another computer on the network, and the other " "computer is unavailable, the process is said to be uninterruptible. " "Eventually the process will time out, typically after two minutes. As soon " "as this time out occurs the process will be killed.]." msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1551 +#: documentation/content/en/books/handbook/basics/_index.adoc:1571 msgid "" "Other commonly used signals are `SIGHUP`, `SIGUSR1`, and `SIGUSR2`. Since " "these are general purpose signals, different applications will respond " "differently." msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1556 +#: documentation/content/en/books/handbook/basics/_index.adoc:1576 msgid "" "For example, after changing a web server's configuration file, the web " "server needs to be told to re-read its configuration. Restarting `httpd` " "would result in a brief outage period on the web server. Instead, send the " "daemon the `SIGHUP` signal. Be aware that different daemons will have " "different behavior, so refer to the documentation for the daemon to " "determine if `SIGHUP` will achieve the desired results." msgstr "" #. type: delimited block = 4 -#: documentation/content/en/books/handbook/basics/_index.adoc:1563 +#: documentation/content/en/books/handbook/basics/_index.adoc:1583 msgid "" "Killing a random process on the system is a bad idea. In particular, man:" "init[8], PID 1, is special. Running `/bin/kill -s KILL 1` is a quick, and " "unrecommended, way to shutdown the system. _Always_ double check the " "arguments to man:kill[1] _before_ pressing kbd:[Return]." msgstr "" #. type: Title == -#: documentation/content/en/books/handbook/basics/_index.adoc:1566 +#: documentation/content/en/books/handbook/basics/_index.adoc:1586 #, no-wrap msgid "Shells" msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1573 +#: documentation/content/en/books/handbook/basics/_index.adoc:1593 msgid "" "A _shell_ provides a command line interface for interacting with the " "operating system. A shell receives commands from the input channel and " "executes them. Many shells provide built in functions to help with everyday " "tasks such as file management, file globbing, command line editing, command " "macros, and environment variables. FreeBSD comes with several shells, " "including the Bourne shell (man:sh[1]) and the extended C shell (man:" "tcsh[1]). Other shells are available from the FreeBSD Ports Collection, " "such as `zsh` and `bash`." msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1578 +#: documentation/content/en/books/handbook/basics/_index.adoc:1598 msgid "" "The shell that is used is really a matter of taste. A C programmer might " "feel more comfortable with a C-like shell such as man:tcsh[1]. A Linux(R) " "user might prefer `bash`. Each shell has unique properties that may or may " "not work with a user's preferred working environment, which is why there is " "a choice of which shell to use." msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1583 +#: documentation/content/en/books/handbook/basics/_index.adoc:1603 msgid "" "One common shell feature is filename completion. After a user types the " "first few letters of a command or filename and presses kbd:[Tab], the shell " "completes the rest of the command or filename. Consider two files called " "`foobar` and `football`. To delete `foobar`, the user might type `rm foo` " "and press kbd:[Tab] to complete the filename." msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1589 +#: documentation/content/en/books/handbook/basics/_index.adoc:1609 msgid "" "But the shell only shows `rm foo`. It was unable to complete the filename " "because both `foobar` and `football` start with `foo`. Some shells sound a " "beep or show all the choices if more than one name matches. The user must " "then type more characters to identify the desired filename. Typing a `t` " "and pressing kbd:[Tab] again is enough to let the shell determine which " "filename is desired and fill in the rest." msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1595 +#: documentation/content/en/books/handbook/basics/_index.adoc:1615 msgid "" "Another feature of the shell is the use of environment variables. " "Environment variables are a variable/key pair stored in the shell's " "environment. This environment can be read by any program invoked by the " "shell, and thus contains a lot of program configuration. <> " "provides a list of common environment variables and their meanings. Note " "that the names of environment variables are always in uppercase." msgstr "" #. type: Block title -#: documentation/content/en/books/handbook/basics/_index.adoc:1597 +#: documentation/content/en/books/handbook/basics/_index.adoc:1617 #, no-wrap msgid "Common Environment Variables" msgstr "" #. type: Table -#: documentation/content/en/books/handbook/basics/_index.adoc:1601 +#: documentation/content/en/books/handbook/basics/_index.adoc:1621 #, no-wrap msgid "Variable" msgstr "" #. type: Table -#: documentation/content/en/books/handbook/basics/_index.adoc:1604 +#: documentation/content/en/books/handbook/basics/_index.adoc:1624 #, no-wrap msgid "`USER`" msgstr "" #. type: Table -#: documentation/content/en/books/handbook/basics/_index.adoc:1606 +#: documentation/content/en/books/handbook/basics/_index.adoc:1626 #, no-wrap msgid "Current logged in user's name." msgstr "" #. type: Table -#: documentation/content/en/books/handbook/basics/_index.adoc:1607 +#: documentation/content/en/books/handbook/basics/_index.adoc:1627 #, no-wrap msgid "`PATH`" msgstr "" #. type: Table -#: documentation/content/en/books/handbook/basics/_index.adoc:1609 +#: documentation/content/en/books/handbook/basics/_index.adoc:1629 #, no-wrap msgid "Colon-separated list of directories to search for binaries." msgstr "" #. type: Table -#: documentation/content/en/books/handbook/basics/_index.adoc:1610 +#: documentation/content/en/books/handbook/basics/_index.adoc:1630 #, no-wrap msgid "`DISPLAY`" msgstr "" #. type: Table -#: documentation/content/en/books/handbook/basics/_index.adoc:1612 +#: documentation/content/en/books/handbook/basics/_index.adoc:1632 #, no-wrap msgid "Network name of the Xorg display to connect to, if available." msgstr "" #. type: Table -#: documentation/content/en/books/handbook/basics/_index.adoc:1613 +#: documentation/content/en/books/handbook/basics/_index.adoc:1633 #, no-wrap msgid "`SHELL`" msgstr "" #. type: Table -#: documentation/content/en/books/handbook/basics/_index.adoc:1615 +#: documentation/content/en/books/handbook/basics/_index.adoc:1635 #, no-wrap msgid "The current shell." msgstr "" #. type: Table -#: documentation/content/en/books/handbook/basics/_index.adoc:1616 +#: documentation/content/en/books/handbook/basics/_index.adoc:1636 #, no-wrap msgid "`TERM`" msgstr "" #. type: Table -#: documentation/content/en/books/handbook/basics/_index.adoc:1618 +#: documentation/content/en/books/handbook/basics/_index.adoc:1638 #, no-wrap msgid "The name of the user's type of terminal. Used to determine the capabilities of the terminal." msgstr "" #. type: Table -#: documentation/content/en/books/handbook/basics/_index.adoc:1619 +#: documentation/content/en/books/handbook/basics/_index.adoc:1639 #, no-wrap msgid "`TERMCAP`" msgstr "" #. type: Table -#: documentation/content/en/books/handbook/basics/_index.adoc:1621 +#: documentation/content/en/books/handbook/basics/_index.adoc:1641 #, no-wrap msgid "Database entry of the terminal escape codes to perform various terminal functions." msgstr "" #. type: Table -#: documentation/content/en/books/handbook/basics/_index.adoc:1622 +#: documentation/content/en/books/handbook/basics/_index.adoc:1642 #, no-wrap msgid "`OSTYPE`" msgstr "" #. type: Table -#: documentation/content/en/books/handbook/basics/_index.adoc:1624 +#: documentation/content/en/books/handbook/basics/_index.adoc:1644 #, no-wrap msgid "Type of operating system." msgstr "" #. type: Table -#: documentation/content/en/books/handbook/basics/_index.adoc:1625 +#: documentation/content/en/books/handbook/basics/_index.adoc:1645 #, no-wrap msgid "`MACHTYPE`" msgstr "" #. type: Table -#: documentation/content/en/books/handbook/basics/_index.adoc:1627 +#: documentation/content/en/books/handbook/basics/_index.adoc:1647 #, no-wrap msgid "The system's CPU architecture." msgstr "" #. type: Table -#: documentation/content/en/books/handbook/basics/_index.adoc:1628 +#: documentation/content/en/books/handbook/basics/_index.adoc:1648 #, no-wrap msgid "`EDITOR`" msgstr "" #. type: Table -#: documentation/content/en/books/handbook/basics/_index.adoc:1630 +#: documentation/content/en/books/handbook/basics/_index.adoc:1650 #, no-wrap msgid "The user's preferred text editor." msgstr "" #. type: Table -#: documentation/content/en/books/handbook/basics/_index.adoc:1631 +#: documentation/content/en/books/handbook/basics/_index.adoc:1651 #, no-wrap msgid "`PAGER`" msgstr "" #. type: Table -#: documentation/content/en/books/handbook/basics/_index.adoc:1633 +#: documentation/content/en/books/handbook/basics/_index.adoc:1653 #, no-wrap msgid "The user's preferred utility for viewing text one page at a time." msgstr "" #. type: Table -#: documentation/content/en/books/handbook/basics/_index.adoc:1634 +#: documentation/content/en/books/handbook/basics/_index.adoc:1654 #, no-wrap msgid "`MANPATH`" msgstr "" #. type: Table -#: documentation/content/en/books/handbook/basics/_index.adoc:1635 +#: documentation/content/en/books/handbook/basics/_index.adoc:1655 #, no-wrap msgid "Colon-separated list of directories to search for manual pages." msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1641 +#: documentation/content/en/books/handbook/basics/_index.adoc:1661 msgid "" "How to set an environment variable differs between shells. In man:tcsh[1] " "and man:csh[1], use `setenv` to set environment variables. In man:sh[1] and " "`bash`, use `export` to set the current environment variables. This example " "sets the default `EDITOR` to `/usr/local/bin/emacs` for the man:tcsh[1] " "shell:" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/handbook/basics/_index.adoc:1645 +#: documentation/content/en/books/handbook/basics/_index.adoc:1665 #, no-wrap msgid "% setenv EDITOR /usr/local/bin/emacs\n" msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1648 +#: documentation/content/en/books/handbook/basics/_index.adoc:1668 msgid "The equivalent command for `bash` would be:" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/handbook/basics/_index.adoc:1652 +#: documentation/content/en/books/handbook/basics/_index.adoc:1672 #, no-wrap msgid "% export EDITOR=\"/usr/local/bin/emacs\"\n" msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1656 +#: documentation/content/en/books/handbook/basics/_index.adoc:1676 msgid "" "To expand an environment variable in order to see its current setting, type " "a `$` character in front of its name on the command line. For example, " "`echo $TERM` displays the current `$TERM` setting." msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1661 +#: documentation/content/en/books/handbook/basics/_index.adoc:1681 msgid "" "Shells treat special characters, known as meta-characters, as special " "representations of data. The most common meta-character is `\\*`, which " "represents any number of characters in a filename. Meta-characters can be " "used to perform filename globbing. For example, `echo *` is equivalent to " "`ls` because the shell takes all the files that match `*` and `echo` lists " "them on the command line." msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1664 +#: documentation/content/en/books/handbook/basics/_index.adoc:1684 msgid "" "To prevent the shell from interpreting a special character, escape it from " "the shell by starting it with a backslash (`\\`). For example, `echo $TERM` " "prints the terminal setting whereas `echo \\$TERM` literally prints the " "string `$TERM`." msgstr "" #. type: Title === -#: documentation/content/en/books/handbook/basics/_index.adoc:1666 +#: documentation/content/en/books/handbook/basics/_index.adoc:1686 #, no-wrap msgid "Changing the Shell" msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1671 +#: documentation/content/en/books/handbook/basics/_index.adoc:1691 msgid "" "The easiest way to permanently change the default shell is to use `chsh`. " "Running this command will open the editor that is configured in the `EDITOR` " "environment variable, which by default is set to man:vi[1]. Change the " "`Shell:` line to the full path of the new shell." msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1674 +#: documentation/content/en/books/handbook/basics/_index.adoc:1694 msgid "" "Alternately, use `chsh -s` which will set the specified shell without " "opening an editor. For example, to change the shell to `bash`:" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/handbook/basics/_index.adoc:1678 +#: documentation/content/en/books/handbook/basics/_index.adoc:1698 #, no-wrap msgid "% chsh -s /usr/local/bin/bash\n" msgstr "" #. type: delimited block = 4 -#: documentation/content/en/books/handbook/basics/_index.adoc:1685 +#: documentation/content/en/books/handbook/basics/_index.adoc:1705 msgid "" "The new shell _must_ be present in `/etc/shells`. If the shell was " "installed from the FreeBSD Ports Collection as described in crossref:" "ports[ports,Installing Applications: Packages and Ports], it should be " "automatically added to this file. If it is missing, add it using this " "command, replacing the path with the path of the shell:" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/handbook/basics/_index.adoc:1689 +#: documentation/content/en/books/handbook/basics/_index.adoc:1709 #, no-wrap msgid "# echo /usr/local/bin/bash >> /etc/shells\n" msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1692 +#: documentation/content/en/books/handbook/basics/_index.adoc:1712 msgid "Then, rerun man:chsh[1]." msgstr "" #. type: Title === -#: documentation/content/en/books/handbook/basics/_index.adoc:1694 +#: documentation/content/en/books/handbook/basics/_index.adoc:1714 #, no-wrap msgid "Advanced Shell Techniques" msgstr "" #. type: delimited block = 4 -#: documentation/content/en/books/handbook/basics/_index.adoc:1698 +#: documentation/content/en/books/handbook/basics/_index.adoc:1718 msgid "" "The UNIX(R) shell is not just a command interpreter, it acts as a powerful " "tool which allows users to execute commands, redirect their output, redirect " "their input and chain commands together to improve the final command " "output. When this functionality is mixed with built in commands, the user " "is provided with an environment that can maximize efficiency." msgstr "" #. type: delimited block = 4 -#: documentation/content/en/books/handbook/basics/_index.adoc:1701 +#: documentation/content/en/books/handbook/basics/_index.adoc:1721 msgid "" "Shell redirection is the action of sending the output or the input of a " "command into another command or into a file. To capture the output of the " "man:ls[1] command, for example, into a file, redirect the output:" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/handbook/basics/_index.adoc:1705 +#: documentation/content/en/books/handbook/basics/_index.adoc:1725 #, no-wrap msgid "% ls > directory_listing.txt\n" msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1710 +#: documentation/content/en/books/handbook/basics/_index.adoc:1730 msgid "" "The directory contents will now be listed in `directory_listing.txt`. Some " "commands can be used to read input, such as man:sort[1]. To sort this " "listing, redirect the input:" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/handbook/basics/_index.adoc:1714 +#: documentation/content/en/books/handbook/basics/_index.adoc:1734 #, no-wrap msgid "% sort < directory_listing.txt\n" msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1718 +#: documentation/content/en/books/handbook/basics/_index.adoc:1738 msgid "" "The input will be sorted and placed on the screen. To redirect that input " "into another file, one could redirect the output of man:sort[1] by mixing " "the direction:" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/handbook/basics/_index.adoc:1722 +#: documentation/content/en/books/handbook/basics/_index.adoc:1742 #, no-wrap msgid "% sort < directory_listing.txt > sorted.txt\n" msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1730 +#: documentation/content/en/books/handbook/basics/_index.adoc:1750 msgid "" "In all of the previous examples, the commands are performing redirection " "using file descriptors. Every UNIX(R) system has file descriptors, which " "include standard input (stdin), standard output (stdout), and standard error " "(stderr). Each one has a purpose, where input could be a keyboard or a " "mouse, something that provides input. Output could be a screen or paper in " "a printer. And error would be anything that is used for diagnostic or error " "messages. All three are considered I/O based file descriptors and sometimes " "considered streams." msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1733 +#: documentation/content/en/books/handbook/basics/_index.adoc:1753 msgid "" "Through the use of these descriptors, the shell allows output and input to " "be passed around through various commands and redirected to or from a file. " "Another method of redirection is the pipe operator." msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1736 +#: documentation/content/en/books/handbook/basics/_index.adoc:1756 msgid "" "The UNIX(R) pipe operator, \"|\" allows the output of one command to be " "directly passed or directed to another program. Basically, a pipe allows " "the standard output of a command to be passed as standard input to another " "command, for example:" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/handbook/basics/_index.adoc:1740 +#: documentation/content/en/books/handbook/basics/_index.adoc:1760 #, no-wrap msgid "% cat directory_listing.txt | sort | less\n" msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1744 +#: documentation/content/en/books/handbook/basics/_index.adoc:1764 msgid "" "In that example, the contents of `directory_listing.txt` will be sorted and " "the output passed to man:less[1]. This allows the user to scroll through " "the output at their own pace and prevent it from scrolling off the screen." msgstr "" #. type: Title == -#: documentation/content/en/books/handbook/basics/_index.adoc:1746 +#: documentation/content/en/books/handbook/basics/_index.adoc:1766 #, no-wrap msgid "Text Editors" msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1750 +#: documentation/content/en/books/handbook/basics/_index.adoc:1770 msgid "" "Most FreeBSD configuration is done by editing text files, so it is a good " "idea to become familiar with a text editor. FreeBSD comes with a few as " "part of the base system, and many more are available in the Ports Collection." msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1757 +#: documentation/content/en/books/handbook/basics/_index.adoc:1777 msgid "" "A simple editor to learn is man:ee[1], which stands for easy editor. To " "start this editor, type `ee _filename_` where _filename_ is the name of the " "file to be edited. Once inside the editor, all of the commands for " "manipulating the editor's functions are listed at the top of the display. " "The caret (`^`) represents kbd:[Ctrl], so `^e` expands to kbd:[Ctrl+e]. To " "leave man:ee[1], press kbd:[Esc], then choose the \"leave editor\" option " "from the main menu. The editor will prompt to save any changes if the file " "has been modified." msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1762 +#: documentation/content/en/books/handbook/basics/_index.adoc:1782 msgid "" "FreeBSD also comes with more powerful text editors, such as man:vi[1], as " "part of the base system. Other editors, like package:editors/emacs[] and " "package:editors/vim[], are part of the FreeBSD Ports Collection. These " "editors offer more functionality at the expense of being more complicated to " "learn. Learning a more powerful editor such as vim or Emacs can save more " "time in the long run." msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1765 +#: documentation/content/en/books/handbook/basics/_index.adoc:1785 msgid "" "Many applications which modify files or require typed input will " "automatically open a text editor. To change the default editor, set the " "`EDITOR` environment variable as described in <>." msgstr "" #. type: Title == -#: documentation/content/en/books/handbook/basics/_index.adoc:1767 +#: documentation/content/en/books/handbook/basics/_index.adoc:1787 #, no-wrap msgid "Devices and Device Nodes" msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1772 +#: documentation/content/en/books/handbook/basics/_index.adoc:1792 msgid "" "A device is a term used mostly for hardware-related activities in a system, " "including disks, printers, graphics cards, and keyboards. When FreeBSD " "boots, the majority of the boot messages refer to devices being detected. A " "copy of the boot messages is saved to `/var/run/dmesg.boot`." msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1775 +#: documentation/content/en/books/handbook/basics/_index.adoc:1795 msgid "" "Each device has a device name and number. For example, `ada0` is the first " "SATA hard drive, while `kbd0` represents the keyboard." msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1777 +#: documentation/content/en/books/handbook/basics/_index.adoc:1797 msgid "" "Most devices in FreeBSD must be accessed through special files called device " "nodes, which are located in `/dev`." msgstr "" #. type: Title == -#: documentation/content/en/books/handbook/basics/_index.adoc:1779 +#: documentation/content/en/books/handbook/basics/_index.adoc:1799 #, no-wrap msgid "Manual Pages" msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1784 +#: documentation/content/en/books/handbook/basics/_index.adoc:1804 msgid "" "The most comprehensive documentation on FreeBSD is in the form of manual " "pages. Nearly every program on the system comes with a short reference " "manual explaining the basic operation and available arguments. These " "manuals can be viewed using `man`:" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/handbook/basics/_index.adoc:1788 +#: documentation/content/en/books/handbook/basics/_index.adoc:1808 #, no-wrap msgid "% man command\n" msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1792 +#: documentation/content/en/books/handbook/basics/_index.adoc:1812 msgid "" "where _command_ is the name of the command to learn about. For example, to " "learn more about man:ls[1], type:" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/handbook/basics/_index.adoc:1796 +#: documentation/content/en/books/handbook/basics/_index.adoc:1816 #, no-wrap msgid "% man ls\n" msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1800 +#: documentation/content/en/books/handbook/basics/_index.adoc:1820 msgid "" "Manual pages are divided into sections which represent the type of topic. " "In FreeBSD, the following sections are available:" msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1802 +#: documentation/content/en/books/handbook/basics/_index.adoc:1822 msgid "User commands." msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1803 +#: documentation/content/en/books/handbook/basics/_index.adoc:1823 msgid "System calls and error numbers." msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1804 +#: documentation/content/en/books/handbook/basics/_index.adoc:1824 msgid "Functions in the C libraries." msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1805 +#: documentation/content/en/books/handbook/basics/_index.adoc:1825 msgid "Device drivers." msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1806 +#: documentation/content/en/books/handbook/basics/_index.adoc:1826 msgid "File formats." msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1807 +#: documentation/content/en/books/handbook/basics/_index.adoc:1827 msgid "Games and other diversions." msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1808 +#: documentation/content/en/books/handbook/basics/_index.adoc:1828 msgid "Miscellaneous information." msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1809 +#: documentation/content/en/books/handbook/basics/_index.adoc:1829 msgid "System maintenance and operation commands." msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1810 +#: documentation/content/en/books/handbook/basics/_index.adoc:1830 msgid "System kernel interfaces." msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1814 +#: documentation/content/en/books/handbook/basics/_index.adoc:1834 msgid "" "In some cases, the same topic may appear in more than one section of the " "online manual. For example, there is a `chmod` user command and a `chmod()` " "system call. To tell man:man[1] which section to display, specify the " "section number:" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/handbook/basics/_index.adoc:1818 +#: documentation/content/en/books/handbook/basics/_index.adoc:1838 #, no-wrap msgid "% man 1 chmod\n" msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1822 +#: documentation/content/en/books/handbook/basics/_index.adoc:1842 msgid "" "This will display the manual page for the user command man:chmod[1]. " "References to a particular section of the online manual are traditionally " "placed in parenthesis in written documentation, so man:chmod[1] refers to " "the user command and man:chmod[2] refers to the system call." msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1824 +#: documentation/content/en/books/handbook/basics/_index.adoc:1844 msgid "" "If the name of the manual page is unknown, use `man -k` to search for " "keywords in the manual page descriptions:" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/handbook/basics/_index.adoc:1828 +#: documentation/content/en/books/handbook/basics/_index.adoc:1848 #, no-wrap msgid "% man -k mail\n" msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1832 +#: documentation/content/en/books/handbook/basics/_index.adoc:1852 msgid "" "This command displays a list of commands that have the keyword \"mail\" in " "their descriptions. This is equivalent to using man:apropos[1]." msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1834 +#: documentation/content/en/books/handbook/basics/_index.adoc:1854 msgid "To read the descriptions for all of the commands in `/usr/sbin`, type:" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/handbook/basics/_index.adoc:1839 +#: documentation/content/en/books/handbook/basics/_index.adoc:1859 #, no-wrap msgid "" "% cd /usr/sbin\n" "% man -f * | more\n" msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1842 +#: documentation/content/en/books/handbook/basics/_index.adoc:1862 msgid "or" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/handbook/basics/_index.adoc:1847 +#: documentation/content/en/books/handbook/basics/_index.adoc:1867 #, no-wrap msgid "" "% cd /usr/sbin\n" "% whatis * |more\n" msgstr "" #. type: Title === -#: documentation/content/en/books/handbook/basics/_index.adoc:1850 +#: documentation/content/en/books/handbook/basics/_index.adoc:1870 #, no-wrap msgid "GNU Info Files" msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1855 +#: documentation/content/en/books/handbook/basics/_index.adoc:1875 msgid "" "FreeBSD includes several applications and utilities produced by the Free " "Software Foundation (FSF). In addition to manual pages, these programs may " "include hypertext documents called `info` files. These can be viewed using " "man:info[1] or, if package:editors/emacs[] is installed, the info mode of " "emacs." msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1857 +#: documentation/content/en/books/handbook/basics/_index.adoc:1877 msgid "To use man:info[1], type:" msgstr "" #. type: delimited block . 4 -#: documentation/content/en/books/handbook/basics/_index.adoc:1861 +#: documentation/content/en/books/handbook/basics/_index.adoc:1881 #, no-wrap msgid "% info\n" msgstr "" #. type: Plain text -#: documentation/content/en/books/handbook/basics/_index.adoc:1864 +#: documentation/content/en/books/handbook/basics/_index.adoc:1884 msgid "" "For a brief introduction, type `h`. For a quick command reference, type `?`." msgstr ""