In the past, I had some articles on FreeBSD, GhostBSD and other BSD’s variants. However, I noticed that its been years now that I did not train myself on BSD. So, I decided to run a side server with FreeBSD and I am actually planning to migrate tunnelix.com from Linux to BSD. I believe this article should help in the future and I decided to share with my readers.
Let’s see some basics commands to get started on BSD:
1.Version of BSD running
root@freebsd:~ # freebsd-version 13.1-RELEASE-p2 root@freebsd:~ # uname -ra FreeBSD freebsd 13.1-RELEASE-p2 FreeBSD 13.1-RELEASE-p2 GENERIC amd64
2. Update your OS
freebsd-update fetch
3. Upgrade to a new OS version – Example from 13.1 to 14.1
root@freebsd:~ # freebsd-update -r 14.1-RELEASE upgrade
4. One of the way to install a package on BSD, you can install using ports or pkg. Let’s say you want to install FISH – An interactive shell using pkg method:
pkg install fish
Or a different installation method using ports collection:
root@freebsd:~ # cd /usr/ports/shells/fish
root@freebsd:~ # make install clean
5. To see socket open for TCP/UDP in listening state:
root@freebsd:~ # sockstat -4l
6. Routes
root@freebsd:~ # netstat -rn
7. Adding a user to the group wheel for ‘su’ capabilties
pw groupmod wheel -m <username>
8.
I will keep this post updated, as I believe there are some improvements and adjustments to be done. Please feel free to comment.