Linux Inspirations

FreeBSD – Install and Remove Programs

Posted on: 5 Februari, 2010

If you’re new to FreeBSD and you’ve not installed an application yet, you’re in for a treat. FreeBSD provides a wonderful and simple mechanism for installing and removing applications.
It’s called The Ports Tree.

There are three basic ways to install applications on a FreeBSD system.

[1 – Ports Tree]
[2 – Binaries on CDROM]
[3 – Packages in .tgz files]

[1-Installing from Source using the Ports Tree]
The ports tree is a directory tree containing all the information about programs that have been ported to FreeBSD, where on the internet to download their source code, and how to install them.

If you have successfully installed your FreeBSD OS and it has access to the internet, you can install applications with a stroke of the keyboard.

If you wanted to install bash for instance, you just change to the appropriate directory under /usr/ports and type: make install. Your FreeBSD box will go out on the internet, download the source code for bash, compile it, and install it on your system. It’s really simple! Here is how to do it.

Login: root
Password: ********

cd /usr/ports/shells/bash2
make install && make clean

The bash shell is now installed on your system. If you would like to remove bash from your system. Just type:

cd /usr/ports/shells/bash2
make deinstall

[2-Installing from Pre-Compiled Binaries on CDROM]
Another way to install applications is to install the pre-compiled binary files from your CDROM. To install bash in this manner, follow these steps.

Login: root
Password: ********

Insert CDROM (1) – Installation Boot, Essential Packages


Configure – Do Post-Install Configuration of FreeBSD

[3-Installing from GZipped Packages]
To install an application in this manner, you need the app in a package file (usually in the form package_name-ver.tgz). You use the pkg_add. command:

pkg_add package_name-ver.tgz

To continue our bash shell example…
pkg_add bash-2.04.tar.gz

That’s all there is to it. If you would like to see what programs are installed on your system type:


I like to pipe the output into the more command like so:
pkg_info | more

[4-Uninstalling/Removing Applications]
No matter what method you use to install an application, you can remove it from the system with the pkg_delete command:

pkg_delete package_name-ver

Back to our bash shell example…
pkg_delete bash-2.04

If you would like more information on this topic, consult the PORTS Section of the FreeBSD Handbook.

You can also use the man pages:
man ports
man pkg_add
man pkg_info
man pkg_delete


Tinggalkan Balasan

Please log in using one of these methods to post your comment:


You are commenting using your account. Logout /  Ubah )

Foto Google+

You are commenting using your Google+ account. Logout /  Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout /  Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout /  Ubah )


Connecting to %s

ABout Me!

WordPress ini sengaja saya buat untuk menulis apa yang telah saya lakukan agar saya selalu ingat, tulisan yang saya buat kebanyakan dalam bentuk tutorials configurasi linux dari hasil uji coba saya dan sebahagian di kutip dari beberapa website lain yang saya anggap perlu untuk saya tulis disini. Mudah-mudahan tutorial yang saya buat ini berguna buat pencinta linux yang lain. Salam Sejahtera.

Blog Stats

  • 134,586 hits

Linux Inspiration

%d blogger menyukai ini: