The 7 Habits of Highly Effective Linux Users

23 08 2008

Switching to Linux can be very daunting, most seasoned Linux users experienced that first hand. After all, at some point they were also “noobs”. However, the Linux community has excelled in making the switch for beginners as easy as possible by providing guides, howtos, tweaks, and general advocacy articles. When I first made the switch 3 years ago, I found the community welcoming me with open hands on forums, IRC channels, and E-mail, I was surprised how helpful these penguins were!

For this, I feel obliged to give back to the community that has always been there for me. To pass down the torch to newer Linux generations. Over here I compiled a list of 7 habits that I wish someone told me when I started out. I believe that getting into these habits will make the Linux experience more secure, convenient, educational, and ultimately more enjoyable.

1-Never Login Using ‘root’ GUI

If there was one habit that one should strictly abide by, it’s probably this one. Most of us come from a Windows background, and we have the notion that more power is better, so we login using our administrator accounts. Well let me tell you my friend, that this is a major reason that Windows is plagued with viruses and insecurities, half the world is currently running ‘root’ accounts!

Suse on RootWith great power comes great responsibility, and with ‘root’ powers you should be aware of the consequences of EVERYTHING you’re doing, and even then, mistakes happen. I remember my beginnings with SUSE Linux, there were lot of administrative tasks I needed to do but had no idea how to go about them without the GUI, so I so innocently log out and login onto the ‘root‘ GUI. The default wallpaper of the ‘root‘ GUI on SUSE were lit fuse bombs tiled beside each other. Back then, the symbolism totally flew over my head, coming from a Windows background, I wasn’t really doing anything wrong.

But what are the dangers of logging in as root?

  1. Well imagine you’re on the trapeze without a safety net, frightening isn’t it? Well that’s effectively what you are doing when you login as root, you can inadvertently hose your whole system
  2. You are at the risk of running malware. Any program that is started under root mode will automatically be given root privileges
  3. If there is a common security hole that hasn’t been patched yet, you could be totally “pwned”
  4. It’s common Unix convention, never run anything in root mode unless absolutely necessary. If a non-admin program asks for root access, you should be suspicious

Generally, instead of logging onto your root GUI, use any of the following techniques:

  • Use “sudo” or “su” , and kill the session when your done
  • If you don’t know how to do it in the command line, use “gksu” or “kdesu”. For example, press alt+f2 and type “gksu nautilus“. Close the app as soon as you finish

2-Properly Name Your Files

In a Linux environment, you can name your files whatever you want except for, 1) the forward slash “/” which is reserved for the root directory, and 2) a null character. Anything else is technically acceptable, however there are some best practices that you should abide by in order to avoid any future complications:

  • As a rule of thumb, only use alphanumeric characters, hyphens, periods, and underscores
  • Avoid special symbols like dollar signs, brackets, and percentages. These symbols have special meanings to the shell, and could cause conflicts
  • Avoid using spaces, handling files with spaces in the terminal is kind of awkward. Replace spaces with either hyphens or underscores

I personally have grown into this habit, I find myself following these guidelines even in a Windows or Mac environment.

3-Place /home on a Different Partition

Doing this gives you extreme flexibility, a kind that you never imagined before. Having /home in a separate partition enables you to reinstall your system or even change your whole distro without losing your data and personal settings. Just keep the “/home” partition intact and reinstall whatever you want on your “/”. Now you can try out distros as much as you want, without worrying about your data and personal settings, they go with you on the go ;) .

If you weren’t lucky enough to know this before installing your system, then do not despair! Carthik from Ubuntu Blog takes you in a step-by-step guide titled “Move /home to it’s own partition

4-Proper Crash Management

Learn how to avoid this!Linux is very robust and stable, however every system can come down to it’s knees every once in a while. Before you head to CTRL-ALT-DEL, the restart button, or the plug, you should know how to properly handle any crash. As opposed to another un-named operating system, you should be able to easily recover your system without actually restarting! I personally go through different levels, if one doesn’t work I elevate it to next step:

  1. I have the “force quit” applet on my taskbar, if any app starts to act up just click on the “force quit” icon and then kill the app
  2. If that doesn’t work, draw up a terminal and type “ps -A” , and take note of the Process ID (PID) of the culprit app, then kill it. “kill PID”
  3. Use the “killall” command, for example, “killall firefox-bin”
  4. If your whole GUI is frozen, and drawing up a terminal is impossible, then press CTRL-ALT-F1, this will take you to another terminal, and virtually a whole new session. From there kill the culprit app using step 2 and 3.
  5. If that doesn’t work, you might want to restart your GUI using the CTRL-ALT-Backspace combo. Beware, that this will kill all your GUI apps currently running
  6. Invoke CTRL-ALT-F1 and do CTRL+ALT+DEL from here. This will not instantly reset your system, merely perform a standard reboot, it’s safe. (Assuming you want to restart and CTLR-ALT-F1 works)
  7. Finally if nothing works, don’t rush to the hard reset button, try to Raise a Skinny Elephant

5-Play The Field

You were probably recruited to your current distro by a friend, it suited you, and stuck with it. That’s great, but there is probably something better for you out there. Why not harness the flexibility and richness of Linux and Open Source? Don’t be afraid to experiment around with different distros, apps, window managers, and desktops. Experiment until you find the best fit. Think of it this way, if you are currently living in the best place on earth for you, traveling around the world wouldn’t really harm right? In fact you might find a better place to live in, but if you didn’t, the time you spent traveling would not have gone to waste, you would have learned a lot about other countries, other people and traditions, different ways of thinking, and ultimately had fun!

Every new thing you try out will contribute to your incremental learning, in a year’s time you will have a good grasp on Linux and the Open Source world. I personally tried out at least 10 distros, 4 desktops, and 5 window managers. My recent article Etymology of A Distro got me interested in a couple more distros such as Zenwalk, Foresight, and Sabayon. Play the field, my friend, it will do you good.

But before you proceed, pay heed to these few hints:

  • Set up your perfect system that you feel comfortable with, you need a workable system 24/7 right? Then test around using one of the below points
  • Harness the power of virtualization! Install Vmware or Virtualbox. Use them to test out the distros
  • Alternatively, if you are not big on virtualization, you can set up a separate partition to test new distros. A partition that you couldn’t care less about
  • Ultimately, you can have a main PC and a test one. Wreak havoc on the test one
Anime image is licensed by Creative Commons BY-NC 3.0
Original Artwork by Juzo Kun, Modified by Wayne Richardson.

6-Nurture Your CLI Adoption

Now I am not going to advocate learning the command line, there are numerous articles that emphasise on it’s importance. What I am assuming here is that you already know it’s importance, and have a rudimentary understanding on how to do some simple administrative tasks. You are already hacking away, tweaking and configuring, following the different guides and howtos scattered all over the tubes, but don’t just copy and paste!! Meaning, instead of just headlessly executing commands some random guy half way across the world told you to execute, try to understand what every command does. Why did the guide ask you to do this, as opposed to something else? Understand the rationale of the steps you are asked to do. These commands are highly relevant to you, and will help you gain a better understanding than any 101 guide.

After a while you will notice that you have amassed a good deal of CLI lore.

At the end of the day it’s just a pseudo-language! Every command is probably just an acronym of something, or a cut down version of a real word. You expect your dog to understand “Spike fetch ball” so why don’t you expect to understand “sudo mv /file1 /file2″?

7-Always Be Ready to Unleash The Power Within

Personally, I had numerous occasions when a friend asked me to do something on his/her computer, but found myself crippled because of his/her choice of OS. At other times I wanted to do something urgently but the only computer had another crippled OS. Spare yourself the agony, have Linux with you all the time, whether it’s on a USB pendrive, a live CD, or even a live CD business card ! There are dozens of good Linuces out there that are perfect for on-the-go computing. Knoppix, DSL, and Puppy Linux are just a few examples.

I personally don’t apply this habit, which is a shame, I really need to get my act together! P </publishes and heads to pendrivelinux.com>





Linux Myths Debunked

23 08 2008

When it comes to Linux there are 3 4 kinds of people, those who never heard of it, those who love it, those who are afraid of it, and those who hate it and spread falsities about it. I don’t really care about the first, they probably aren’t really technologically literate anyways, as long as they have E-mail they are content. While the third  group is the result of the actions of the fourth. Let’s hit two birds with one stone shall we?
1-Linux is More Secure Because it Has A Smaller User Base

It is widely argued that Linux is more secure than Windows just because Windows is more popular, so hackers and virus coders tend to focus on the more popular platform. Actually, this is just one side of the story There are so many other things running for Linux security-wise that totally dispels this myth.

First of all, let’s face it, YOU are the weakest link in any OS. The user is the one that wreaks havoc to any OS, with ignorance or miscalculated decisions. Linux users are generally more savvy than the Windows or Mac users out there. We don’t just click on files promising us the latest Hollywood diva nude pictures. Besides, it’s normal practice that Linux users don’t run their systems as root, which is not the case with Windows, this drastically brings down the vulnerability of any system. The question now, will this be the case if Linux gains popularity and more adoption? I don’t really know, but if Linux commanded more than 90% of the market, I believe this argument would be totally false.

Linux with it’s Unix roots is built as a Network Operating System (NOS) and now advancing slowly as a Desktop OS (DOS? ironically). This simple fact helped Linux carry on the legacy of network security model of server/client-user with limited permissions. Whilst an OS like Windows was originally built as a single-user Desktop OS advancing into a NOS and adding security layers on the go.

Finally, just the fact that Linux is Open Source means that more eyeballs can see bugs and vulnerabilities making it easier to patch. Any coder in his/her mom’s basement could issue a fix for the community. It doesn’t need a big fat layer of corporate bureaucracy to issue a fix! Granted that the corporation gives the security flaw enough attention.
2-Installing Applications on Linux is Hard

Well this might have been true in the early days of Linux, but currently it can’t be farther from the truth. As a Linux user, what do I have to do to install an app? Let’s assume I want to this in a a GUI only environment (some get turned off by the mere mention of a command line, for some reason beyond me.) All I have to do is launch the graphical frontend of my package manager (think of it a big ass repository of applications stored on a server some where), then search for the app in mind. Hell if you don’t know the exact name of the application just search for the function! For example if you want to install a Gmail alerter, just type “google” or “gmail”, a plethora of apps will appear, then tick on the one you like and click ok. The package manager will automatically download the required files from the Internet and install it, and place it in your menu!

On the other hand, if you want to install an app on Windows what will you do? Generally you will head to Google and search for the required app or function, swim through hundreds if not thousands of results, randomly choose one which might or might not have what you want. If it does you will be probably asked for a valid email or enter a captcha, then download the file. The file might be huge and if you don’t have a download manager you might lose all what you downloaded because your wireless abruptly decided to disconnect. There are 101 scenarios! If all goes well you double click on the app, click next next, tick on “I Agree”, a couple more nexts and you have the app. Which turns out to be a stripped down trial version, that added a couple of more apps that you didn’t ask for on your desktop and changed a few of your system settings!

Which is easier again?
3-Linux is A Nightmare to Install

Back in 2005 when I first started my Linux adventure, I got my hand on 5 SUSE cd’s from a  Linux Format magazine. Back then I was on XP, I initially wanted to back up my files before I take the plunge just in case. When I looked at the huge amount of files, I got lazy and somewhat careless, and decided just to install SUSE without backing up. 2 hours later I had a magical dual boot system (the whole concept of dual boot was alien to me back then) and all my files were intact!

Why am I telling you this story? Because I think one part of the intimidation of installing Linux is the belief that it might destroy files and end up on an OS that might thats not appealing (hey we are humble to realize it’s not for everyone ;) ) All I am saying it’s piss easy! If I was able to do it with no prior knowledge of Linux then you can too! It just needs some common sense. Trust me!

And if you don’t trust me (I understand you don’t really know me do you?) Why don’t you dabble with Linux using virtualization?

Anyways the whole installation process has been tuned over the years. Distros like SUSE, Ubuntu, and Fedora, are so easy to install it would literally take around 30 minutes to get it up and ready. With almost all the apps a default PC should have. Thing like an Office suite, media player, PDF reader, chat clients…etc Can you really say the same about YOUR system?
4-The Linux Interface is Ugly and Unattractive

Well it depends on the definition of “attractive” doesn’t it? A command line only OS might be a turn off for most people but bliss for some. An interface with wobbly windows, rotating cubes, spherical desktop, fireworks, rain, snow…etc is bliss to a lot and a resource hog to some.

Well Linux provides you both and everything in between! And in a million and one styles!

You can install Compiz, which gives you rotating cubes for different desktops, wobbly windows, animated window behavior just to name a few. You can install Enlightenment, which provides you a sleek looking desktop that you have never seen before. KDE4 is a scene to behold! Anyways I think a picture is worth a thousand words,  here judge by yourself:

Linux and the Compiz Cube It\’s Snowing in Linux Land enlightenment-e17

In fact you can actually make Linux like whatever you want, you can make it even look like Apple or Windows! The sky is the limit ;)
5-There Are No Games on Linux

Actually I am not really a PC gamer, I tend to keep my gaming activities on consoles, but I once installed Football Manager under Linux, worked perfectly.

Seriously, just yesterday I walked into my brother’s room, and  found a collection of PC games on the floor. Me knowing that he uses Linux exclusively, I raised an eyebrow and asked “under Linux?”. He replied positively, “without a hitch!”

Today, there are literally 100’s of games that work under Linux, true they haven’t been ported, but Wine (a program that allows Windows programs to run under Linux) has taken care of that. Just looking at the top 10 list of apps working under Wine, one finds quite a lot of them are games. And a lot of them are VERY popular! Wine could also help in a lot of other games too! You can also purchase Cedega which depends on Wine but makes the experience much more user-friendly. There is a lot of help out there, you just need to open your eyes a bit! And if all fails, virtualization could be a last resort!

Word of Worldcraft Running on Linux using Wine

One could still argue that there are no Linux games, as all that this means that there are no native Linux games. Right? Not really, there are loads of native Open Source Linux games, I can’t really vouch for them, but from the screen shots they do seem cool. Here have a glimpse.
6-Linux Doesn’t Come Preinstalled Like Windows

Whoa! You have been contaminated with a big dose of FUD! Actually Linux comes preinstalled from a lot of different vendors. Some are international brands like Dell and Lenovo. There are also some specialized Linux vendors like System76 or EmprorLinux.

Asus also have created a new trend. Fitting Linux in a new niche market, the Ultra Mobile PC market with the Eee PC. HP, Aspire, MSI, among others are fitting these UMPC’s with Linux.
7-There is No Support for Linux

If you purchased your Linux system from a vendor, then there will probably some kind of support. A quick check on System76 or EmprorLinux would verify that. Also if you bought a distribution from Red Hat or Novell then you will also get support as part of the package.

However in reality, a lot of Linux users are mavericks, they get their support from the Linux community. The Linux community is very supportive (at least that is my experience). The Internet is riddled with forums, guides, howtos, blogs, IRC rooms… etc that would offer anybody an extraordinary amount of help. I don’t think that any other operating system has this kind of community. I am sure when it comes to community other proprietary operating systems do envy us!
8-Linux Doesn’t Have Good Hardware Support

Sometime ago, I blogged about how I suffered to get an HP printer to work on Windows. Long story short, after around 2 hours of trying to get an HP printer to work on XP, I gave up and plugged into an Ubuntu Linux Eee PC, it got recognized in 30 seconds! There are thousands of stories similar to this, just a quick Google would confirm that. Here is an example.

What people fail to realize that in the case of their Windows preinstalled PC’s, they “just works” because the vendors have already done all the work for them. It would be a totally different ball game if these PC’s had no OS on them. Windows wouldn’t come out all that superior, I would even wager that Linux would probably do a better job.

Actually I think that we are at a point where I can say that Linux would work more than 90% of hardware out there! Could Windows or Apple claim that? I don’t know, I stopped being a Windows power user for quite sometime. But what I remember is that a webcam I purchased in 2004 wasn’t “digitally verified” (or something like that) by XP, despite the fact that XP has been around for years!
9-There is No Office Software, or Software At All for Linux

Huh? Under which rock have you been living under in the past decade? Actually there is more Office software for Linux than Windows and Apple combined. It does 95% of what Microsoft Office can do and you don’t need to loose an arm and a leg to get it, its FREE! And let’s face it, most of us don’t really use Microsoft Office to it’s full potential. So why should I pay 100% for only 10% features I need?

As for the rest of software, rest assured that there is replacement for everything you need. And in a lot of cases these apps get the job done in better ways than their propietary counterparts. And before you say: “Photoshop”, you won’t drag me into this conversation, if you are not content with Gimp, you still can get Photoshop on Linux, so please let’s not get into that.
Bonus: Linux is For Geeks!

Ahh, nevermind not really gonna try to refute this one, though I tried to convince people that Linux is sexy, didn’t really do a good job at it! But hey geek is good ;)