First steps after installing FreeBSD

Published on: 19.01.2021 18:45

After installing FreeBSD successfully, we will complete the following steps before proceeding with the actual setup.

First we will install the nano editor and the ca_root_nss certificates with the following command:

root#: pkg install nano ca_root_nss

SSD Trim

Here is a short guide on how to activate the trim support of an SSD.

First, we boot into single-user mode.

The following commands are then executed.

tunefs -t enable /dev/ada<partition number>

tunefs -p /dev/ada<partition number>

reboot

Shell

The bash shell isn't included by default with FreeBSD: it's tcsh that we'll be using. It is not recommended to use a shell installed by ports (bash for example) for our root user, as this will not work in case of problems (missing library for example or no access to / usr / local).

If we want to use a different shell for the root account: We change the toor account shell instead (this administrator account is used for this). By default the tcsh does not suggest a color and the PC beeps so we configure it by editing the /etc/csh.cshrc file that is common to all users:

root#: nano /etc/csh.cshrc =>

# Add color to CLI
setenv CLICOLOR true
setenv COLORTERM true

# Disable system beep
set nobeep

Reduce the time of the boot loader menu

The boot loader menu has a 10 second timeout which is a bit long. We'll reduce it to 2 seconds:

root#: sysrc -f /boot/loader.conf autoboot_delay = 2

Deactivate the internal loudspeaker

With the following instruction we can disable the internal speakers:

root#: nano /etc/sysctl.conf =>

kern.vt.enable_bell = 0
hw.syscons.bell = 0

CPU microcode update

This package provides us with microcode updates for use with the microcode cpuctl update function. We can use this to keep the firmware of our processor up to date.

root#: pkg install devcpu-data

root#: service microcode_update enable
root #: service microcode_update start

powerd ++

The powerd ++ daemon is a replacement for FreeBSD's native powerd (8). It monitors the system load and adjusts the CPU clock accordingly.

root#: pkg inst powerdxx

root#: service powerd disable

root#: service powerd stop

root#: service powerdxx enable

root#: service powerdxx start

localization

In order for FreeBSD to be localized in German, we take the following steps:

root#: nano ~/.xinitrc =>

export LC_ALL=de_DE.UTF-8
export LANGUAGE=de_DE.UTF-8
export LANG=de_DE.UTF-8
setxkbmap de


root#: nano ~/.profile =>

LANG=de_DE.UTF-8; export LANG


root #: nano ~/.login_conf =>

me: \
    : charset=UTF-8: \
    : lang=de_DE.UTF-8: \
    : tc=default:


root#: nano /etc/profile =>

LANG=de_DE.UTF-8; export LANG
CHARSET=UTF-8; export CHARSET

Leave a comment

Available formatting commands

Use Markdown commands or their HTML equivalents to add simple formatting to your comment:

Text markup
*italic*, **bold**, ~~strikethrough~~, `code` and <mark>marked text</mark>.
Lists
- Unordered item 1
- Unordered list item 2
1. Ordered list item 1
2. Ordered list item 2
Quotations
> Quoted text
Code blocks
```
// A simple code block
```
```php
// Some PHP code
phpinfo();
```
Links
[Link text](https://example.com)
Full URLs are automatically converted into links.

Replied on your own website? Send a Webmention!