Welcome to the Unix Toolbox. This page only provides some information related to the toolbox document. The latest version is always available here: http://cb.vu/unixtoolbox.xhtml.

Related links:

All comments, suggestions, or error reports are of course most welcome. Help me to make an even better toolbox - c@cb.vu Colin Barschel.


The Unix toolbox is a collection of commands and syntax covering many common tasks for advanced users. I used to copy/paste such a command or instructions into a file and save it in a folder named "UnixToolbox". After some years I ended up with many files spread on many workstations and servers. However the examples I needed right now was typically nowhere to find in the mess. So I decided to gather all those files and notes, clean up the info and create a single document.

The xhtml page is designed with a single layout and without any external dependency. That is the css, java-script, svg are all embedded. This layout makes it possible to save the file for offline use and is also easy to search with the navigator. Furthermore the css print properties will create a nice pdf and a printable booklet to keep at hand.

This approach with examples has of course its weakness as one can't include everything and some operating systems or different kernel version will not behave in the same way. I try to keep the document as "small" and compact as possible. Also calling this a "Unix" toolbox is not accurate as it covers mostly Linux and FreeBSD. However I will add more Solaris and OS X commands in the future. Take a look at the Rosetta Stone for Unix for a good complement.

Help me

The document already grew bigger than I'd thought and I still try to keep it as compact and practical as possible. Still any new suggestion is most welcome and most importantly report errors or commands that do not work as explained, this will make the toolbox even better.

Are you a css or html hacker? I could not figure out how to solve the following problems, maybe you can:


The following translations are available. Many thanks to the translators!
Portuguese (work is in progress)Thanks to Caio Tedim and Sérgio Souza.
Bulgarian - БългарскиThanks to Vladimir Kolev for this translation.
ChineseThanks to Greco Shi for this translation.
Spanish - Español work is in progress (stalled?)Thanks to David Martinez for this translation.
Polish (work is in progress)Thanks to Hubert
French - FrançaisJe manque de temps pour l'instant, alors si quelqu'un est intéressé, c'est très volontiers...
It would be nice to follow those guidelines when translating the toolbox in your language, those are only suggestions:

How to mirror the document

You can mirror, modify and include the toolbox into your own website. Make sure you mention the original author (Colin Barschel), provide a back link to the original document and keep the same Creative Commons license [by - sa]. Also keep in mind that new versions are released once in a while so you might want to keep the page unmodified to make it easier to replace or use the php code below.
The toolbox is written in xhtml which makes it easy to interact with the XML DOM (Document Object Model). The following php code demonstrates how to select only parts of the document. This approach can be used to embed the toolbox in a website while still using the original unmodified document. A big advantage is that the file can simply be replaced by the newer version when the next release comes out. Additionally this makes it possible to use your css code for the colors and layout.
This site http://sleepyhead.de/howto/ demonstrates the technique. The index page parses a local copy of the original document and only displays the requested node, moreover the css code is automatically taken from the main site. The php code for this page is shown below, or download it here.

$dom = new DOMDocument('1.0', 'UTF-8');
$dom->substituteEntities = true;
$dom->load('unixtoolbox.xhtml');  // this is a local copy
$xp = new DomXPath($dom);

// Print the revision number and author
$subject = $xp->query("//xhtml:meta[@name='subject']");
$copyright = $xp->query("//xhtml:meta[@name='copyright']");
echo $subject->item(0)->getAttribute("content") . "<br />\n";
echo $copyright->item(0)->getAttribute("content") . "<br />\n";

// Get all h1 header from the TOC
$headers = $xp->query("//xhtml:ol/xhtml:li/xhtml:a"); // res ist a nodeList

foreach ($headers as $header) { // replace # with ?href=
    $attr = $header->getAttribute("href");
    $link = str_replace("#","?href=",$attr);
    echo "<a href=\"" . $link . "\">" . $header->nodeValue . "</a><br />\n";

// Display the div content as simple XML node
$href = $_GET["href"];
if ($href) {
    $h1 = $xp->query("//xhtml:div[@id='$href']");
    $div = $h1->item(0)->ownerDocument->saveXML($h1->item(0));
    echo utf8_decode($div);

You are free to use this code in any way you want without any restriction.

Last diff

If you want to follow the changes, here is the last diff. Full revisions (e.g. 11 -> 12) usually include new content like additional commands or full sections. Small revisions (e.g 11 > 11.1) only relates to small corrections without significant changes. Or see all diffs.