2.8 KiB
Setup
First time:
su -
Do a system update:
freebsd-update fetch install
Update
pkg update
Install my favorite packages
pkg install -y bash sudo tmux htop neovim git ncdu bastille tailscale aria2
Add "wheel" to the suoers file:
visudo
Change shell
chsh -s /usr/local/bin/bash
Tailscale
service tailscaled enable
service tailscaled start
tailscale up
SSH
nvim /etc/ssh/sshd_config
Change this setting:
KbdInteractiveAuthentication no
That should be it. The config file should have these settings, including the commented lines shown as below:
#PermitRootLogin no
#PubkeyAuthentication yes
#PasswordAuthentication no
KbdInteractiveAuthentication no
#UsePAM yes
Test the setting
sshd -t
Reload:
service sshd reload
PF
Note, if you're using Bastille, the /etc/pf.conf file is going to look different. See Bastille.
Now we need to get the filewall going.
nvim /etc/pf.conf
Contents:
block in all
ext_if="em0"
pass in on $ext_if proto tcp to ($ext_if) port 22
pass in on $ext_if proto tcp to ($ext_if) port 80
pass in on $ext_if proto tcp to ($ext_if) port 443
tailscale_if="tailscale0"
pass in on $tailscale_if proto tcp to any port 22
pass out all keep state
sysrc pf_enable=yes
service pf start
If you get the error 'no host key files found` then
ssh-keygen -A
X11 (optional)
https://docs.freebsd.org/en/books/handbook/x11/
Don't forget to start tmux:
tmux
Add moni to the video group:
pw groupmod video -m moni
And then install, but don't forget to read the messages when the install is complete! Scroll up with tmux
pkg install xorg
This will improve mnuse and touchscreen support:
sysctl kern.evdev.rcpt_mask=6
And add this to /etc/sysctl.conf to persist it:
kern.evdev.rcpt_mask=6
Intel
https://docs.freebsd.org/en/books/handbook/x11/#x-configuration-intel
pkg install drm-kmod
Add the kernel module
sysrc kld_list+=i915kms
Fonts
pkg install urwfonts
But you're not done yet, you need to add a conf file:
nvim /usr/local/etc/X11/xorg.conf.d/90-fonts.conf
With the following:
Section "Files"
FontPath "/usr/local/share/fonts/urwfonts/"
EndSection
KDE
https://docs.freebsd.org/en/books/handbook/desktop/#kde-environment
pkg install kde
sysrc dbus_enable="YES"
sysctl net.local.stream.recvspace=65536
sysctl net.local.stream.sendspace=65536
pkg install sddm
sysrc sddm_enable="YES"
sysrc sddm_lang="en_US"
Wayland
pkg install wayland seatd
sysrc seatd_enable="YES"
service seatd start