Get Adobe Flash player

The FreeBSD commands you need to know


When you are new to FreeBSD there are a lot of commands that will remain hidden from your knowledge for a long time. We hope to change that with this page. Updated randomly.

df

The df utility displays statistics about the amount of free disk space on the file system. The -h switch will show free space in B/M/G (for byte, megabyte and gigabyte).


freebsd-update

This handy command is used to update FreeBSD.
Use man freebsd-update in order to get more detailed information if you like this command (I hope you do).

freebsd-update fetch
Fetches all binary updates for the current installation, including security patches.

freebsd-update upgrade
Fetches all the files that are necessary for upgrading to a new release.
WARNING! Before you run this and follow by freebsd-update install, be sure to read the release notes in case there are other steps you need to take before this upgrade.

freebsd-update install
Install the most recently fetched updates or upgrade.

freebsd-update rollback
Uninstalls the most recently installed updates.

Tips: I add freebsd-update fetch and freebsd-update install to my crontab with a two hour space once every 24 hrs. This keeps my system patched and up to date.


fsck

The fsck utility invokes file system-specific programs to check the special devices listed in the fstab(5) file or in the command line for consistency.


rehash

Updates FreeBSD's path environment variables. For instance when you have installed software you may not be able to run the executables without specifying the path. rehash solves your problem most of the times.


top

Display and update information about the top cpu processes.


wget

GNU Wget is a free utility for non-interactive download of files from the Web. It supports HTTP, HTTPS, and FTP protocols, as well as retrieval through HTTP proxies.

You can use it to get your external IP: wget -O - -q icanhazip.com