Other Tidbits

This page contains some tidbits of information that didn't seem to go on any of the other pages I have written so far.

Location of System Commands

The following directories are the primary locations for system commands under FreeBSD. Everyone should have these directories in their shell search paths: /bin, /usr/bin, /usr/local/bin, /usr/X11R6/bin.

The following directories may also contain commands of interest to some users: /sbin, /usr/sbin, /usr/libexec.

Starting the X Window System

After logging into FreeBSD on one of the workstations, the X Window System can be started by typing ``xinit'' or ``startx''. See the manual pages for these commands for more information. You can terminate X and get back to text mode either by typing CTRL-ALT-BKSP or by causing the ``root window'' to exit. You can find other useful information on X by typing ``man X''.

IMPORTANT: Make sure that your home directory is world-readable and world-executable before trying to start X. The X server needs access to your home directory in order to work properly. The X server runs as root, and your home directory is located on an NFS-mounted filesystem. This means that the X server only has the access permissions of a "generic user" on your home directory. If your directory is protected, then the X server will stop shortly after starting with a message about "Can't find usable termcap entry." If you want to keep material in your home directory private, it is best to put the private stuff in a subdirectory and protect that instead of your home directory.

Using the Floppy Disk Drive

When FreeBSD is running, it is possible to read and write MS-DOS floppies in the floppy disk drive using the ``mtools'' suite of commands. For example, to get a directory listing of a floppy, execute the command: mdir a: To copy file ``FOO.BAR'' from the floppy to your home directory, execute the command: mcopy a:foo.bar . Run ``man mtools'' for full information on the available commands in this suite.

As an alternative to using mtools, you can mount a floppy disk directly under the Unix filesystem. To do this, first create a directory ~/floppy in your area. Then execute the command:

mount_msdos /dev/rfd0a ~/floppy This command should cause the files on the floppy to appear under the floppy directory you created.

WARNING! If you mount a floppy disk using the mount_msdos command, do not remove the floppy unless you first execute

umount ~/floppy If you remove the the floppy from the drive without dismounting it, you will lose data.

Mounting a Data CD-ROM

You can read CD-ROM's in the ISO-9660 format with RockRidge extensions. To do this, put the CD-ROM in the drive and type: mountcd If all is well, you should then be able to access the CD-ROM contents under /cdrom. When you are finished, before removing the CD-ROM execute: umountcd If somebody before you has forgotten to type this command, you will be unable to mount a CD-ROM until you do it.

webmaster@ug.cs.sunysb.edu