Things you should never EVER type in Linux. Ever!

Things you should never EVER type in Linux. Ever! I feel that I need to put a warning at the top of this post because try as I might in the subject to be clear about what I mean, I know that someone will go and type/execute one of these things into their production server at work and then be horribly distraught and/or cause some sort of power grid catastrophe across the Pacific Northwest or something.

If you’re a Linux guru or or experienced enough to know what all of these things are then you probably don’t need this article and we can go our merry ways. If not, then DO NOT, DON’T, NEVER EVER EVER EVER run these commands in a terminal session. If you do you will render your system anything from useless without a forced reboot to devoid of any useful purpose ever.

Why write this article on ArsGeek then? Because you should be forewarned as a Linux user that there are people out there who consider it good fun to bait others into running destructive and harmful commands on their machines. Particularly those new to Linux. So use this list as a caution as to what not to do. And note that it’s not an exhaustive list, simply a quick reference against stuff you really don’t want to do. Bottom line is, research what you’re about to execute before you push the enter key and know what you’re doing to your system, yourself and your job prospects.

Let’s start with commands that delete things that probably shouldn’t be deleted, shall we?

The basic way to delete a file in Linux is with the rm command. rm foo will take foo, wring its skinny neck and throw it down the drain. Gone. See you later.

Now there are lots of variants on these commands. Let’s look at a few. Again, look but do not execute!
rm -rf ./ - Delete the files in a current directory (all of them)
rm -rf / - Delete the partition. (AHHH!)
rm -rf . - Delete the whole directory.
rm -rf * - Delete all visible files in a directory

Running all of these commands have certain real world utility. They’re also a great way to fubar your system if run in the wrong place. Remember ‘rm’ means remove. -r means recursive and -f means don’t bother asking me if you want me to really delete your /usr/bin directory – or any other for that matter.

Mean folks have gotten slightly more creative and regular Linux users have made this mistake more than once.

rm -rf .* - Delete all hidden (files that start with a ‘.’) files.

Now, how about the good old fork bomb! Sounds ominous eh? What a fork bomb does is eat up all of your available system processes, essentially bringing your system to it’s knees. A fork is when a program spawns another program – often a version of itself. A fork bomb is when this happens endlessly and nearly exponentially until there are no resources left on your system. Most often the only way to get out of this is to hard reboot (i.e. hold down the old power button) which can cause file system problems. Here’s a few examples of fork bombs to watch out for:
:(){ :|:& };: - The cutest one. Like a vorpal bunny.
#!/usr/bin/perl - for Perl meanies.
fork while 1

or also in perl:
fork while fork
#include <unistd.h>
int main(int argc, char* args[])
return 0;

That last one is in C. As you can see there are a bunch of ways to do this – the above examples are only that, examples. Just be careful of code you don’t know with the word ‘fork’ in it, or of typing lots of emoticons into your shell.

Even windows users can be subject to fork bombs in the form of malicious batch code. Here are two examples:

The next kind of code bomb is a tar bomb. Tar is a nifty program for compressing and uncompressing stuff so you don’t have to lug around hefty loads of data. Tared files can be crafted however to ‘explode’ into an existing directory, rather than into a new directory.

An example: Say you’re in your home directory and you have file called foo.tar you want to untar. So you do so and it should untar into a directory called /foo sitting in your home directory. Through malice or bad practice though, it could just untar all of it’s files into your /home directory. This is bad if there are say. . . 487,038 files in the tarbomb. Now you’ve got all the junk to sort through in your home directory. Ouch!

The same can be said for any uncompiled code. If you don’t know where it’s coming from think twice before compiling it. It’s very easy for someone to hide a chunk of malicious code in the thousands of lines of codeit takes to make a program.

Bottom line is – be cautious, don’t run things if you don’t know where they came from and always, always check what a command does if you’re not familiar with it. Not only will this make you more productive and more powerful user but it will help you protect yourself as well. Remember this isn’t an exhaustive list, there are plenty of other tricks out there as well. Be safe.

Edit: Thanks to the commenters for pointing out some errors – I’ve since corrected them!


Avatars United. Where your MMO selves go to hang out

Avatars United. Where your MMO selves go to hang outJust about all of us have played MMOs or been involved in some sort of virtual world like Second Life. You play in these worlds for a year or two, meet some interesting people, upgrade your system and then wander off to the newest and shiniest MMO to come out. What about those friends you’ve left behind though? How will they find you in your latest incarnation? If of course, you want to be found.

If you do want to be found, you’re going to want to go check out Avatars United featured by ArsGeek reviews.

Avatars United is a combination of social website, friend finder and virtual identity storage. Here you can upload images of your avatars from numerous online environments, organize them, designate one avatar as your primary avatar and write a bit of biographical information. You can also create groups and join like minded folks from the same MMO and server. In their own words:

Avatars United was initiated in 2007 by a group of childhood friends sharing a common passion for immersive online worlds. The project is built in recognition of the fact that strong bonds and close friendships actually can be tied within virtual spaces and has furthermore gone one step further in recognizing virtual personas as personas in their own right by building a community for avatars only. As such, Avatars United is a free community website bringing avatars from all online worlds together.

Contrary to commonly held beliefs we think gaming is a social phenomenon and are hoping that Avatars United will prove us right. By and large, we felt that the “out of game” social aspect of online games had been neglected. With tools to communicate with, find and track old virtual friends and share experiences from virtual realms Avatars United wishes to stand out as a community highlighting the social aspect of life within virtual worlds.

avatars united screenshot

Think on this. If you’ve got some buddies past from Everquest who you’d love to coax into playing WoW with you, but you can’t find them, how would you do that? Facebook? A Google search and a desperate hope that they posted to some obscure forum somewhere under their Avatar’s name in the correct game? If persistent virtual worlds are going to stick around, a service like Avatars United could come in awfully handy. Now in beta, this is a great time to stop by and create an account. Not only can you say 10 years from now “I was in on the beta of Avatars United” but you can also offer helpful comments and ideas to shape this into a community you’d love to hang out at.

avatars united screenshot 2
I recently shot a few questions off to Thor Olof Philogène, the CEO of Enemy Unknown (with digs for coolest company name I’ve come across this month) who are the corporate masters of Avatars United.

ArsGeek: Lots of people come up with ideas for the next big thing – or even the next cool thing on the internet. What made you and the other developers of Avatars United decide to follow through with these ideas and create Avatars United?

Thor: Though we obviously believe in the potential of Avatars United we never designed it to be “the next big thing”.* *More than anything else, we built Avatars United to provide a toolset we ourselves would have used. Great friendships are tied within virtual spaces yet we felt there was a lack of a single tool to help keep track and share experiences with them.

ArsGeek: Computers and people have long been on a convergent path – computers are becoming more pervasive and the number of people using them to connect to persistent online worlds is growing rapidly. What’s Avatars United’s role in this convergence?

Thor: One of the many results of this convergence between computers and people has been the creation of virtual identities within persistent online worlds. By building a community for avatars only, Avatars United has gone one step further in recognizing these virtual identities as personas in their own right. Most people have different identities within different social settings and most often have different nicknames within the family, at work and with their friends. Avatars United’s role is that of a social tool for your virtual identity.

ArsGeek: Where do you see Avatars United in 5 years?

Thor: 5 years is a long period of time in Internet years. It is however fair to assume that over such a long period of time synthetic worlds will become even more mainstream and that massive amounts of users will have migrated to new online worlds.

With those changes Avatars United will hopefully still be around in the shape of a community driven, much more flexible of use enhanced social tool for virtual identities.

ArsGeek: Do you plan on encouraging Avatars United affiliations in persistent online worlds, such as sites in Second Life or Guilds on any MMORPGS?

Thor: Yes, as long as it is community driven. As a matter of fact we encourage anyone wanting to get involved with Avatars United to contact us.

ArsGeek: Lets get old school for this one. What are some highlights from your video game past? Which titles got you into gaming in the first place and why?

Thor: Tough one, I would have to pick one title for each era though.

· Defender of the Crown (C64)

· Railroad Tycoon for (Amiga)

· X-Com series ( early 90s PC)

As I see it all these three games are precursors of their era in terms of gaming experiences. What they brought with them no one had previously offered before.

A side note would be that I actually discovered these games a long time ago with the very same people that I now work with on Avatars United today.

ArsGeek: Any thoughts on including or creating a sister site to highlight pen and paper games (classic RPGs) and using it as a resource for RPGers to find old friends and meet new ones?

Thor: Ideas like that are great! Hopefully when we have finished improving our current site and move away from the beta testing stage we will be able to jump onto projects like that. Again we wish to encourage people with ideas and motivation to contact us for any such project.

avatars united logo


Blogger posts from beyond the grave

OlmsteadThe Guardian and the Army Times are both carrying stories on a blogger by the name of Andrew Olmstead. Andrew blogged for the last 5 years for a local newspaper, and had quite a following, as well as several blogging awards. Why is this story interesting?

Andrew died in early January in Iraq, and had an arrangement with friends back home to post a ‘final post‘ (caution:brought tears to my eyes) on his blog – his way of leaving a bit of a legacy, and getting his final word in. Powerful stuff, if you ask me.

Why do I think this is remarkable? Well, it shows the power of the citizen journalist blogging in this digital age – even in death you can still get your word out, almost instantly, with the help of technology and some friends. Andrew loved blogging, as reflected in part of his final post:

“Believe it or not, one of the things I will miss most is not being able to blog any longer. The ability to put my thoughts on (virtual) paper and put them where people can read and respond to them has been marvelous, even if most people who have read my writings haven’t agreed with them.”

This is not about political position, Liberal or Conservative, etc. This is about the ability of a person – any person – in the digital age to extend his reach, get his word out – whatever that word may be – even from beyond the grave.

You can read his archived posts, both on his blog, and at the blog he ran for the Rocky Mountain News.

RIP, Andrew Olmstead.

Ben from ArsGeek


Unix/Linux Cheat Sheet

Cheat Sheet
Extremely handy terminal command reference sheet, available as a PDF file (image visible and readable on the page). Divided into the following categories: File Commands, Process Management, File Permissions, SSH, Searching, System Info, Compression, Network, Installation, and Shortcuts. Licensed under Creative Commons. Visit our ArsGeek blog for more….


5 steps to create a PDF printer (print to PDF) in Ubuntu

Ever wanted to print a document of just about any sort to a virtual printer that would then turn it into a PDF? It’s pretty easy to do in Ubuntu, especially if you follow this ArsGeek tips. In fact you’ll need just 5 steps and about as many minutes of your time to set this up.

Step 1. Get cups-pdf installed. Open up a terminal session (or use Synaptic) and type the following:
sudo apt-get install cups-pdf
Step 2. Go to System -> Administration -> Printing and then Printer ->Add Printer.


Step 3. Take a good look at this screen. You won’t have to change anything, but it sure is nice to see. Click the Forward button.


Step 4. Set the Manufacturer to Generic and the Model to PostScript. Click the Forward button.


Step 5. Set the name to something simple and easy to remember, like “LeChicArsGeekPDFPrinterMakerThingy”. Click the Apply button and you are done.


Now you can happily churn out PDFs to share with your friends, family and co-workers.


How NOT to survive the Digg effect

As many of you may have notice, one of our articles was dugg yesterday and made it to the front page.

digg.pngThis resulted in lots and lots of people not being able to get to our site. Why? Well, two reasons.

Generally I’ve got two plugins installed to help cope with the digg effect when and if it occurs. The first is WP-Cache – a handy plugin that creates a static cache of ArsGeek and each individual article on request. I’ve set it to retain this static image for 5 minutes before regenerating. This means that after the first hit on the site or an article, the mySQL database doesn’t get throttled generating new page requests.

Next I’ve got Digg Defender all set up. This plugin notes when hits are coming from various sites (notably in this case Digg) and redirects the incoming request from ArsGeek to a mirror site. People can still read and reach the article, but aren’t bringing ArsGeek down with more traffic.

Here’s what went wrong. There was a permissions error (that was somehow introduced since the last time we were dugg) with WP-Cache causing it to just plain not work. Ouch. So each request coming in to our server to view the article resulted in fresh database queries, causing MySQL to quickly overload the server I was on. Without access to MySQL I couldn’t solve problem #2, which was:

Digg-Defender wasn’t turned on. Big ouch on my part. I don’t generally turn this on unless I can see that I’m getting the Digg effect. Why? Because the mirror site is generally much, much slower than our site, and doesn’t update things like new comments and whatnot. We’ve got enough general traffic coming from Digg that I don’t want everyone ending up on a slow, horribly out of date page. Without access to MySQL, which was bombing out, I couldn’t access WordPress’s control panel to enable Digg Defender so that I could figure out what was wrong with WP-Cache in the first place.

Usually with WP-Cache on and working properly I have time to react. This time, not so much. So there’s how not to survive the Digg effect.