Unix Workshops:Network Programs
ifconfig - information about the networking phases of the machine.
em0 is an intel device with an external ip address
em1 is an intel device with an internal ip address
lo0 is the loop-back, it's the interface to the local machine
ifconfig -a (for address) - will sometimes show some extra address data
ifconfig em0 down will bring it down, (run as root ("sudo"))
netstat -f inet will show open connections to the Internet
Column 1: connection type
Column 3: port
Column 4: host or ip (local address) Buffer for incoming packets
Column 5: host or ip (foreign address) Buffer for outgoing packets
Column 6: State
use "-n" option: to read ip addresses instead of host names
netstat -f unix - sockets within the kernel itself. This represents the memory used to communicate between programs.
"portmaster" is a port management tool. It will install, update and uninstall ports for you, and will compile them for you. You won't need to build the program yourself. You will need to supply a category and package name (e.g. "/irc/english/irssi").
pkg_add -r $packageName will download (-r) a compiled program for you.
- "pkg_info" - display information about packages
- "pkg_delete" - delete installed packages
"whereis" will locate an installed program on your machine
Get a specific version with "svnup". portmaster net/svnup to install it. cd /usr/src - go to the source of the system svn checkout svn://svn.freebsd.org... - get the source for the OS and put it into the working directory
svnup -b base/release/9.1.0 -h svn://svn.freebsd.org.... additional arguments: "-b" - build, "-h" host
FreeBSD hold all the versions for working environments where:
- "head" - Active development
- "release" - Stable version
- "stable" - Full version releases
- "releng" - Last release updates
make buildkernel - build the kernel (you can configure your kernel that way, you can end up with a much smaller kernel if you don't include most of the default stuff)