The Archives

  • 12.31.09
    Make Love cmd | n0str0m0 | (0)
    In FreeBSD: $ cd /usr/src $ make love Enjoy the output. Merry Christmas! Source: psybermonkey
  • 10.22.09
    Pstat shell | n0str0m0 | (0)
    pstat is a command line utility for obtaining system statistics. When invoked with -s it shows swap space information. When used with -f it shows statistics on open files. Below is an example showing information about both open files and swap use: $ pstat -T 6052/12328 files 0M/128M swap space pstat is part of the FreeBSD's base system Enjoy!
  • 09.09.09
    IM from the command line network, shell | n0str0m0 | (0)
    % cd /usr/ports/net-im/finch; make install clean The above installs finch. It is an ncurses based instant messaging client, part of the pidgin suite. Though it can be a little tough at the beginning, it is a good alternative if you do not have a graphical interface. Below I show two screenshots. Use Alt-w to move between windows. Enjoy!
  • 06.29.09
    Measuring network performance network | n0str0m0 | (0)
    FreeBSD includes several benchmarking suites in the ports collection. One of these suites is netperf, developed by HP. It allows measuring several network parameters using two programs: the server and the client. First things first: let us install netperf. % cd /usr/ports/benchmarks/netperf && make install clean Once the software has been successfully compiled (it does not take long) we can bring the server up: $ netserver Starting netserver at port 12865 Starting netserver at hostname 0.0.0.0 port 12865 and family AF_UNSPEC Notice that you can launch the server as a regular user. Now, we are ready to run our test: $ netperf -t TCP_STREAM TCP STREAM TEST from ...
  • 06.01.09
    Adding a new member to the group (FreeBSD) shell | n0str0m0 | (0)
    The pw command is used to add and modify system users and groups. The following is an easy way to add a new member to a group: % pw groupmod operator -M n0str0m0 It adds n0str0m0 to the operators group. Bye!
  • 05.26.09
    Auditing ports (FreeBSD) security | n0str0m0 | (0)
    One of the most important aspects of *BSD systems is security. Knowing which installed packages have exploitable vulnerabilities is one of the admin's tasks. Here, the portaudit utility comes in handy. It is not part of the base system, so it must be installed first: % cd /usr/ports/ports-mgmt/portaudit; make install clean To run a simple check: % portaudit Affected package: XXX Type of problem: XXX -- embedded GD library Use-After-Free vulnerability. Reference: <http://www.FreeBSD.org/ports/portaudit/6XXxf31-4254-11de-bXX-0030843d3802.html> Affected package: YYY-0.2.8.4_2 Type of problem: YYY -- integer overflow vulnerability. Reference: <http://www.FreeBSD.org/ports/portaudit/48aab1d0-YYY-YYYYYYY-0030843d3802.html> Affected package: ZZZ-1.10.2_2 Type of problem: ZZZ -- integer overflow. Reference: <http://www.FreeBSD.org/ports/portaudit/4b17ZZZZZZbecb-001cc0377035.html> I have omitted the details of the vulnerable packages of my own machine. I'm sure you ...
  • 04.30.09
    Changing your login shell shell | n0str0m0 | (0)
    Yes, I have to admit this is the first thing I do on my account after installing FreeBSD :). This example however, comes from a Linux box (you may notice it due to the default installation paths for the shells). $ chsh -l /bin/ash /bin/bash /bin/csh /bin/tcsh The command above lists the available shells. (I have omitted some of the entries to shorten the list). $ chsh -s /bin/bash The next time you log in, your shell will be bash. Enjoy!
  • 03.14.09
    Removing software in FreeBSD shell | n0str0m0 | (0)
    Sometimes you need to uninstall some software. May be you need more room in your hard drive (not quite often nowadays, though) or maybe you just don't like the software and want to get rid of it. Here, pkg_delete and pkg_deinstall come to rescue. pkg_delete deletes a software package previously installed. It is a quite simple program, so we will jump to the other option. % pkg_delete kismet-200805.r1_1 % pkg_deinstall is a wrapper for pkg_delete that handles wildcards and traverses dependencies. So it is specially useful when you need to remove a software package that installed a lot of other packages (Gnome? KDE?). The drawback, ...
  • 02.24.09
    Adding software in FreeBSD shell | n0str0m0 | (0)
    The easiest way is to add a binary package with: % pkg_add <package> Packages in FreeBSD are .tbz files with some special meta-files (or files with meta information) inside it. However you will use pkg_add in this fashion most likely: % pkg_add -r <package> This connects to the repository matching your release, downloads the package (and all its dependencies) and installs the package. Another example of how easy FreeBSD can be ;)
  • 02.12.09
    Fix package database cmd, shell | n0str0m0 | (0)
    % pkgdb -F In FreeBSD, interactively fixes the package database. Useful after an upgrade.