User:Mjb/FreeBSD

From Offset
Jump to navigationJump to search

This is a compilation of random notes relating to FreeBSD system administration, mainly for my own benefit. Any questions/comments, email me directly at root (at) skew.org.

Current notes

These should be pretty up-to-date.

Older notes

Welcome, FreeBSD newbies

Linux user? The BSDs (FreeBSD, OpenBSD, NetBSD, and others) are not "Linux distributions", although from a user's perspective, they act very much the same.

The various BSD and GNU/Linux operating systems began life in the early 1990s as open-source imitations of AT&T's multi-user operating system called Unix System V. These Unix-like OSes have all grown, forked, and improved substantially over the years, and they are all still very similar to one another, but there are differences you should be aware of if you are a longtime Linux user:

  • On FreeBSD, at least at first, you will mainly be interacting with the console: the text-based interface with command-line prompts, rather than a graphical user interface (GUI) with a desktop, icons, and windows. On FreeBSD, these GUIs are optional add-ons that you can mess with after first getting up and running without a GUI. (This may change someday, but it's low priority in the BSD world).
  • BSD tends to come fairly bare-bones, without a huge suite of common apps preinstalled.
  • When you want to add software or upgrade the system, you have a choice between installing prebuilt packages with the tool pkg, or (this is what most people do) building from source code via the "ports collection" and a tool called portmaster. There are pros and cons to this approach, with one of the cons being that installing software takes much longer than you are probably used to. (Technically, you do have the option of using poudriere or synth to pre-build packages on a faster host, or using someone's private package repository, but for simplicity and security, these notes don't yet broach those topics.)
  • FreeBSD has no sudo command (though you can install it if you really miss it). Normally, if you want to do something as a superuser, just switch your identity to root with su -m and run your commands from the new shell.
  • Some features of the Linux version of the POSIX shell are actually "bashisms" which are unavailable in FreeBSD's /bin/sh.
  • The default user shell is tcsh, not bash. If you want bash, you have to install it.