{"componentChunkName":"component---node-modules-gatsby-theme-document-src-templates-docs-js","path":"/freebsd","result":{"data":{"mdx":{"body":"function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/* @jsx mdx */\nvar _frontmatter = {\n  \"title\": \"FreeBSD\",\n  \"description\": \"FreeBSD setup and configuration\"\n};\n\nvar makeShortcode = function makeShortcode(name) {\n  return function MDXDefaultShortcode(props) {\n    console.warn(\"Component \" + name + \" was not imported, exported, or provided by MDXProvider as global scope\");\n    return mdx(\"div\", props);\n  };\n};\n\nvar layoutProps = {\n  _frontmatter: _frontmatter\n};\nvar MDXLayout = \"wrapper\";\nreturn function MDXContent(_ref) {\n  var components = _ref.components,\n      props = _objectWithoutProperties(_ref, [\"components\"]);\n\n  return mdx(MDXLayout, _extends({}, layoutProps, props, {\n    components: components,\n    mdxType: \"MDXLayout\"\n  }), mdx(\"h3\", {\n    \"id\": \"partition-example-for-gpt\"\n  }, \"Partition example for GPT\"), mdx(\"table\", null, mdx(\"thead\", {\n    parentName: \"table\"\n  }, mdx(\"tr\", {\n    parentName: \"thead\"\n  }, mdx(\"th\", _extends({\n    parentName: \"tr\"\n  }, {\n    \"align\": null\n  }), \"Partition\"), mdx(\"th\", _extends({\n    parentName: \"tr\"\n  }, {\n    \"align\": null\n  }), \"Size\"), mdx(\"th\", _extends({\n    parentName: \"tr\"\n  }, {\n    \"align\": null\n  }), \"File System\"), mdx(\"th\", _extends({\n    parentName: \"tr\"\n  }, {\n    \"align\": null\n  }), \"Mount Point\"))), mdx(\"tbody\", {\n    parentName: \"table\"\n  }, mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", _extends({\n    parentName: \"tr\"\n  }, {\n    \"align\": null\n  }), \"ada0p1\"), mdx(\"td\", _extends({\n    parentName: \"tr\"\n  }, {\n    \"align\": null\n  }), \"512KB\"), mdx(\"td\", _extends({\n    parentName: \"tr\"\n  }, {\n    \"align\": null\n  }), \"freebsd-boot\"), mdx(\"td\", _extends({\n    parentName: \"tr\"\n  }, {\n    \"align\": null\n  }))), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", _extends({\n    parentName: \"tr\"\n  }, {\n    \"align\": null\n  }), \"ada0p2\"), mdx(\"td\", _extends({\n    parentName: \"tr\"\n  }, {\n    \"align\": null\n  }), \"50GB\"), mdx(\"td\", _extends({\n    parentName: \"tr\"\n  }, {\n    \"align\": null\n  }), \"freebsd-ufs\"), mdx(\"td\", _extends({\n    parentName: \"tr\"\n  }, {\n    \"align\": null\n  }), \"/\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", _extends({\n    parentName: \"tr\"\n  }, {\n    \"align\": null\n  }), \"ada0p3\"), mdx(\"td\", _extends({\n    parentName: \"tr\"\n  }, {\n    \"align\": null\n  }), \"100GB\"), mdx(\"td\", _extends({\n    parentName: \"tr\"\n  }, {\n    \"align\": null\n  }), \"freebsd-ufs\"), mdx(\"td\", _extends({\n    parentName: \"tr\"\n  }, {\n    \"align\": null\n  }), \"/home\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", _extends({\n    parentName: \"tr\"\n  }, {\n    \"align\": null\n  }), \"ada0p4\"), mdx(\"td\", _extends({\n    parentName: \"tr\"\n  }, {\n    \"align\": null\n  }), \"4GB\"), mdx(\"td\", _extends({\n    parentName: \"tr\"\n  }, {\n    \"align\": null\n  }), \"freebsd-swap\"), mdx(\"td\", _extends({\n    parentName: \"tr\"\n  }, {\n    \"align\": null\n  }), \"none\")))), mdx(\"h3\", {\n    \"id\": \"after-installation-setup\"\n  }, \"After installation setup\"), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {}), \"su -\\npkg info\\npkg update\\npkg --y sudo\\npw group mod wheel -m cheo\\npw group mod operator -m cheo\\nvisudo\\n\")), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"VISUDO editing below...\")), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"uncomment this line \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"# %wheel  ALL=(ALL) ALL)\"), \" (users in \", mdx(\"strong\", {\n    parentName: \"li\"\n  }, \"wheel\"), \" group can \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"sudo\"), \")\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"uncomment this line \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"# %wheel ALL=(ALL) NOPASSWD: ALL\"), \" (users in \", mdx(\"strong\", {\n    parentName: \"li\"\n  }, \"wheel\"), \" group can \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"sudo\"), \" without entering password. Use ONLY for temporary tasks!!)\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"add this line \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"%operator ALL=(ALL) NOPASSWD: ALL\"), \" (users in \", mdx(\"strong\", {\n    parentName: \"li\"\n  }, \"operator\"), \" group can reboot, shutdown, etc without sudoing)\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Now don't forget to logout from root account\")), mdx(\"h1\", {\n    \"id\": \"suckless\"\n  }, \"Suckless\"), mdx(\"p\", null, \"Instrucions below are consecutive and inline with time. This means the we would issue the command in the directory we finished the previous section.\"), mdx(\"h2\", {\n    \"id\": \"automatic-installation\"\n  }, \"Automatic installation\"), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {}), \"cd\\ngit clone https://github.com/cheomanigua/config.git\\nmv config/suckless/freebsd .\\nmv freebsd/freebsd_autoinstall_dwm.sh rc_conf .\\n./freebsd_autoinstall_dwm.sh\\nsudo ./rc_conf\\n\")), mdx(\"h3\", {\n    \"id\": \"clean-up\"\n  }, \"Clean up\"), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {}), \"sudo rm -r config freebsd\\n\")), mdx(\"h3\", {\n    \"id\": \"start-dwm\"\n  }, \"Start dwm\"), mdx(\"p\", null, \"When installation is finished, run:\"), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {}), \"startx\\n\")), mdx(\"h2\", {\n    \"id\": \"manual-installation\"\n  }, \"Manual installation\"), mdx(\"h3\", {\n    \"id\": \"download-the-template\"\n  }, \"Download the template\"), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {}), \"git clone https://github.com/cheomanigua/config.git\\nmv config/suckless/freebsd .\\n\")), mdx(\"h3\", {\n    \"id\": \"install-and-configure-dwm\"\n  }, \"Install and configure dwm\"), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {}), \"mkdir suckless\\ncd suckless\\ngit clone https://git.suckless.org/dwm\\ncd dwm\\ncp ../../freebsd/dwm/* .\\nsudo make clean install\\n\")), mdx(\"h3\", {\n    \"id\": \"install-and-configure-st\"\n  }, \"Install and configure st\"), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {}), \"cd ..\\ngit clone git://git.suckless.org/st\\ncd st\\ncp ../../freebsd/st/* .\\nsudo make clean install\\n\")), mdx(\"h3\", {\n    \"id\": \"install-and-configure-dmenu\"\n  }, \"Install and configure dmenu\"), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {}), \"cd ..\\nwget https://dl.suckless.org/tools/dmenu-5.0.tar.gz\\ntar -xvf dmenu-5.0.tar.gz\\ncd dmenu-5.0\\ncp ../../freebsd/dmenu/* .\\nsudo make clean install\\n\")), mdx(\"h3\", {\n    \"id\": \"install-and-configure-dwm-bar\"\n  }, \"Install and configure dwm-bar\"), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {}), \"cd ..\\ngit clone https://github.com/joestandring/dwm-bar.git\\ncp -r ../freebsd/dwm-bar/* dwm-bar\\n\")), mdx(\"h4\", {\n    \"id\": \"explanation\"\n  }, \"Explanation\"), mdx(\"p\", null, \"Part of the templates are the corrected \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"config.h\"), \" files that are used for installing \", mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"dwm\"), \", \", mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"st\"), \" and \", mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"dmenu\"), \". The original \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"config.h\"), \" files are targeted to Linux system. I had to change a bit the files:\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Original (for Linux)\")), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {}), \"X11INC = /usr/X11R6/include\\nX11LIB = /usr/X11R6/lib\\n......\\nFREETYPEINC = /usr/include/freetype2\\n\")), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Edited (for FreeBSD)\")), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {}), \"X11INC = /usr/local/include\\nX11LIB = /usr/local/lib\\n......\\nFREETYPEINC = /usr/local/include/freetype2\\n\")), mdx(\"h3\", {\n    \"id\": \"prepare-the-wallpaper-image\"\n  }, \"Prepare the wallpaper image\"), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {}), \"mv freebsd/wallpaper.jpg .\\n\")), mdx(\"h3\", {\n    \"id\": \"add-entry-to-xinitrc\"\n  }, \"Add entry to \", mdx(\"inlineCode\", {\n    parentName: \"h3\"\n  }, \".xinitrc\"), \":\"), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {}), \"setxkbmap es\\nfeh --bg-scale wallpaper.jpg &\\nfreebsd/dwm-bar/dwm_bar.sh &\\nexec dwm\\n\")), mdx(\"h3\", {\n    \"id\": \"other-packages-to-install\"\n  }, \"Other packages to install\"), mdx(\"blockquote\", null, mdx(\"p\", {\n    parentName: \"blockquote\"\n  }, \"git, wget, py37-ranger, zathura, zathura-pdf-poppler, pulseaudio, pavucontrol, simplescreenrecorder, py37-ansible, vscode\")), mdx(\"h3\", {\n    \"id\": \"changing-configuration\"\n  }, \"Changing configuration\"), mdx(\"p\", null, \"You can change the configuration of your \", mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"suckless\"), \" apps by editing the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"config.h\"), \" file. Once you are finished, run:\"), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {}), \"sudo make clean install\\n\")), mdx(\"h2\", {\n    \"id\": \"etcrcconf-and-etcloginconf\"\n  }, \"/etc/rc.conf and /etc/login.conf\"), mdx(\"p\", null, \"FreeBSD is started by the program \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"init\"), \". The first thing \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"init\"), \" does when starting multiuser mode (ie, starting the computer up for normal use) is to run the shell script \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"/etc/rc\"), \". By reading \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"/etc/rc\"), \" and the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"/etc/rc.d/\"), \" scripts, you can learn a lot about how the system is put together, which again will make you more confident about what happens when you do somthing with it.\"), mdx(\"p\", null, \"You can change configurations by editing the file \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"/etc/rc.conf\")), mdx(\"h3\", {\n    \"id\": \"disable-sendmail-daemon\"\n  }, \"Disable sendmail daemon\"), mdx(\"p\", null, \"Edit \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"/etc/rc.conf\"), \":\"), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {}), \"sendmail_enable=\\\"NO\\\" \\nsendmail_submit_enable=\\\"NO\\\"\\nsendmail_outbound_enable=\\\"NO\\\"\\nsendmail_msp_queue_enable=\\\"NO\\\"\\n\")), mdx(\"h3\", {\n    \"id\": \"sync-time\"\n  }, \"Sync time\"), mdx(\"p\", null, \"Edit \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"/etc/rc.conf\"), \":\"), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {}), \"ntpd_enable=\\\"YES\\\"\\nntpd_sync_on_start=\\\"YES\\\"\\n\")), mdx(\"h3\", {\n    \"id\": \"color-in-terminal\"\n  }, \"Color in terminal\"), mdx(\"p\", null, \"Edit \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \".shrc\")), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {}), \"alias ls='ls -G'\\n\")), mdx(\"h3\", {\n    \"id\": \"color-in-terminal-with--gdircolors\"\n  }, \"Color in terminal with  gdircolors\"), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {}), \"sudo pkg install coreutils\\n\")), mdx(\"p\", null, \"Edit \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \".shrc\")), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {}), \"alias ls='gls --color=auto'\\nalias grep='grep --color=auto'\\nalias fgrep='fgrep --color=auto'\\nalias egrep='egrep --color=auto'\\n\")), mdx(\"h3\", {\n    \"id\": \"spanish-characters\"\n  }, \"Spanish characters\"), mdx(\"p\", null, \"Even after selection the Spanish keyboard during FreeBSD installation, some special Spanish characters are not shown. The reason behind this is FreeBSD not having UTF-8 enabled by default. Let's enable it.\"), mdx(\"p\", null, \"Edit \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"/etc/login.conf\"), \" and append these lines in the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"default:\\\\\"), \" section under the last entry \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \":umask=022:\"), \":\"), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {}), \":umask=022:\\\\\\n:charset=UTF-8:\\\\\\n:lang=en_US.UTF-8:\\n\")), mdx(\"p\", null, \"Note the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"lang=en_US\"), \" bit. This will keep the system in English, but with a Spanish character set because we installed the system selecting the Spanish keyboard. If you want also to change th system locale to Spain, use \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"es_ES\"), \" instead.\"), mdx(\"p\", null, \"Now regenerate the login database:\"), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {}), \"sudo cap_mkdb /etc/login.conf\\n\")), mdx(\"p\", null, \"Once you \", mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"reboot\"), \", you can use the especial Spanish characters.\"), mdx(\"h2\", {\n    \"id\": \"disks-and-filesystem\"\n  }, \"Disks and filesystem\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"strong\", {\n    parentName: \"li\"\n  }, \"geom disk list\"), \": List disks\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"strong\", {\n    parentName: \"li\"\n  }, \"sudo camcontrol devlist\"), \": List disks\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"strong\", {\n    parentName: \"li\"\n  }, \"geom part list\"), \": List partitions\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"strong\", {\n    parentName: \"li\"\n  }, \"gpart list\"), \": List partitions\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"strong\", {\n    parentName: \"li\"\n  }, \"sudo camcontrol eject /dev/da0\"), \": Eject pendrive\")), mdx(\"h2\", {\n    \"id\": \"tips\"\n  }, \"Tips\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"To read a compressed file without having to first uncompress it, use \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"zcat\"), \" or \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"zless\"), \" to view it. There is also \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"bzcat\"), \", \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"bzless\"), \", \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"xzcat\"), \" and \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"xzless\"), \".\")));\n}\n;\nMDXContent.isMDXComponent = true;","tableOfContents":{"items":[{"items":[{"items":[{"url":"#partition-example-for-gpt","title":"Partition example for GPT"},{"url":"#after-installation-setup","title":"After installation setup"}]}]},{"url":"#suckless","title":"Suckless","items":[{"url":"#automatic-installation","title":"Automatic installation","items":[{"url":"#clean-up","title":"Clean up"},{"url":"#start-dwm","title":"Start dwm"}]},{"url":"#manual-installation","title":"Manual installation","items":[{"url":"#download-the-template","title":"Download the template"},{"url":"#install-and-configure-dwm","title":"Install and configure dwm"},{"url":"#install-and-configure-st","title":"Install and configure st"},{"url":"#install-and-configure-dmenu","title":"Install and configure dmenu"},{"url":"#install-and-configure-dwm-bar","title":"Install and configure dwm-bar","items":[{"url":"#explanation","title":"Explanation"}]},{"url":"#prepare-the-wallpaper-image","title":"Prepare the wallpaper image"},{"url":"#add-entry-to-xinitrc","title":"Add entry to .xinitrc:"},{"url":"#other-packages-to-install","title":"Other packages to install"},{"url":"#changing-configuration","title":"Changing configuration"}]},{"url":"#etcrcconf-and-etcloginconf","title":"/etc/rc.conf and /etc/login.conf","items":[{"url":"#disable-sendmail-daemon","title":"Disable sendmail daemon"},{"url":"#sync-time","title":"Sync time"},{"url":"#color-in-terminal","title":"Color in terminal"},{"url":"#color-in-terminal-with--gdircolors","title":"Color in terminal with  gdircolors"},{"url":"#spanish-characters","title":"Spanish characters"}]},{"url":"#disks-and-filesystem","title":"Disks and filesystem"},{"url":"#tips","title":"Tips"}]}]},"frontmatter":{"title":"FreeBSD","description":"FreeBSD setup and configuration"}}},"pageContext":{"isCreatedByStatefulCreatePages":false,"id":"e53c9ccb-63f3-53a4-83eb-6f94bb106776"}}}