Lost in the GNU/Linux terminal?

Here are a couple of scenarios and helpful things to try if you are ever left staring at a blinking cursor with no idea what to do next. If you:

1.) Don’t know a command name

The simplest solution is to use “apropos” followed by what you want the command to do. Apropos goes through the manual page summaries and searches them for anything that matches the expression you gave it as an argument. Apropos can search by regex expressions as well.

2.) Don’t know where a config or system file is located

A common scenario: for whichever reason, you need to fiddle around with xorg.conf… again. But you can’t remember where the hell it is… again. In this case, use “whereis” or “locate” followed by file name. It will save you many trips to google.

An interesting fact is that you can use “whereis” on commands as well, to find their location in your system.

3.) Don’t know how to use a command

There are two main ways to do this: one way is very concise, but conveys less information, whereas the other is massive and takes some time to read. Depending on the situation, you might want to use “–help” or “man”.

“man”, the manual page command, is an invaluable resource for learning stuff in the terminal. You can use it by typing man and the name of the command you want to learn about. Then you will be brought to that command’s manual page, which includes info on how to use the command, various options / switches it has and often a technical description of how the command works. You navigate with arrow keys, search by typing “/[insert search term]“, and quit with q.

But often you don’t want to read through an entire manual just to find out how do a simple one-time task. In this case, you can type the name of the command you are curious about followed by -help or –help (depending on the command). However, not all commands have such a switch. This is due to the fact that unlike a manual page, having the –help switch isn’t obligatory for whoever wrote the command to actually implement, but more like a neat thing that everyone expects to be there.

GNU/Linux is a massive and complex system, but thankfully, the short commands and resources listed here greatly simplify the task of navigating and learning its power and potential.

An Overview Of Ubuntu Desktop Environments


With the release of Ubuntu Oneiric Ocelot 11.10, Unity and its less resource intensive version, Unity 2D, have become the default desktop environments for Ubuntu. Most probably, your first thought upon seeing either one of them in action was: ”That’s cool!… now how do I get rid of it?”

While it is true that Unity is pretty, it is hardly functional in the way gnome 2 (the previous Ubuntu desktop environment) was. The vertical launch thing on the side isn’t a real substitute for the good ol’ bottom and top bar configuration many of us have grown to know and love.

Don’t get me wrong, the switch to Unity is fantastic for the mac-type crowd – the non-tech part of the user population that wants a pretty OS that they can use to check email and facebook in, occasionally do something in Office, and to generally just have a system that works and doesn’t ask too many questions. And I have to admit the new design has its good sides and is way more visually appealing than gnome 2 is. However, power users typically have more demands than that and they value power and function before design and visuals.

Luckily, Ubuntu makes it incredibly easy to install alternative desktop environments. You just run a single command (found at the end of each DE description further down in the text). When you install it, you log out, select the cog icon next to your user name and select the new DE you would like to use. That’s it. Not even a reboot needed. With that said, I present you with 4 alternative desktop environments for Ubuntu:

1.) KDE 4 Plasma Desktop


This one has an interesting history. When it first came out in 2008, massive amounts of hate were thrown its way by the Linux community. The current version back then, KDE 3, was an established polished product, and the new KDE 4.0 was a half-baked unstable beta. However, in the meantime, it has grown to be a solid DE. By default, it has a very windows-y UI, with a traditional bar on the bottom of the screen. Its main feature are containments. Think of them something like widgets or rainmeter plugins. KDE 4 is also an eye-candy dispenser, with rotating desktop cubes and exploding windows (actually), all powered by KWin.

However, having tons of features comes at a price: it is the “heaviest” desktop environment of the ones described here.

To install in Ubuntu, run:

sudo apt-get install kubuntu-desktop

2.) LXDE


If you have an old computer, you will most grateful LXDE exists. It makes a point of being extremely fast and resource efficient, however it is not very customizable or incredibly pretty. It just does its job and does it well. I like it and use it on my old-ish core 2 duo desktop computer. No flying cubes, but whatever you click simply happens in a flash.

To install in Ubuntu, run:

sudo apt-get install lubuntu-desktop

3.) Xfce


A bit heavier DE than LXDE, but a lot more configurable. Should run on everything and anything as far as computers are concerned. It has some some default effects, most of them along the lines of making the terminal semi-transparent. However its strength is combining the best of two worlds, being lightweight like LXDE, but at the same time, being a modern, comfortable to work with desktop environment.

To install in Ubuntu, run:

sudo apt-get install xubuntu-desktop

4.) Gnome 3 / Gnome Shell

Gnome 3

Yep, I kept this one till the end. So, the reason why we have Unity by default now is because gnome 3 was a horrible mess early in its development. It was so bad it prompted Linus Torvalds to call it crap and promptly switch to Xfce (however he did something similar when KDE 4 came out and he switched to Gnome 2). However…

Gnome 3 didn’t turn out to be all that bad. I’d even say that it is the Unity desktop the way it was supposed to be, well designed and yet a good platform to get some work done. I should just warn you of one thing: you should get used to ctrl+alt+arrow to switch workspaces, the meta key to show windows, and other keyboard shortcuts, because it will speed up your work exponentially. If you try using your mouse you will soon grow to loathe gnome 3 because of a lack of things like minimize and maximize buttons, or a clearcut bar with open programs. But using the keyboard and the built-in launcher is surprisingly comfortable and efficient, especially with multiple desktops (whose number gnome 3 manages dynamically – a cool feature you get used to very quickly). As an added plus, it is less sluggish than Unity. As an added minus, it is quite difficult to customize beyond the essential stuff.

To install in Ubuntu, run:

sudo apt-get install gnome-shell

So, which desktop environment do you use? What are your views on the ones outlined here? Please share in the comment section below.

Setting Priorities and Planning

The Tuesday post was about why you won’t survive university unless you have solid time-management skills. List, prioritize and plan are the 3 basic steps behind every time-management method under the sun. Through them, you will get all outstanding tasks and plans handed to you in a neatly organized format through which you know exactly what to do and when – which is a way better option than always having an intimidating ambiguous pile of ”stuff-to-do” hanging over your head. Instead of fretting about everything, you can just go out and get things done.

2.) Set Your Priorities

There are several different methods you can use prioritize your tasks, but the idea behind all of them is the same: You take your to-do list, and divide the tasks into groups according to various criteria. Some of these methods are complicated and expect you to behave as if you were running a company (e.g. the POSEC method – a convoluted way to over-manage every aspect of your life), and some are very simple and effective, including my personal favorite: the Eisenhower box.

Eisenhower Box

Different tasks on your list are going to have to be sorted according to importance and urgency. However, I cannot stress enough that urgent and important are not the same thing. If you check out the graphic of an Eisenhower box on the right, you will see that not everything that is urgent is important (e.g. the phone ringing – you need to devote attention to it right now if you don’t want the caller to hang up), and that not everything that is important is urgent (e.g. choosing a major for university, plan to take over the world etc.). So you do the following:

Group your tasks in 4 categories like in the graphic. Do not use the examples already inside as a guide, they are exaggerated as an illustration (I don’t think anyone would be so busy to put “extinguish fire” on a to-do list with the goal of doing it later). The guideline for “urgent and important” is anything that will have negative consequences if you do not start working on it soon, e.g. if you don’t start studying for that big exam scheduled in 3 days, you will most likely get a poor grade. The benchmark for “not urgent and important” is any big decision or long-term plan, like finding a place to live on campus next year. The “not urgent and not important” and “urgent but not important” categories are pretty self-explanatory.

After you have everything from your list in little groups like that, first cross out #4 (“not urgent/not important”). If you judged a task is neither urgent nor important, it is probably not worth worrying about and doing. Group #3 (“urgent/not important”) mostly consists of small annoyances, and this group is usually empty, because such things get dealt with as soon as they occur, so they don’t even get written down. You are left with the 2 “important groups”. For these, you proceed as follows:

3.) Plan

Get a planer and write the urgent/important stuff into timeslots closer to today and put the not urgent/important stuff in timeslots after those. That is the basic idea.

Having a planner is important because as a student you always have a lot of stuff going on, like tests, labs, assignments, a job or two… It can be overwhelming to keep track of all that in your head. You become stressed out of your mind because so much is going on. However, when you write it down, everything stops looking so scary. Why?

a) Your tasks don’t seem that big (because you have a clear overview)

b) You can start doing your tasks instead of just panicking about them (because you can plan out a way to solve them in the same planer)

As for myself, I first tried using my phone as a planner, but it didn’t work out because I was too lazy to type stuff into it. Next I tried a bound paper planer, but stopped using it after a semester because it is structured either per day (with hour slots), or per week (with day slots), and I needed both views at the same time.

Finally, I ended up using my timetable as a planner. I just made a table with 30 minute divisions for the entire week, and inserted my classes, labs etc. into it. What I got is all of my scheduled commitments in clear view, and empty slots for when I’m not going to school. Print a bunch of copies, fill the empty slots with whatever needs to be done, and that’s it.

Although this type of planner worked best for me, you should try everything until you find out what fits you best, because as I said in the previous post: everyone is different and different things work for different people. Maybe you will like using your smartphone best, because it is convenient (you always have it with you), or maybe because you can sync it to your computer. As long as you have a clear overview of what’s coming in the following week(s) and can prepare accordingly, it will do as a planner.

This three step approach to organization simply works because there is no complicated procedure: you write down stuff that needs to get done and then you sort and go do it. Give these tips a try, and be sure to comment on how they worked for you in the comments section below.

Time Management and To-Do Lists

Allow me to convince you why you need to own a time-machine in order to survive university :

[start math]
In university you are expected to build a 15+ credit timetable per semester. This translates to at least 15 hours of lectures and anywhere from 0-6+ hours of labs and 0-6+ hours of tutorials per week. In addition, most professors recommend 2 hours of study for every hour spent in class, so that adds up to 45-57 hours per week. But the best part is that if you are an engineer you will be taking 18-20 credits per semester. So we have a minimum of 57 hours of study for 19 credits, without counting the tutorials and labs.
[end math]

It comes down to 8+ hours of work 7 days a week. Way more than a full-time job!

Therefore, you will arrive at a crossroads: sleep, party, or study – And you will only be able to pick 2 out of 3. You can either:

  • Party and sleep – and have a lousy GPA.
  • Study and sleep – and be a lonely integral solving hermit.
  • Study and party – and not sleep at all.

Therefore, you can’t have all three… unless you own a time machine. Or have access to the technology and facilities to make clones of yourself that will do the work for you. Or have evil minions, Santa’s elves, Oompa-Loompas or the like under your command. Or have time management and organizational skills and some common sense… or something along those lines. Here are some pointers:

  1. Know what’s coming (make a to-do list)
  2. Identify what is important (set your priorities)
  3. Plan accordingly

Check out this guide and you will realize that 24 hours a day is more than enough to get studying done AND to get enough sleep AND to have fun. And it all starts with:


1.) Writing To-Do Lists

A to-do list can be anything you like: a small notebook, your smartphone, a piece of software, even a cleverly folded piece of paper. It really isn’t rocket surgery: if you need to do something, and can’t do it right now, write it down so that you can do it later.

That’s pretty much it. However…

… there are a couple of things you will need to keep in mind about what you write down in your list and how you manage it.

So what goes on your list? The short answer is tasks – “non-routine non-trivial expenditures of effort” (this is my definition of a task, and it is a damn fine one if I may add). By that I mean that you should NOT write down things like “brush my teeth”, “make breakfast”, “wash dishes”, “feed the gimp”, “go to class” or routine everyday stuff like that. Why write those things down, when you do them automatically on an everyday basis? Tasks that DO belong on to-do lists are things like exams, assignments, holding a presentation, paying the bills etc… They aren’t something you do every day, despite the fact that some of them occur predictably (like paying the bills).

Another thing you have to watch out for is not to over-manage your list. While it is true that your list should be organized and relatively “tidy”, you might actually get less work done if you are constantly fiddling about with it. The point of this whole time management thing isn’t bookkeeping but getting stuff done.

And at last, let’s talk about the least important thing about to-do lists: how they should look like. Feel free to ignore other people’s advice on categories, columns, no columns, having one list, two, five… those things really don’t matter, what matters are YOUR preferences. What works well for others might not work so well for you, so do whatever feels best and whatever you feel most comfortable with, because in the end, there is really no “right way” of organizing to-do lists.

Let’s say that after reading this you go ahead and write a to-do list. After writing it, you will know what needs to be done. Unfortunately, by itself that information is of limited use, because this is only step one to managing your time effectively. Your next steps are setting up priorities and laying out a course of action, which you will be able to read more about in the Saturday post.

How To Cut Down On Assigned Readings And Study Time


Assigned readings: if you are like 90% of students, you won’t do them.

Why? Because you simply don’t have the time. You have 6 courses. And every prof has stuff for you to do. And no, they don’t acknowledge the existence of any other course but their own. And you barely have time to study the things that were covered yesterday, let alone study in advance!

But on the other hand, every time you actually do your readings – once or twice a semester, usually at the very beginning while you are still determined that this time it is going to be different and that you are going to put some serious effort into school and have good grades – when you actually do your readings, you feel as if everything you did that day was a piece of cake.

You come to a challenge: “I need to do my readings but I don’t have the time to do them.” So what do you do?

Well, it’s quite simple really. Don’t read. Glance. Just look at the pretty pictures if need be.

Simply give the material a quick selective read ahead of the lecture. The whole point of assigned readings isn’t for you to study ahead. Studying alone takes a lot of time and besides, schools exist because you can learn a lot more quickly when you have somebody who already knows the stuff (the prof) explain it to you. The reason behind assigned readings is just so that you know what lies ahead, not so that you can study it. Does giving study advice that discourages studying seem odd to you? Let me give you an example:

Consider something you studied in high school, like derivations. By the time university calc 1 rolls around, you have completely forgotten most of the things you were taught in high school and couldn’t derivate if your life depended on it. However, when the prof starts drawing little tangents on graphs, you’ll go “oh yeah, I remember that bit”. Pretty soon you’ll remember details too, like that when a derivation is a flat line that is the minimum/maximum of a graph. So even though you don’t know anything in particular, random details like this are enough to make relearning derivatives a piece of cake.

Now imagine that you are a math mayor and you are sitting in a computer science lecture. You don’t know the first thing about today’s lecture, except that it’s on a new chapter (which you didn’t even open). The lecturer starts by saying that the new chapter is on Turing machines and saying that one consists of:

… an infinite memory capacity obtained in the form of an infinite tape marked out into squares, on each of which a symbol could be printed. At any moment there is one symbol in the machine; it is called the scanned symbol. The machine can alter the scanned symbol and its behavior is in part determined by that symbol, but the symbols on the tape elsewhere do not affect the behavior of the machine. However, the tape can be moved back and forth through the machine, this being one of the elementary operations of the machine. Any symbol on the tape may therefore eventually have an innings.

Wait, what was that mass of words just now? The only thing you know about the subject is this single massive description. You are confused even though the definition isn’t even that arcane: it’s just about a machine that can read symbols off a tape and do operations based on them (a definition of a computing machine). However, you don’t have a pre-existing knowledge base on this subject which would help you decipher this block of text and learn something. That makes the lecture very difficult to follow, so you concentrate more on notes, less on understanding, and you end up studying at home.

By pre-glancing material some things will stick: a graph, an illustration, an application… A single partial read-through will do: You are merely getting acquainted with the material. With those little pieces of information, you will have a base to build on when the prof starts writing on the blackboard (you will already have an image of a computer in your head when you hear the definition). Instead of not understanding a thing and just scribbling notes and learning afterwards, you will be able to prepare yourself with minimal effort in 5 minutes and learn in class. You will only need a fraction of the time you are spending studying now, because the learning is happening in the classroom. You will neither struggle at home reading and trying to learn before the lecture, nor will you skip readings and struggle to learn on your own after class.

Makes sense, right? What do you think? The comment button is below.

Study Tip #1: Sleep


Sleep, or your brain will murder you.

This is a fact that most university/college students seem to forget: sleep is kinda important and should be exercised regularly. Ever heard about REM, the “dreaming part” of sleep? Well, REM turns out to be more important for your grades than books and good notes combined.

That’s because REM sleep is a key part of the learning process. During the day, you pick up an immense amount of information from various sources: lectures, labs, tutorials, but also trivial sources like the billboards on your way to school or stories you hear from friends. Your brain makes neuron connections linking all that info together so that you can remember it later. However, your brain doesn’t really organize anything at this stage. That’s because you are still using your brain. Why is that such a big deal? Imagine you were trying to organize your CD collection, but while your roommate randomly borrows your Celine Dion Ultimate Fan Bootleg Collection CDs ™ – all 50 of em – listens to them, and returns them to you in random order. You wouldn’t be able to organise anything. Eventually your brain will get tired of keeping track of that unorganized mess: then it will start to hate you. It shows that relentless hate by making you sleepy and thus lazy and useless.

Eventually, you give in to the pressure your brain is putting on you and go to bed. Then your brain finally has time to get to work and make sense of all the new stuff that happened that day and store it into your long-term memory – think of it as archiving on a computer: archived stuff takes up way less space, but it’s still there and easily accessible. So when you wake up in the morning, yesterday’s events are clearer and make more sense. Also, you are well rested and ready for more stuff to happen.

In an average 8 hour sleep, there are 4-5 bouts of REM sleep that take up 20-25% of that time. That comes down to less than 2 hours of REM: and you need all of it. So, if you disrupt your sleeping pattern (let’s say with an all-night study run before a test), not only are you making yourself tired, but you are also preventing any new information from setting in. By not giving your brain time to organise all the stuff you are learning, you are ensuring that it won’t be properly ready for recall.