FreeBSD  Release  12.0  Install  Guide



Post Install Configuration

At this point you have a bare bones FBSD system installed. It is a long way from being a usable system. There are many things that need to be configured yet and things you need to know so you can navigate and administer your FBSD system that are unique to Unix based systems. In this section you will be introduced to the basics of FBSD and configure the mandatory options to bring your system to life.

The FBSD Basics section has more good configuration options you should read about, but they are not needed to get your system running like the things covered here.


Root Account

What is an ‘account’ you ask? Each user you want to grant access to this system has to have a pre-defined account on the system. The major items that make up an account is a unique user ID and Password. The account called root is the master FBSD operating system administrator account which has no restrictions and is automatically built as part of the install. It is very powerful and can be very dangerous in the hands of somebody who wants to cause damage to your system, so it's very important you do not allow unauthorized people access to the root account. As the system installer you will be using the root account to configure the system startup options and to install any of the ports collection software applications you select. After you have completed the setup configuration of your system, you should create for yourself a personal account to use for all non operating system administration activities.

All the instructions in this Install Guide are based on you being logged on to this system as user root.

When you boot FBSD, the last line displayed on the screen will be a login prompt. You type in the word root and press enter. The prompt ‘password’ displays and you type in the password you selected during the install.

If you do not remember the password you entered during the install, then you are SOL (IE: shit out of luck). Put the install CDROM back in the drive and go through the install again. This is part of the FBSD learning experience; get used to it. Do not be afraid to take a leap of faith and just go ahead and do something. You cannot hurt your system’s hardware if you find yourself locked out. You have to build personal self confidence in your own ability to configure your system and make changes to it. Consider your system as a your personal learning tool, safe in the knowledge that a reinstall will fix all your mistakes.

When the system accepts your login ID and password, you will then see the 'Welcome message' scroll by. The last line at the bottom of the screen is prefixed with a # sign. This is the FBSD command line. This is where you will be entering all your commands to the operating system.

When you want to log off, type the word exit on the command line and hit the enter key. You screen returns to the login prompt, waiting for an ID and password to start another console session.


Gracefully Stopping your System

When you are ready to stop your system for the day, you have to be logged in as root, type the ‘halt’ command on the system's command line and hit enter. The system will go through a graceful shutdown where the FBSD file systems are closed in an orderly fashion, so when you restart your system all the file systems are not corrupted. This command should not be used if you have database applications installed that have delayed writes. These type of application database files are terminated without the application performing a graceful close of the database which may damage the database and/or lose data. When the ‘halt’ command has completed its tasks it issues these messages, ‘The operating system has halted. Press any key to reboot.’ When you see this, you can power off the PC.

The ‘reboot’ command goes through the same graceful shutdown process as the ‘halt’ command does, but when it’s completed it does not issue any messages; instead it will issue the internal reset command to the system BIOS to start the boot process all over again. Some times the BIOS does not cooperate and you're left with a blank screen. You can power off and then power on to start the boot process again, or if your PC has a ‘reset’ button on the front of the case, just push the reset button to restart the boot process.

The ‘shutdown -p now’ command goes through the same graceful system shutdown process as the ‘halt’ command does, but first it issues a message to all logged on users that the system is coming down. This command is most appropriate for gateway servers that have LAN users or remote users such as in a commercial business environment or for a host with database type applications as this command will gracefully close the databases.


Navigating the File System Directory Tree

The FBSD directory tree is just like the MS/Windows directory tree. There are primary directories with sub-directories that have sub-directories. But FBSD does not have any command to show the directory tree like MS/windows has 'Windows Explorer'. There is a 3rd party application named 'ytree' which you may be interested in checking out from the port/package collections that displays the directory tree graphically. All directory tree navigation has to be done manually by hand using commands.

Perform the following example.

cd /etc/ppp      change directory pointer two directories deep

pwd              display the name of the current directory path

cd ..            back down directory pointer one directory (to /etc)

pwd              display the name of the current directory path

cd /root         change directory pointer to the specified directory

pwd              display the name of the current directory path


Lists the names of the files and directories at this location, but you can not tell which ones are files and which ones are directories.

ls –l

Lists all the detail data about the contents of the directory you are in. The first column on the left shows you the permissions of each file and directory. If the left most position of the permissions values contain the letter d then it means it's a directory name.

Example of ls –l command output:

-rw-r--r-- 1 root wheel 880 Dec 24 10:20 .cshrc

-rwx--x--- 1 root wheel 378 Jun 30 2003 .fetchmailrc

-rw------- 1 root wheel 955 Dec 24 20:24 .history

drwxr-xr-x 2 root wheel 3072 Dec 24 10:46 bin

-rw-r--r-- 1 root wheel 622 Dec 28 13:05 ftp.PR

bin is a directory; it has d in left most position.

I know what you are thinking. Boy this is going to be a big pain in the butt to have to blindly navigate the directory tree this way. This sure is primitive.  Everyone else and I agrees with you on this, but this is the way the very first Unix was coded to work and all the other Unix like operating systems function this same way. It's something you just have to learn to live with.


Command Line Path Prefix

There is a way to configure FBSD to display the directory path as a prefix in front of the command line so you know where you are at in the directory tree at all times, thus eliminating the need to use the pwd command.

Perform the following

cd /etc                      # Change into directory

set prompt = "# %/ >"        # that’s "#space%/space>"

Now the command line looks like this

# /etc >

The problem is that this setting will only be in effect until you log off or reboot the system. Making this permanent so it happens every time you log in as root is covered in the next section on using the editor. You can also make this a permanent default for all the users you add to your system later.


Previous Page                                        Next Page         

This FreeBSD Install Guide is an public domain HOW-TO. This content may be reproduced, in any form or by any means, and used by all without permission in writing from the author.