There are loads of books I want to read but I haven't finished the Internet yet.

My 'lil' FreeBSD Notebook

Date/Time Permalink: 10/06/07 01:04:59 pm
Category: HOWTOs and Guides

New to BSD from Linux? Welcome to the outback! BSD is going to feel like a TV commercial that goes: "We've secretly replaced this geek's Linux with BSD - let's see how long it takes to notice!" Herein is a random little list of notes I'm leaving along the way, as I venture into the depths of BSD:

NOTE: BEFORE YOU COMMENT The computer I installed FreeBSD to is OFFLINE. It has no Internet connection. For very, very good reasons. If you leave me a comment on this post to the effect of me being an idiot who doesn't connect to the site and use ports, I WILL make fun of you! Don't let me do that.

My 'lil' FreeBSD Notebook

Console tip: The mouse in BSD is an actual mouse pointer graphic, and you can use it to snarf and paste text. Just click and drag over the text you want to copy, which will store it in the "clipboard". Then middle-click to paste it elsewhere. Exactly like in Linux (given the right setup).

You've gotten your desktop up and hit Ctrl-Alt-F2 to get to a console. Which key do you hit to get back to the desktop? Alt-F9. This is because you get 8 tty's in BSD, as opposed to 6 in Linux.

How do you get a Bash shell? First, "cat /etc/shells" to make sure you have Bash installed. It will probably be /usr/local/bin/bash. The command to change shells is "chsh -s /usr/local/bin/bash".

GNU users: Your (and mine) precious Emacs (M-x praise-be-unto-emacs) is available in the individual package section on the disks and will work fine on FreeBSD. Once you have Bash going, set Emacs as your editor with "export EDITOR='/usr/local/bin/emacs'" and $EDITOR will be used properly.

By the way, I'm not out to discourage anybody from discovering the wonders of more BSD-like shells and editors. While a Linux user is learning BSD, it's better to have Bash and one of vi/Emacs nearby while they explore. But FreeBSD has ee (an editor), and I tried it out and it will take you only seconds to learn, since every command is printed right at the top! And sh is a shell, itself in BSD, not a softlink to another shell!

Where the heck can you get binary packages? From the ports packages collection. The command to install is "pkg_add".

I was practicing installing packages (since the BSD box has no Internet) via floppy (retarded, I know) and picked 'freebsd-games.tgz'. That installed fine, but then I tried to start Rogue and it complained about a missing library ( First, I went looking for the package on the install CDs, but didn't find it. Then I checked /usr/lib, and there's So, I go root, cd /usr/lib, and made a link: "ln -s". Did the same for " -$gt;". Rogue ran. § Oh look, look. See Rogue run. Run, Rogue, run!

Floppy disks: I'm puzzled, because the ext2 floppy that I copied a file to in Slackware seemed to be fine, but gave FreeBSD heartburn - it complained of bad superblocks and wouldn't mount. I remounted it on Slackware - no problem. Either BSD is too picky or Slackware is slacking. A different ext2 floppy worked fine, as did a DOS floppy. Perhaps BSD is not as sloppy about file system integrity as Linux?

Mounting: If you have a shell with TAB-completion, try typing "mount" and then hitting TAB twice. Wheeee, look at all the programs! BSD seems to prefer keeping binary programs specialized to mount each file system. To mount an ext2 floppy it's "mount_ext2fs /dev/fd0 /mnt". For a DOS floppy it's "mount_msdosfs /dev/fd0 /mnt". And so on...

Docs: Besides man pages, the system documentation is in /usr/share/doc/, and it comes in two flavors: articles and books. You practically have a mini-Wikipedia in here. They are divided into folders by language. The majority of them are in HTML format, so you'll want to install a web browser first. Observation: lynx looks better in BSD than it does in Linux. Observation #2: Look for /new_users/index.html in the /articles/ directory here for a great, brief tutorial on day-to-day usage; this is easy to understand even if you're new to Unix systems in general. Observation #3: The 'BSD Funnies' is waiting for you, in the FAQ book, and it's funnier than anything in /usr/share/emacs/etc/.

Q: In Linux, you can scroll back through a few pages of console history with "shift-PgUp". How do you do this in FreeBSD? A: Hit the "Scroll-Lock" key and then use the arrows to scroll up and down much as you would in vi. This is actually a lot cooler than in Linux, because buffers viewed in 'man', 'emacs', and 'lynx' will all show up, along with past command output. This makes it much easier to gather facts from several documents together, for pasting quotes into one file, for instance.


         _~             ~_
        /                 \
       ~                   ~
      /                     \
      |    XXXX     XXXX    |
      |    XXXX     XXXX    |
      |    XXX       XXX    |
       \         @         /
        --\     @@@     /--
         | |    @@@    | |
         | |           | |
         | vvVvvvvvvvVvv |
         |  ^^^^^^^^^^^  |
          \_           _/
           Penguin Pete
  Killed by a mob of FreeBSD zealots
           with 14 gold

UPDATE: Oh, and I just found the "gotchas" for Linux users at the FreeBSD Wiki.

Follow me on Twitter for an update every time this blog gets a post.
Stumble it Reddit this share on Facebook

suddenly the moon