The FreeBSD Diary |
(TM) | Providing practical examples since 1998If you buy from Amazon USA, please support us by using this link. |
Changing the shell (bash)
26 July 1998
|
see also Shells |
Why a new shell?
|
The shell is that part of the system which accepts your command and interprets what
you have said. It launches other commands. The shell you get by default is not
the only shell around. I chose the bash shell, mainly because it has a command
history. If you're ever typed a long command, only to have it rejected because you
mistyped it, then a shell history is what you want. It allows you to recall previous
commands, modify them, and resubmit them to the shell. It was during the CD-ROM saga that Jay advised me to make "installing a new shell" a high priority. Well, that was over two weeks ago, and I'm only just doing it now. You might also want to see UNIX shell differences and how to change your shell (Monthly Posting). |
Finding the shell
|
My first step in replacing the shell was finding out what CD the ports are on.
For the record, it's the 4th CD. I found this out by using my NT box and scrolling
through the directories. Then I transferred the CD over into my FreeBSD box.
The following commands allowed the CD to be mounted:
|
Building the shell
|
After mounting the CD, I searched the FreeBSD
handbook to find out how to install a port. I was installing from CD-ROM,
but you can also install
from the Internet. I just followed the instructions and everything went exactly
as expected. Here are the commands I used, but you really should follow the
instructions found on the FreeBSD webpages found above. Please note, that the following instructions contain extra steps. See Building a port - background info on make for more concise information.
The above make took less than ten minutes to run. Then you must tell FreeBSD that you want to use this new shell. |
Installing the shell
|
Just making the shell isn't enough. You must tell FreeBSD that you want to use
this new shell. There are two steps to this process. And thanks to Togrul on
undernet's #freebsd channel for help in this area.
Once you have done this, all you need to to is login again. I did this from another virtual terminal just in case I had done something wrong. ALT-F1, ALT-F2, ALT-F3 will take you from one virtual session to another.
|
Cleaning up
|
After doing all of this, you should clean up the diskspace which was used during the
install but which is no longer needed. Use either of the following commands (again,
thanks to Togrul):
OR
The first command cleans up the build area. The second command also deletes the downloaded files. |